![]() |
TLx493D 3D Hall Sensor Generic Library
1.3
Generic library for the TLx493D 3D Hall sensor family
|
TLx 3D Hall Sensor Family Abstraction. More...
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | TLx493D_data_frame_t |
Generic data frame, common to all supported hardware version. More... | |
Enumerations | |
enum | { TLx493D_OK = 0, TLx493D_INVALID_ARGUMENT = -1, TLx493D_INVALID_FRAME = -2, TLx493D_NOT_IMPLEMENETED = -3, TLx493D_INVALID_SENSOR_STATE = -4, TLx493D_WU_ENABLE_FAIL = -5 } |
Error codes returned by the TLx493D library. More... | |
enum | TLV493D_sensor_type_t { TLx493D_TYPE_UNKNOWN, TLx493D_TYPE_TLV_A1B6, TLx493D_TYPE_TLE_A2B6, TLx493D_TYPE_TLE_W2B6, TLx493D_TYPE_TLI_W2BW } |
Type of sensor on board. | |
enum | TLV493D_op_mode_t { TLx493D_OP_MODE_NOT_INITIALIZED, TLx493D_OP_MODE_POWER_DOWN, TLx493D_OP_MODE_MCM, TLx493D_OP_MODE_FAST, TLx493D_OP_MODE_LOW_POWER, TLx493D_OP_MODE_ULTRA_LOW_POWER } |
Operating Mode. | |
Functions | |
int32_t | TLx493D_init (void) |
Detect and initialize the connected sensor. More... | |
TLV493D_sensor_type_t | TLx493D_get_sensor_type (void) |
Return the type of sensor present on the board. | |
int32_t | TLx493D_set_operation_mode (TLV493D_op_mode_t mode) |
Set the operation mode of the sensors, if supported. More... | |
TLV493D_op_mode_t | TLx493D_get_operation_mode () |
Get the operation mode of the sensors. | |
int32_t | TLx493D_read_frame (TLx493D_data_frame_t *frame) |
Read a data frame from the sensor. More... | |
uint8_t | MISC_get_parity (uint8_t data) |
Compute the EVEN parity of a byte of data. More... | |
TLx 3D Hall Sensor Family Abstraction.
This file presents and abstraction for the sensors of the TLx493D family, offering basic functionality like changing the operation mode of the sensor, or reading a data frame.
anonymous enum |
Error codes returned by the TLx493D library.
uint8_t MISC_get_parity | ( | uint8_t | data | ) |
Compute the EVEN parity of a byte of data.
int32_t TLx493D_init | ( | void | ) |
Detect and initialize the connected sensor.
Automatically detect the sensor hardware version and call the appropriate initialization sequences. Must be called prior to any other call to a TLx493D_* method.
int32_t TLx493D_read_frame | ( | TLx493D_data_frame_t * | frame | ) |
Read a data frame from the sensor.
int32_t TLx493D_set_operation_mode | ( | TLV493D_op_mode_t | mode | ) |
Set the operation mode of the sensors, if supported.