![]() |
TLx493D 3D Hall Sensor Generic Library
1.3
Generic library for the TLx493D 3D Hall sensor family
|
TLE493D-A2B6/-W2B6 abstraction. More...
#include <stdint.h>
#include <stdbool.h>
#include "../TLx493D.h"
#include "driver/TLE_AW2B6_defines.h"
Go to the source code of this file.
Classes | |
struct | TLE493D_data_t |
Data structure containing information about the internal state of a sensor. Also used to identify a sensor on a bus. More... | |
Functions | |
int32_t | TLE493D_AW2B6_init (TLE493D_data_t *data, uint8_t i2c_addr) |
Initialize the sensor having the specified I2C address by reading the internal registers and disabling periodic interrupt pulses. More... | |
uint8_t | TLE493D_AW2B6_get_FP_bit (TLE493D_data_t *data) |
Compute the value of the FP bit using the internal register state of the sensor. | |
uint8_t | TLE493D_AW2B6_get_CP_bit (TLE493D_data_t *data) |
Compute the value of the CP bit using the internal register state of the sensor. | |
void | TLE493D_AW2B6_reset_all (void) |
Write the reset sequence on the I2C bus. | |
int32_t | TLE493D_AW2B6_set_operation_mode (TLE493D_data_t *data, TLV493D_op_mode_t mode) |
Set the operation mode of the sensor. | |
int32_t | TLE493D_AW2B6_read_frame (TLE493D_data_t *data, TLx493D_data_frame_t *frame) |
Read a data frame from the sensor. An ADC sampling must be completed before calling this method. | |
int32_t | TLE493D_AW2B6_WU_enable (TLE493D_data_t *data, uint16_t wu_xl, uint16_t wu_xh, uint16_t wu_yl, uint16_t wu_yh, uint16_t wu_zl, uint16_t wu_zh) |
Enable the Wake Up mode (available only on the -W2B6 hardware version) with the provided upper and lower limits. | |
int32_t | TLE493D_AW2B6_WU_disable (TLE493D_data_t *data) |
Disable the Wake Up mode. | |
int32_t | TLE493D_AW2B6_set_IIC_address (TLE493D_data_t *data, TLE493D_address_t i2c_addr) |
Set a new I2C address for the sensor. | |
int32_t | TLE493D_AW2B6_magnetic_tmp_comp (TLE493D_data_t *data, TLE493D_magnetic_comp_t sens) |
Set the magnetic temperature compensation mode. | |
int32_t | TLE493D_AW2B6_set_high_sensitivity (TLE493D_data_t *data, bool on) |
Double the measurement sensitivity(when on=true). This will decrease the ADC integration speed. | |
int32_t | TLE493D_AW2B6_set_angle_mode (TLE493D_data_t *data, bool on) |
Enable/Disable angle mode. In order to enable angle mode, the temperature measurement must be disabled. | |
int32_t | TLE493D_AW2B6_set_temp_measure (TLE493D_data_t *data, bool on) |
Enable/Disable temperature measurement. | |
int32_t | TLV493D_A1B6_set_lowpower_update_frequency (TLE493D_data_t *data, TLE493D_lp_update_freq_t freq) |
Set the update frequency while in LOW POWER Mode. | |
int32_t | TLV493D_A1B6_set_trigger_mode (TLE493D_data_t *data, TLE493D_Config_trigger_mode_t mode) |
Set trigger mode. Note that the TLE493D_AW2B6_Config_TRIG_R0 mode is momentarily not safe to use in this software implementation. | |
TLV493D_sensor_type_t | TLE493D_get_hw_version (TLE493D_data_t *data) |
Return hardware version of the TLE493D. | |
void | TLE493D_AW2B6_get_data (TLE493D_data_t *dest) |
Copy the data stored in the library to the dest structure. | |
int32_t | TLE493D_AW2B6_set_data (TLE493D_data_t *src) |
Copy the data from src to the library and the sensor. | |
TLE493D-A2B6/-W2B6 abstraction.
Abstracts the basic functions of the TLE493D-A1B6/-W2B6 and offers a way to store the internal state of the sensor registers.
int32_t TLE493D_AW2B6_init | ( | TLE493D_data_t * | data, |
uint8_t | i2c_addr | ||
) |
Initialize the sensor having the specified I2C address by reading the internal registers and disabling periodic interrupt pulses.
data | Structure to copy the values of the internal registers to. If data is NULL, the internal library data structure will be used instead. This approach support only one sensor, and for a bus of several sensors, a different data structure should be used for each one of them. |
i2c_addr | The initial address of the sensor. Sensors may have different fused default addresses. |