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 
19 
27 #ifndef SRC_TLX493D_A1B6_H_
28 #define SRC_TLX493D_A1B6_H_
29 
30 #include "../TLx493D.h"
31 #include "driver/TLV_A1B6_driver.h"
32 
42 typedef enum {
43  TLV493D_A1B6_ADDR_3E_BC,
44  TLV493D_A1B6_ADDR_36_B4,
45  TLV493D_A1B6_ADDR_1E_9C,
46  TLV493D_A1B6_ADDR_16_94
48 
49 
52 typedef struct {
54  uint8_t IIC_addr;
56  uint8_t frame_count;
60  bool ADDR_high;
66 
67 
95 int32_t TLV493D_A1B6_init(TLV493D_data_t *data, bool ADDR_high, TLV493D_address_t addr_type);
96 
102 
105 
108 
110 int32_t TLV493D_A1B6_set_temp_measure(TLV493D_data_t *data, bool enabled);
111 
113 int32_t TLV493D_A1B6_set_parity_test(TLV493D_data_t *data, bool enabled);
114 
117 
120 
123 
124 #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:308
TLV493D_address_t addr_type
Type of I2C address (addr bit unspecified)
Definition: TLV_A1B6.h:58
int32_t TLV493D_A1B6_set_temp_measure(TLV493D_data_t *data, bool enabled)
Enable or disable the temperature measurement.
Definition: TLV_A1B6.c:282
uint8_t frame_count
Last frame value from the sensor ADC used to detect a stuck ADC.
Definition: TLV_A1B6.h:56
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:197
TLV493D_address_t
I2C addresses supported by the TLV493D-A1B6 sensor.
Definition: TLV_A1B6.h:42
bool ADDR_high
Address bit, representing state of ADDR line at power up.
Definition: TLV_A1B6.h:60
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:334
Data structure describing the TLV493D write registers.
Definition: TLV_A1B6_driver.h:46
Data structure describing the TLV493D read registers.
Definition: TLV_A1B6_driver.h:37
Low level driver for the TLV493D-A1B6.
TLV493D_regmap_write_t regmap_write
Last known state of the Write registers.
Definition: TLV_A1B6.h:64
Data structure containing information about the internal state of a sensor. Also used to identify a s...
Definition: TLV_A1B6.h:52
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:212
Generic data frame, common to all supported hardware version.
Definition: TLx493D.h:40
uint8_t IIC_addr
I2C address to be written on the bus for sensor addressing.
Definition: TLV_A1B6.h:54
int32_t TLV493D_A1B6_set_data(TLV493D_data_t *src)
Copy the data from src to the library.
Definition: TLV_A1B6.c:395
int32_t TLV493D_A1B6_init(TLV493D_data_t *data, bool ADDR_high, TLV493D_address_t addr_type)
Initialize the sensor.
Definition: TLV_A1B6.c:48
TLV493D_op_mode_t
Operating Mode.
Definition: TLx493D.h:78
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:132
void TLV493D_A1B6_get_data(TLV493D_data_t *dest)
Copy the data stored in the library to the dest structure.
Definition: TLV_A1B6.c:384
TLV493D_regmap_read_t regmap_read
Last known state of the Read registers.
Definition: TLV_A1B6.h:62