TLx493D 3D Hall Sensor Generic Library  1.3
Generic library for the TLx493D 3D Hall sensor family
TLE_AW2B6.h
Go to the documentation of this file.
1 /*
2 *****************************************************************************
3 * Copyright (C) 2019 Infineon Technologies AG. All rights reserved.
4 *
5 * Infineon Technologies AG (INFINEON) is supplying this file for use
6 * exclusively with Infineon's products. This file can be freely
7 * distributed within development tools and software supporting such microcontroller
8 * products.
9 *
10 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
11 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
13 * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR DIRECT, INDIRECT, INCIDENTAL,
14 * ASPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
15 *
16 ******************************************************************************
17 */
18 
26 #ifndef SRC_TLX493D_AW2B6_H_
27 #define SRC_TLX493D_AW2B6_H_
28 
29 #include <stdint.h>
30 #include <stdbool.h>
31 #include "../TLx493D.h"
33 
34 
37 typedef struct {
43 
44 
56 int32_t TLE493D_AW2B6_init(TLE493D_data_t *data, uint8_t i2c_addr);
57 
58 
61 
64 
66 void TLE493D_AW2B6_reset_all(void);
67 
70 
71 
75 
78 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);
79 
82 
85 
88 
91 
94 int32_t TLE493D_AW2B6_set_angle_mode(TLE493D_data_t *data, bool on);
95 
97 int32_t TLE493D_AW2B6_set_temp_measure(TLE493D_data_t *data, bool on);
98 
101 
106 
109 
112 
115 
116 #endif /* SRC_TLX493D_AW2B6_H_ */
int32_t TLE493D_AW2B6_set_operation_mode(TLE493D_data_t *data, TLV493D_op_mode_t mode)
Set the operation mode of the sensor.
Definition: TLE_AW2B6.c:268
TLE493D_lp_update_freq_t
Low power mode update frequencies.
Definition: TLE_AW2B6_defines.h:208
TLV493D_sensor_type_t TLE493D_get_hw_version(TLE493D_data_t *data)
Return hardware version of the TLE493D.
Definition: TLE_AW2B6.c:728
TLE493D_address_t
Sensor bus addresses.
Definition: TLE_AW2B6_defines.h:238
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.
Definition: TLE_AW2B6.c:650
int32_t TLE493D_AW2B6_set_data(TLE493D_data_t *src)
Copy the data from src to the library and the sensor.
Definition: TLE_AW2B6.c:761
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 disablin...
TLE493D_regmap_t regmap
Last known state of the internal sensor registers.
Definition: TLE_AW2B6.h:41
Data structure containing information about the internal state of a sensor. Also used to identify a s...
Definition: TLE_AW2B6.h:37
void TLE493D_AW2B6_get_data(TLE493D_data_t *dest)
Copy the data stored in the library to the dest structure.
Definition: TLE_AW2B6.c:750
TLV493D_sensor_type_t
Type of sensor on board.
Definition: TLx493D.h:68
TLE493D_address_t IIC_addr
I2C address to be written on the bus.
Definition: TLE_AW2B6.h:39
TLE493D_magnetic_comp_t
Sensitivity for magnetic compensation.
Definition: TLE_AW2B6_defines.h:144
TLE493D_Config_trigger_mode_t
Register-configurable trigger modes.
Definition: TLE_AW2B6_defines.h:127
int32_t TLE493D_AW2B6_WU_disable(TLE493D_data_t *data)
Disable the Wake Up mode.
Definition: TLE_AW2B6.c:412
void TLE493D_AW2B6_reset_all(void)
Write the reset sequence on the I2C bus.
Definition: TLE_AW2B6.c:260
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 lo...
Definition: TLE_AW2B6.c:353
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.
Definition: TLE_AW2B6.c:54
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...
Definition: TLE_AW2B6.c:526
int32_t TLE493D_AW2B6_set_IIC_address(TLE493D_data_t *data, TLE493D_address_t i2c_addr)
Set a new I2C address for the sensor.
Definition: TLE_AW2B6.c:448
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 t...
Definition: TLE_AW2B6.c:684
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 disable...
Definition: TLE_AW2B6.c:568
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...
Definition: TLE_AW2B6.c:293
Generic data frame, common to all supported hardware version.
Definition: TLx493D.h:39
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.
Definition: TLE_AW2B6.c:40
Define the registers addresses and the positions and masks of the variables from the registers...
int32_t TLE493D_AW2B6_magnetic_tmp_comp(TLE493D_data_t *data, TLE493D_magnetic_comp_t sens)
Set the magnetic temperature compensation mode.
Definition: TLE_AW2B6.c:486
TLV493D_op_mode_t
Operating Mode.
Definition: TLx493D.h:77
Internal registers of the TLE493D sensor family.
Definition: TLE_AW2B6_defines.h:246
int32_t TLE493D_AW2B6_set_temp_measure(TLE493D_data_t *data, bool on)
Enable/Disable temperature measurement.
Definition: TLE_AW2B6.c:619