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 
19 
29 #ifndef SRC_TLX493D_TLV_A1B6_DRIVER_TLV_A1B6_DRIVER_H_
30 #define SRC_TLX493D_TLV_A1B6_DRIVER_TLV_A1B6_DRIVER_H_
31 
32 #include <stdint.h>
33 #include "TLV_A1B6_defines.h"
34 #include "src/TLx493D/interface.h"
35 
37 typedef struct {
38  uint8_t Bx, By, Bz;
39  uint8_t Temp;
40  uint8_t Bx2, Bz2;
41  uint8_t Temp2;
42  uint8_t FactSet1, FactSet2, FactSet3;
44 
46 typedef struct {
47  uint8_t Res;
48  uint8_t MOD1;
49  uint8_t Res2;
50  uint8_t MOD2;
52 
53 
65 int32_t TLV493D_A1B6_read_regs(uint8_t addr, TLV493D_regmap_read_t *regmap, uint8_t upto);
66 
77 int32_t TLV493D_A1B6_write_regs(uint8_t addr, TLV493D_regmap_write_t *regmap, const TLV493D_regmap_read_t *regmap_check);
78 
79 #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:39
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
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:29