18 #include "../pal/gpio.hpp"
19 #include "../pal/spic.hpp"
updTypes upd
Definition: E9000SPC.cpp:43
Definition: TLE5012b.hpp:30
Definition: TLE5012b.hpp:52
errorTypes readRegMap()
Definition: TLE5012b.cpp:598
errorTypes readTempCoeff(uint16_t &data)
read register offset 0x0F
Definition: TLE5012b.cpp:366
errorTypes readTempT25(uint16_t &data)
read register offset 0x30
Definition: TLE5012b.cpp:382
errorTypes writeToSensor(uint16_t command, uint16_t dataToWrite, bool changeCRC)
Definition: TLE5012b.cpp:191
errorTypes writeActivationStatus(uint16_t dataToWrite)
write register offset 0x01
Definition: TLE5012b.cpp:580
errorTypes getAngleSpeed(double &angleSpeed)
Definition: TLE5012b.cpp:479
slaveNum
Definition: TLE5012b.hpp:40
errorTypes begin(uint8_t csPin, slaveNum slave=TLE5012B_S0)
begin method with default assignments for the SPI bus and the slave setting. Only the csPin is needed...
Reg reg
Register map.
Definition: TLE5012b.hpp:49
errorTypes readOffsetY(uint16_t &data)
read register offset 0x0B
Definition: TLE5012b.cpp:354
void enableSensor()
Definition: TLE5012b.cpp:136
errorTypes readOffsetX(uint16_t &data)
read register offset 0x0A
Definition: TLE5012b.cpp:350
void resetSafety()
Definition: TLE5012b.cpp:275
errorTypes readTempDMag(uint16_t &data)
read register offset 0x14
Definition: TLE5012b.cpp:370
GPIO * en
shield enable GPIO to switch sensor2go on/off
Definition: TLE5012b.hpp:48
errorTypes readBlockCRC()
Definition: TLE5012b.cpp:312
void disableSensor()
Definition: TLE5012b.cpp:143
errorTypes readIntMode2(uint16_t &data)
read register offset 0x08
Definition: TLE5012b.cpp:338
errorTypes readIntMode3(uint16_t &data)
read register offset 0x09
Definition: TLE5012b.cpp:342
errorTypes writeIntMode4(uint16_t dataToWrite)
write register offset 0x0E
Definition: TLE5012b.cpp:572
errorTypes writeOffsetX(uint16_t dataToWrite)
write register offset 0x0A
Definition: TLE5012b.cpp:556
errorTypes writeSIL(uint16_t dataToWrite)
write register offset 0x07
Definition: TLE5012b.cpp:588
uint16_t _registers[CRC_NUM_REGISTERS+1]
keeps track of the values stored in the 8 _registers, for which the CRC is calculated
Definition: TLE5012b.hpp:371
errorTypes writeSlaveNumber(uint16_t dataToWrite)
Definition: TLE5012b.cpp:592
uint16_t _command[2]
command write data [0] = command [1] = data to write
Definition: TLE5012b.hpp:369
safetyWord safetyStatus
Definition: TLE5012b.hpp:330
errorTypes writeTempCoeff(uint16_t dataToWrite)
write register offset 0x0F
Definition: TLE5012b.cpp:576
bool STAT_ANG
bits 12:12 Invalid angle value
Definition: TLE5012b.hpp:56
errorTypes readIntMode4(uint16_t &data)
read register offset 0x0E
Definition: TLE5012b.cpp:346
errorTypes writeSynch(uint16_t dataToWrite)
write register offset 0x0C
Definition: TLE5012b.cpp:564
errorTypes writeOffsetY(uint16_t dataToWrite)
write register offset 0x0B
Definition: TLE5012b.cpp:560
errorTypes writeIntMode3(uint16_t dataToWrite)
write register offset 0x09
Definition: TLE5012b.cpp:552
SPIC * sBus
SPI cover class as representation of the SPI bus.
Definition: TLE5012b.hpp:47
struct Tle5012b::safetyWord safetyWord_t
constructor for the Sensor
errorTypes checkSafety(uint16_t safety, uint16_t command, uint16_t *readreg, uint16_t length)
Definition: TLE5012b.cpp:229
errorTypes getAngleValue(double &angleValue)
Definition: TLE5012b.cpp:413
errorTypes readIFAB(uint16_t &data)
read register offset 0x0D
Definition: TLE5012b.cpp:362
bool STAT_ERR
bits 14:14 System error
Definition: TLE5012b.hpp:54
uint16_t safetyWord
the last fetched safety word
Definition: TLE5012b.hpp:331
uint16_t _received[MAX_REGISTER_MEM]
fetched data from sensor with last word = safety word
Definition: TLE5012b.hpp:370
errorTypes getTemperature(double &temp)
Definition: TLE5012b.cpp:437
slaveNum mSlave
actual set slave number
Definition: TLE5012b.hpp:50
errorTypes readSIL(uint16_t &data)
read register offset 0x07
Definition: TLE5012b.cpp:330
errorTypes readFromSensor(uint16_t command, uint16_t &data, updTypes upd=UPD_low, safetyTypes safe=SAFE_high)
Definition: TLE5012b.cpp:152
~Tle5012b()
default begin with standard pin setting
Definition: TLE5012b.cpp:123
errorTypes readTempIIFCnt(uint16_t &data)
read register offset 0x20
Definition: TLE5012b.cpp:374
bool STAT_ACC
bits 13:13 Interface access error
Definition: TLE5012b.hpp:55
errorTypes getNumRevolutions(int16_t &numRev, updTypes upd=UPD_low, safetyTypes safe=SAFE_high)
Definition: TLE5012b.cpp:461
errorTypes writeTempCoeffUpdate(uint16_t dataToWrite)
Definition: TLE5012b.cpp:207
Tle5012b()
destructor stops the Sensor
Definition: TLE5012b.cpp:115
slaveNum responseSlave()
Returns the safety word slave number to identify the sensor.
Definition: TLE5012b.hpp:64
errorTypes writeIntMode2(uint16_t dataToWrite)
write register offset 0x08
Definition: TLE5012b.cpp:548
void end()
Definition: TLE5012b.cpp:130
errorTypes readIntMode1(uint16_t &data)
read register offset 0x06
Definition: TLE5012b.cpp:334
errorTypes readActiveStatus(uint16_t &data)
read register offset 0x01
errorTypes readActivationStatus(uint16_t &data, updTypes upd=UPD_low, safetyTypes safe=SAFE_high)
Definition: TLE5012b.cpp:326
errorTypes readSynch(uint16_t &data)
read register offset 0x0C
Definition: TLE5012b.cpp:358
errorTypes writeIFAB(uint16_t dataToWrite)
write register offset 0x0D
Definition: TLE5012b.cpp:568
errorTypes resetFirmware()
Definition: TLE5012b.cpp:283
errorTypes readRawY(int16_t &data)
Definition: TLE5012b.cpp:397
bool STAT_RES
<
Definition: TLE5012b.hpp:53
errorTypes writeIntMode1(uint16_t dataToWrite)
write register offset 0x06
Definition: TLE5012b.cpp:584
uint8_t CRC
bits 7:0 Status ADC Test
Definition: TLE5012b.hpp:58
uint16_t fetch_Safety(uint16_t reg)
Function separates safety word bits.
Definition: TLE5012b.hpp:76
errorTypes regularCrcUpdate()
Definition: TLE5012b.cpp:290
errorTypes writeInterfaceType(Reg::interfaceType_t iface)
Definition: TLE5012b.cpp:611
errorTypes getAngleRange(double &angleRange)
Definition: TLE5012b.cpp:529
errorTypes readStatus(uint16_t &data, updTypes upd=UPD_low, safetyTypes safe=SAFE_high)
Definition: TLE5012b.cpp:322
errorTypes readMoreRegisters(uint16_t command, uint16_t data[], updTypes upd=UPD_low, safetyTypes safe=SAFE_high)
Definition: TLE5012b.cpp:171
errorTypes setCalibration(Reg::calibrationMode_t calMode)
Definition: TLE5012b.cpp:628
uint8_t RESP
bits 11:8 Sensor number response indicator
Definition: TLE5012b.hpp:57
errorTypes readRawX(int16_t &data)
Definition: TLE5012b.cpp:386
errorTypes readTempRaw(uint16_t &data)
read register offset 0x15
Definition: TLE5012b.cpp:378
@ TLE5012B_S3
TLE5012B_S3 fourth sensor and ditto.
Definition: TLE5012b.hpp:44
@ TLE5012B_S1
TLE5012B_S1 second sensor needs also a second CSQ.
Definition: TLE5012b.hpp:42
@ TLE5012B_S2
TLE5012B_S2 third sensor and ditto.
Definition: TLE5012b.hpp:43
@ TLE5012B_S0
TLE5012B_S0 default setting for only one sensor on the SPI.
Definition: TLE5012b.hpp:41
Definition: tle5012b_reg.hpp:35
calibrationMode_t
Automatic calibration of offset and amplitude synchronicity for applications with full-turn....
Definition: tle5012b_reg.hpp:46
interfaceType_t
List of possible interface types witch are preset by fuses and can be changed into each other.
Definition: tle5012b_reg.hpp:65
errorTypes
Error types from safety word.
Definition: tle5012b_util.hpp:73
#define MAX_REGISTER_MEM
max readable register values buffer
Definition: tle5012b_util.hpp:50
updTypes
Definition: tle5012b_util.hpp:84
#define CRC_NUM_REGISTERS
number of CRC relevant registers
Definition: tle5012b_util.hpp:49
safetyTypes
Definition: tle5012b_util.hpp:91
@ UPD_low
read normal registers
Definition: tle5012b_util.hpp:85
@ SAFE_high
switch on safety word generation
Definition: tle5012b_util.hpp:93
uint16_t command
read register beginning with REG_FSYNC
Definition: readMultipleRegisters.cpp:34