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.
tli493d Namespace Reference

Classes

struct  BusInterface_t
 
struct  RegMask_t
 

Enumerations

enum  Registers_e {
  BX1 = 0, BX2, BY1, BY2,
  BZ1, BZ2, TEMP1, TEMP2,
  ID, P, FF, CF,
  T, PD_3, PD_0, FRM,
  XL, XH, YL, YH,
  ZL, ZH, WA, WU,
  XH2, XL2, TST, YH2,
  YL2, PH, ZH2, ZL2,
  DT, AM, TRIG, X2,
  TL_mag, CP, FP, IICadr,
  PR, CA, INT, MODE,
  Res12, PRD, Res13, Res14,
  X4, Res15, Ver
}
 
enum  RegisterAddr_e {
  WAKEUP_REGISTER = 0x0D, CONFIG_REGISTER = 0x10, MOD1_REGISTER = 0x11, MOD2_REGISTER = 0x13,
  CONFIG2_REGISTER = 0x14
}
 

Functions

void initInterface (BusInterface_t *interface, TwoWire *bus, uint8_t adress, const uint8_t *resetValues)
 
bool readOut (BusInterface_t *interface)
 
bool readOut (BusInterface_t *interface, uint8_t count)
 
bool writeOut (BusInterface_t *interface, uint8_t regAddr)
 
uint8_t getFromRegs (const RegMask_t *mask, uint8_t *regData)
 
void setToRegs (const RegMask_t *mask, uint8_t *regData, uint8_t toWrite)
 

Variables

const RegMask_t regMasks []
 
const uint8_t resetValues []
 

Enumeration Type Documentation

names of register fields

Enumerator
BX1 
BX2 
BY1 
BY2 
BZ1 
BZ2 
TEMP1 
TEMP2 
ID 
FF 
CF 
PD_3 
PD_0 
FRM 
XL 
XH 
YL 
YH 
ZL 
ZH 
WA 
WU 
XH2 
XL2 
TST 
YH2 
YL2 
PH 
ZH2 
ZL2 
DT 
AM 
TRIG 
X2 
TL_mag 
CP 
FP 
IICadr 
PR 
CA 
INT 
MODE 
Res12 
PRD 
Res13 
Res14 
X4 
Res15 
Ver 
Enumerator
WAKEUP_REGISTER 
CONFIG_REGISTER 
MOD1_REGISTER 
MOD2_REGISTER 
CONFIG2_REGISTER 

Function Documentation

void tli493d::initInterface ( BusInterface_t interface,
TwoWire *  bus,
uint8_t  adress,
const uint8_t *  resetValues 
)
bool tli493d::readOut ( BusInterface_t interface)
bool tli493d::readOut ( BusInterface_t interface,
uint8_t  count 
)
bool tli493d::writeOut ( BusInterface_t interface,
uint8_t  regAddr 
)
uint8_t tli493d::getFromRegs ( const RegMask_t mask,
uint8_t *  regData 
)
void tli493d::setToRegs ( const RegMask_t mask,
uint8_t *  regData,
uint8_t  toWrite 
)

Variable Documentation

const RegMask_t tli493d::regMasks[]
const uint8_t tli493d::resetValues[]
Initial value:
= {
0x80,
0x80, 0x80, 0x80, 0x00, 0x00,
0x60, 0x80, 0x7F, 0x80, 0x7F,
0x80, 0x7F, 0x38, 0x38, 0x38,
0x01, 0x00, 0x00, 0x00, 0x00,
0x00, 0xC9,
}