![]() |
TLx493D 3D Hall Sensor Generic Library
1.3
Generic library for the TLx493D 3D Hall sensor family
|
Macros | |
#define | NULL ((void*) 0) |
Functions | |
int32_t | TLV493D_A1B6_read_regs (uint8_t addr, TLV493D_regmap_read_t *regmap, uint8_t upto) |
Read register values from the sensor, starting with the register at address 0 up to register upto. More... | |
int32_t | TLV493D_A1B6_write_regs (uint8_t addr, TLV493D_regmap_write_t *regmap, const TLV493D_regmap_read_t *regmap_check) |
Write the register data from regmap to the sensor registers. More... | |
int32_t TLV493D_A1B6_read_regs | ( | uint8_t | addr, |
TLV493D_regmap_read_t * | regmap, | ||
uint8_t | upto | ||
) |
Read register values from the sensor, starting with the register at address 0 up to register upto.
addr | the I2C address of the sensor; |
regmap | register map read structure used to store the read registers of the sensor. |
upto | The reading process will start with register 0 and will continue incrementally up to the register upto |
int32_t TLV493D_A1B6_write_regs | ( | uint8_t | addr, |
TLV493D_regmap_write_t * | regmap, | ||
const TLV493D_regmap_read_t * | regmap_check | ||
) |
Write the register data from regmap to the sensor registers.
If the regmap_check pointer points to a valid structure (is not NULL), the reserved registers data from the regmap will be overwritten with the reserved data from regmap_check. This ensures that the reserved data read from the sensor is properly written back to the sensor. This overwrite will need to happend only once, as the corrections will be stored inside regmap.