![]() |
TLx493D 3D Hall Sensor Generic Library
1.3
Generic library for the TLx493D 3D Hall sensor family
|
#include <stdint.h>
#include "driver/TLV_A1B6_defines.h"
#include "driver/TLV_A1B6_driver.h"
#include "TLV_A1B6.h"
#include "../TLx493D.h"
Macros | |
#define | NULL ((void*) 0) |
Functions | |
int32_t | TLV493D_A1B6_init (TLV493D_data_t *data, bool addr_high, TLV493D_address_t addr_type) |
Initialize the sensor. More... | |
int32_t | TLV493D_A1B6_set_operation_mode (TLV493D_data_t *data, TLV493D_op_mode_t mode) |
Change the operation mode of the sensor. | |
void | TLV493D_A1B6_hard_reset_reconfigure (TLV493D_data_t *data) |
Hard reset the sensor by executing a power cycle and reinitialize using the settings from the data structure. Will only set the address. More... | |
int32_t | TLV493D_A1B6_read_frame (TLV493D_data_t *data, TLx493D_data_frame_t *frame) |
Read the registers of the TLx493D sensor and create a data frame. | |
int32_t | TLV493D_A1B6_set_temp_measure (TLV493D_data_t *data, bool enabled) |
Enable or disable the temperature measurement. | |
int32_t | TLV493D_A1B6_set_parity_test (TLV493D_data_t *data, bool enabled) |
Enable or disable the parity test. | |
int32_t | TLV493D_A1B6_set_IIC_address (TLV493D_data_t *data, TLV493D_address_t new_addr_type) |
Set a new I2C address for the sensor, considering the ADDR pin level at startup. | |
void | TLV493D_A1B6_get_data (TLV493D_data_t *dest) |
Copy the data stored in the library to the dest structure. | |
int32_t | TLV493D_A1B6_set_data (TLV493D_data_t *src) |
Copy the data from src to the library. | |
void TLV493D_A1B6_hard_reset_reconfigure | ( | TLV493D_data_t * | data | ) |
Hard reset the sensor by executing a power cycle and reinitialize using the settings from the data structure. Will only set the address.
data | Sensor data structure. By passing NULL, local data will be used. |
int32_t TLV493D_A1B6_init | ( | TLV493D_data_t * | data, |
bool | ADDR_high, | ||
TLV493D_address_t | addr_type | ||
) |
Initialize the sensor.
data | parameter is optional (can be replaced with NULL) and specifies a data structure that should store the state of the sensor. If no data structure is sepcifiec, an internal data structure will be used. This parameter should be used in a bus configuration to easily identify sensors and also to manually inspect the internal state of the sensor. |
ADDR_high | indicates the level of ADDR at the time the sensor was powered up. ADDR_high=true indicates that the sensor was powered up with ADDR=HIGH ADDR_high=false indicates that the sensor was powered up with ADDR=LOW |
addr_type | indicates the desired address after initialization while keeping in mind the value of ADDR_high and the ADDR pin logic value at startup. |