TLI493D  2.0.1
With this Sensor, you can detect the position of a Joystick etc. without any additional mechanical components. You just have to provide a magnet that is fixed to a movable component.
RegMask.h
Go to the documentation of this file.
1 #ifndef TLI493D_REGMASK_H_INCLUDED
2 #define TLI493D_REGMASK_H_INCLUDED
3 
4 #include <Arduino.h>
5 
6 #define REGMASK_READ 0
7 #define REGMASK_WRITE 1 //rw
8 
9 namespace tli493d
10 {
11 
12 typedef struct
13 {
14  uint8_t rw;
15  uint8_t byteAdress;
16  uint8_t bitMask;
17  uint8_t shift;
18 } RegMask_t;
19 
20 uint8_t getFromRegs(const RegMask_t *mask, uint8_t *regData);
21 void setToRegs(const RegMask_t *mask, uint8_t *regData, uint8_t toWrite);
22 
23 }
24 
25 #endif
uint8_t byteAdress
Definition: RegMask.h:15
Definition: BusInterface.h:9
Definition: RegMask.h:12
uint8_t getFromRegs(const RegMask_t *mask, uint8_t *regData)
Definition: RegMask.cpp:4
uint8_t bitMask
Definition: RegMask.h:16
uint8_t shift
Definition: RegMask.h:17
void setToRegs(const RegMask_t *mask, uint8_t *regData, uint8_t toWrite)
Definition: RegMask.cpp:10
uint8_t rw
Definition: RegMask.h:14