Midnight Sun Firmware
Loading...
Searching...
No Matches
Hydrogen Sensing

TCIXTMA1 Hydrogen Sensing library. More...

Classes

struct  TCIXTMA1Storage
 

Functions

StatusCode tcixtma1_init (TCIXTMA1Storage *storage, I2CPort i2c_port, I2CAddress i2c_address)
 Initialize the TCIXTMA1 driver. More...
 
StatusCode tcixtma1_get_hydrogen_concentration (TCIXTMA1Storage *storage, float *out_hydrogen_con)
 Gets the instantaneous current in Amps. More...
 
void tcixtma1_crc16_init_table (void)
 Initiliaze the CRC16 table. More...
 
uint16_t tcixtma1_crc16_calculate (uint8_t *data, size_t len)
 Calculates CRC16 value for given data. More...
 

Detailed Description

TCIXTMA1 Hydrogen Sensing library.

TCIXTMA1 library.

Function Documentation

◆ tcixtma1_crc16_calculate()

uint16_t tcixtma1_crc16_calculate ( uint8_t *  data,
size_t  len 
)

Calculates CRC16 value for given data.

Parameters
datathe data to calculate the CRC for
lenlength of the data
Returns
uint16_t return CRC value

◆ tcixtma1_crc16_init_table()

void tcixtma1_crc16_init_table ( void  )

Initiliaze the CRC16 table.

Used for fast CRC16 lookups

◆ tcixtma1_get_hydrogen_concentration()

StatusCode tcixtma1_get_hydrogen_concentration ( TCIXTMA1Storage storage,
float *  out_hydrogen_con 
)

Gets the instantaneous current in Amps.

Parameters
storage- pointer to already initialized TCIXTMA1 struct
out_hydrogen_con- hydrogen concentration
Returns
STATUS_CODE_OK on success

◆ tcixtma1_init()

StatusCode tcixtma1_init ( TCIXTMA1Storage storage,
I2CPort  i2c_port,
I2CAddress  i2c_address 
)

Initialize the TCIXTMA1 driver.

Parameters
storage- a pointer to the TCIXTMA1 struct, to be initialized
i2c_port- I2C port peripheral
i2c_address- I2C address peripheral
Returns
STATUS_CODE_OK on success