TLx493D 3D Hall Sensor Generic Library  1.3
Generic library for the TLx493D 3D Hall sensor family
TLV_A1B6.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_A1B6_H_
27 #define SRC_TLX493D_A1B6_H_
28 
29 #include "../TLx493D.h"
30 #include "driver/TLV_A1B6_driver.h"
31 
41 typedef enum {
42  TLV493D_A1B6_ADDR_3E_BC,
43  TLV493D_A1B6_ADDR_36_B4,
44  TLV493D_A1B6_ADDR_1E_9C,
45  TLV493D_A1B6_ADDR_16_94
47 
48 
51 typedef struct {
53  uint8_t IIC_addr;
55  uint8_t frame_count;
59  bool ADDR_high;
65 
66 
94 int32_t TLV493D_A1B6_init(TLV493D_data_t *data, bool ADDR_high, TLV493D_address_t addr_type);
95 
101 
104 
107 
109 int32_t TLV493D_A1B6_set_temp_measure(TLV493D_data_t *data, bool enabled);
110 
112 int32_t TLV493D_A1B6_set_parity_test(TLV493D_data_t *data, bool enabled);
113 
116 
119 
122 
123 #endif /* SRC_TLX493D_A1B6_H_ */
int32_t TLV493D_A1B6_set_parity_test(TLV493D_data_t *data, bool enabled)
Enable or disable the parity test.
Definition: TLV_A1B6.c:307
TLV493D_address_t addr_type
Type of I2C address (addr bit unspecified)
Definition: TLV_A1B6.h:57
int32_t TLV493D_A1B6_set_temp_measure(TLV493D_data_t *data, bool enabled)
Enable or disable the temperature measurement.
Definition: TLV_A1B6.c:281
uint8_t frame_count
Last frame value from the sensor ADC used to detect a stuck ADC.
Definition: TLV_A1B6.h:55
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 st...
Definition: TLV_A1B6.c:196
TLV493D_address_t
I2C addresses supported by the TLV493D-A1B6 sensor.
Definition: TLV_A1B6.h:41
bool ADDR_high
Address bit, representing state of ADDR line at power up.
Definition: TLV_A1B6.h:59
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.
Definition: TLV_A1B6.c:333
Data structure describing the TLV493D write registers.
Definition: TLV_A1B6_driver.h:45
Data structure describing the TLV493D read registers.
Definition: TLV_A1B6_driver.h:36
Low level driver for the TLV493D-A1B6.
TLV493D_regmap_write_t regmap_write
Last known state of the Write registers.
Definition: TLV_A1B6.h:63
Data structure containing information about the internal state of a sensor. Also used to identify a s...
Definition: TLV_A1B6.h:51
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.
Definition: TLV_A1B6.c:211
Generic data frame, common to all supported hardware version.
Definition: TLx493D.h:39
uint8_t IIC_addr
I2C address to be written on the bus for sensor addressing.
Definition: TLV_A1B6.h:53
int32_t TLV493D_A1B6_set_data(TLV493D_data_t *src)
Copy the data from src to the library.
Definition: TLV_A1B6.c:394
int32_t TLV493D_A1B6_init(TLV493D_data_t *data, bool ADDR_high, TLV493D_address_t addr_type)
Initialize the sensor.
Definition: TLV_A1B6.c:47
TLV493D_op_mode_t
Operating Mode.
Definition: TLx493D.h:77
int32_t TLV493D_A1B6_set_operation_mode(TLV493D_data_t *data, TLV493D_op_mode_t mode)
Change the operation mode of the sensor.
Definition: TLV_A1B6.c:131
void TLV493D_A1B6_get_data(TLV493D_data_t *dest)
Copy the data stored in the library to the dest structure.
Definition: TLV_A1B6.c:383
TLV493D_regmap_read_t regmap_read
Last known state of the Read registers.
Definition: TLV_A1B6.h:61