EFR32 Blue Gecko 12 Software Documentation  efr32bg12-doc-5.1.2
si1147_i2c.h
Go to the documentation of this file.
1 /***************************************************************************/
17 #ifndef __SI1147_H
18 #define __SI1147_H
19 
20 #include "em_device.h"
21 
22 /***************************************************************************/
27 /***************************************************************************/
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /*******************************************************************************
37  ******************************* STRUCTS ***********************************
38  ******************************************************************************/
41 typedef struct {
42  I2C_TypeDef *i2c;
43  uint8_t addr;
44  } si114x_i2c_t;
45 
49 /*******************************************************************************
50  ***************************** PROTOTYPES **********************************
51  ******************************************************************************/
52 uint32_t Si1147_Write_Register (I2C_TypeDef *i2c,uint8_t addr, uint8_t reg, uint8_t data);
53 uint32_t Si1147_Write_Block_Register (I2C_TypeDef *i2c,uint8_t addr, uint8_t reg, uint8_t length, uint8_t const *data);
54 uint32_t Si1147_Read_Block_Register (I2C_TypeDef *i2c,uint8_t addr, uint8_t reg, uint8_t length, uint8_t *data);
55 uint32_t Si1147_Read_Register (I2C_TypeDef *i2c,uint8_t addr, uint8_t reg, uint8_t *data);
56 
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
65 #endif /* __TEMPSENS_H */
uint32_t Si1147_Read_Block_Register(I2C_TypeDef *i2c, uint8_t addr, uint8_t reg, uint8_t length, uint8_t *data)
Reads a block of data from the Si1147 sensor.
Definition: si1147_i2c.c:170
uint32_t Si1147_Write_Register(I2C_TypeDef *i2c, uint8_t addr, uint8_t reg, uint8_t data)
Writes register in the Si1147 sensor.
Definition: si1147_i2c.c:82
uint32_t Si1147_Read_Register(I2C_TypeDef *i2c, uint8_t addr, uint8_t reg, uint8_t *data)
Reads register from the Si1147 sensor.
Definition: si1147_i2c.c:42
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
uint32_t Si1147_Write_Block_Register(I2C_TypeDef *i2c, uint8_t addr, uint8_t reg, uint8_t length, uint8_t const *data)
Writes a block of data to the Si1147 sensor.
Definition: si1147_i2c.c:124