si114x_sys_out.c File Reference

Implementation specific functions for HRM code.

License

Copyright 2018 Silicon Laboratories Inc. www.silabs.com

The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.

Definition in file si114x_sys_out.c .

#include <stdio.h>
#include " i2cspm.h "
#include " em_i2c.h "
#include " em_gpio.h "
#include "string.h"
#include " em_usb.h "
#include " rtcdriver.h "
#include " si114x_functions.h "
#include " si114x_sys_out.h "
#include "si114xhrm.h"

Macros

#define IRQ_QUEUE_SIZE 270

Functions

void delay_10ms (void)
10ms delay required by Si114x reset sequence.
void delay_1ms (void)
1ms delay required by Si114x polling sequence.
void DisableSi114xInterrupt ()
Disable GPIO interrupt for Si114x interrupt.
void EnableSi114xInterrupt ()
Enable GPIO interrupt for Si114x.
static s16 Si114x_i2c_smbus_read_byte_data (HANDLE si114x_handle , u8 address, u8 *data, bool block)
Read from Si114x i2c.
static s16 Si114x_i2c_smbus_read_i2c_block_data (HANDLE si114x_handle , u8 address, u8 length, u8 *data, bool block)
Read block of data from Si114x i2c.
static s16 Si114x_i2c_smbus_write_byte_data (HANDLE si114x_handle , u8 address, u8 data, bool block)
Write to Si114x i2c.
static s16 Si114x_i2c_smbus_write_i2c_block_data (HANDLE si114x_handle , u8 address, u8 length, u8 const *data, bool block)
Write block of data to Si114x i2c.
int16_t Si114xBlockRead (HANDLE si114x_handle , uint8_t address, uint8_t length, uint8_t *values)
Block read from Si114x.
int16_t Si114xBlockWrite (HANDLE si114x_handle , uint8_t address, uint8_t length, uint8_t *values)
block write to si114x
s16 Si114xClose (HANDLE si114x_handle )
Close Si114x.
int si114xFindEvb (char *port_description, char *last_port, int num_ports_found)
s16 Si114xInit (void *port, int options, HANDLE * si114x_handle )
Initialize low level handle and clear irq queue.
s16 Si114xIrqQueue_Clear (HANDLE si114x_handle )
Empty the interrupt queue.
s16 Si114xIrqQueue_Get (HANDLE si114x_handle , SI114X_IRQ_SAMPLE *samples)
Get sample from the interrupt queue.
static s16 Si114xIrqQueue_Put ( SI114X_IRQ_SAMPLE *samples)
Put new sample in the interrupt queue.
s16 Si114xIrqQueueNumentries (HANDLE si114x_handle )
Query number of entries in the interrupt queue.
int si114xOutputDebugMessage (HANDLE si114x_handle , char *message)
Prints USB debug output.
s16 Si114xProcessIrq (HANDLE si114x_handle , u16 timestamp)
Main interrupt processing routine for Si114x.
int16_t Si114xReadFromRegister (HANDLE si114x_handle , uint8_t address)
Read from Si114x register.
int si114xSetupDebug (HANDLE si114x_handle , void *si114x_debug)
Enables/Disables USB debug output.
s16 Si114xSysReset (HANDLE si114x_handle )
Reset not implemented.
int16_t Si114xWriteToRegister (HANDLE si114x_handle , uint8_t address, uint8_t data)
Write to Si114x register.

Variables

static Si114xPortConfig_t _handle
static u8 IrqQueue [IRQ_QUEUE_SIZE]
static u16 irqQueueGetIndex = 0
static u16 irqQueuePutIndex = 0
static uint16_t irqSequence = 0
static bool usbDebugEnable