TLx493D 3D Hall Sensor Generic Library  1.3
Generic library for the TLx493D 3D Hall sensor family
TLV_A1B6_driver.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 
28 #ifndef SRC_TLX493D_TLV_A1B6_DRIVER_TLV_A1B6_DRIVER_H_
29 #define SRC_TLX493D_TLV_A1B6_DRIVER_TLV_A1B6_DRIVER_H_
30 
31 #include <stdint.h>
32 #include "TLV_A1B6_defines.h"
33 #include "src/TLx493D/interface.h"
34 
36 typedef struct {
37  uint8_t Bx, By, Bz;
38  uint8_t Temp;
39  uint8_t Bx2, Bz2;
40  uint8_t Temp2;
41  uint8_t FactSet1, FactSet2, FactSet3;
43 
45 typedef struct {
46  uint8_t Res;
47  uint8_t MOD1;
48  uint8_t Res2;
49  uint8_t MOD2;
51 
52 
64 int32_t TLV493D_A1B6_read_regs(uint8_t addr, TLV493D_regmap_read_t *regmap, uint8_t upto);
65 
76 int32_t TLV493D_A1B6_write_regs(uint8_t addr, TLV493D_regmap_write_t *regmap, const TLV493D_regmap_read_t *regmap_check);
77 
78 #endif /* SRC_TLX493D_TLV_A1B6_DRIVER_TLV_A1B6_DRIVER_H_ */
Define the registers addresses and the positions and masks of the variables from the registers...
int32_t TLV493D_A1B6_write_regs(uint8_t addr, TLV493D_regmap_write_t *regmap, const TLV493D_regmap_read_t *regmap_check)
Write the register data from regmap to the sensor registers.
Definition: TLV_A1B6_driver.c:38
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
Generic Library interface to the peripheral drivers.
int32_t TLV493D_A1B6_read_regs(uint8_t addr, TLV493D_regmap_read_t *regmap, uint8_t upto)
Read register values from the sensor, starting with the register at address 0 up to register upto...
Definition: TLV_A1B6_driver.c:28