Macros | Enumerations

advanced constants More...

Macros

#define kTwiAdressDriveModule
 twi address (0x60): TWI adress of the driving module
 
#define kTwiAdressImu
 twi address (kImuAddressDefault): default device address of IMU
 
#define kTwiMaxCycleCount
 
#define kTwiLockTimeOut
 
#define kTwiWaitTimeOut
 
#define kTwiMaskRequestOnly
 bit mask: only allows to reveive data once
 
#define kTwiMaskRequestAndSend
 bit mask: only allows to send data and receive data once
 
#define kTwiMaskRequestContinuous
 bit mask: allows to continuously receive data
 
#define kTwiMaskAll
 bit mask: allows everything - receiving continuously and sending
 

Enumerations

enum  eTwiStructId
 clusters struct numbers for the internal communication (via TWI) More...
 
enum  eTwiPacketDescriptor
 clusters all packet descriptors for the communication to the driving module More...
 
enum  eTwiRegisterImu
 clusters all registers for the communication to the imu More...
 

Detailed Description

advanced constants

Macro Definition Documentation

◆ kTwiLockTimeOut

#define kTwiLockTimeOut

constant (100): maximum time in milliseconds for waiting until the twi is not locked anymore
see also twi_lock()

◆ kTwiMaxCycleCount

#define kTwiMaxCycleCount

constant (10): Maximum number of fasttick-cylces for one transfer (either sending or receiving)

◆ kTwiWaitTimeOut

#define kTwiWaitTimeOut

constant (100): maximum time in milliseconds for waiting until the twi is idle
see also twi_wait()

Enumeration Type Documentation

◆ eTwiPacketDescriptor

clusters all packet descriptors for the communication to the driving module

See also
tucbot_twi_next()
Enumerator
kTwiPdMD_Mode 

packet descriptor (0xA0): sMD_Mode

kTwiPdMD_SensLineEnable 

packet descriptor (0xA2): sMD_SensLineEnable

kTwiPdMD_Bumper 

packet descriptor (0xB0): sMD_Bumper

kTwiPdMD_Encoder 

packet descriptor (0xB1): sMD_Encoder

kTwiPdMD_EncoderClear 

packet descriptor (0xB2): sMD_EncoderClear

kTwiPdMD_SpeedRaw 

packet descriptor (0xBB): sMD_SpeedRaw

kTwiPdMD_Motor 

packet descriptor (0xA1): sMD_Motor

kTwiPdMD_SensCurrent 

packet descriptor (0xB3): sMD_SensCurrent

kTwiPdMD_SensBattery 

packet descriptor (0xB4): sMD_SensBattery

kTwiPdMD_SensLineF 

packet descriptor (0xB5): sMD_SensLineF

kTwiPdMD_SensLineM 

packet descriptor (0xB6): sMD_SensLineM

kTwiPdMD_SensLineD 

packet descriptor (0xB7): sMD_SensLineD

kTwiPdMD_DriveDist 

packet descriptor (0xA3): sMD_DriveDist

kTwiPdMD_DriveAngle 

packet descriptor (0xA4): sMD_DriveAngle

kTwiPdMD_DriveAdjust 

packet descriptor (0xA5): sMD_DriveAdjust

kTwiPdMD_DriveArc 

packet descriptor (0xA6): sMD_DriveArc

kTwiPdMD_DriveStop 

packet descriptor (0xA7): sMD_DriveStop

kTwiPdMD_State 

packet descriptor (0xB8): sMD_State

kTwiPdMD_WayAngle 

packet descriptor (0xB9): sMD_WayAngle

kTwiPdMD_Speed 

packet descriptor (0xBA): sMD_Speed

kTwiPdInvalid 

packet descriptor (0xFF): invalid packet descriptor

◆ eTwiRegisterImu

clusters all registers for the communication to the imu

See also
tucbot_twi_next()
Enumerator
kTwiRegMI_Accelerometer 

register address (kImuRegAccelX): sMI_Accelerometer

kTwiRegMI_Temperature 

register address (kImuRegTemp ): sMI_Temperature

kTwiRegMI_Gyroscope 

register address (kImuRegGyroX ): sMI_Gyroscope

kTwiRegInvalid 

register address (kTwiPdInvalid): invalid register

◆ eTwiStructId

clusters struct numbers for the internal communication (via TWI)

See also
tucbot_twi_next()
Enumerator
kTwiNrMD_Mode 

constant ( 0): struct number for sMD_Mode

kTwiNrMD_SensLineEnable 

constant ( 1): struct number for sMD_SensLineEnable

kTwiNrMD_Bumper 

constant ( 2): struct number for sMD_Bumper

kTwiNrMD_Encoder 

constant ( 3): struct number for sMD_Encoder

kTwiNrMD_EncoderClear 

constant ( 4): struct number for sMD_EncoderClear

kTwiNrMD_SpeedRaw 

constant ( 5): struct number for sMD_SpeedRaw

kTwiNrMD_Motor 

constant ( 6): struct number for sMD_Motor

kTwiNrMD_SensCurrent 

constant ( 7): struct number for sMD_SensCurrent

kTwiNrMD_SensBattery 

constant ( 8): struct number for sMD_SensBattery

kTwiNrMD_SensLineF 

constant ( 9): struct number for sMD_SensLineF

kTwiNrMD_SensLineM 

constant (10): struct number for sMD_SensLineM

kTwiNrMD_SensLineD 

constant (11): struct number for sMD_SensLineD

kTwiNrMDMaxStudent 

constant (11): maximum id of common basic struct

kTwiNrMDMinPupil 

constant (12): minimum id of pupils-only basic struct

kTwiNrMD_DriveDist 

constant (12): struct number for sMD_DriveDist - only in pupils mode

kTwiNrMD_DriveAngle 

constant (13): struct number for sMD_DriveAngle - only in pupils mode

kTwiNrMD_DriveAdjust 

constant (14): struct number for sMD_DriveAdjust - only in pupils mode

kTwiNrMD_DriveArc 

constant (15): struct number for sMD_DriveArc - only in pupils mode

kTwiNrMD_DriveStop 

constant (16): struct number for sMD_DriveStop - only in pupils mode

kTwiNrMD_State 

constant (17): struct number for sMD_State - only in pupils mode

kTwiNrMD_WayAngle 

constant (18): struct number for sMD_WayAngle - only in pupils mode

kTwiNrMD_Speed 

constant (19): struct number for sMD_Speed - only in pupils mode

kTwiNrMDMaxPupil 

constant (19): maximum id of pupils-only basic struct

kTwiNrMDMaxValid 

constant (kTwiNrMDMaxStudent or kTwiNrMDMaxPupil): maximum id of basic struct to be handled by the twi

kTwiNrMIMinValid 

constant (100): minimum id of imu struct to be handled by the twi

kTwiNrMI_Accelerometer 

constant (100): struct number for sMI_Accelerometer

kTwiNrMI_Temperature 

constant (101): struct number for sMI_Temperature

kTwiNrMI_Gyroscope 

constant (102): struct number for sMI_Gyroscope

kTwiNrMIMaxValid 

constant (102): maximum id of imu struct to be handled by the twi

kTwiNrInvalid 

constant (0xFF): invalid struct number