55 #include <ti/sysbios/knl/Clock.h> 56 #include <ti/sysbios/knl/Task.h> 63 #define ST_ASSERT(cond) ST( if (!(cond)) {SensorI2C_deselect(); return false;}) 66 #define ST_ASSERT_V(cond) ST( if (!(cond)) {SensorI2C_deselect(); return;} ) 69 #define ST(x) do { x } while (__LINE__ == -1) 73 #define HI_UINT16(a) (((a) >> 8) & 0xFF) 75 #define LO_UINT16(a) ((a) & 0xFF) 77 #define SWAP(v) ((LO_UINT16(v) << 8) | HI_UINT16(v)) 81 #define DELAY_MS(i) (Task_sleep(((i) * 1000) / Clock_tickPeriod)) 83 #define DELAY_US(i) (Task_sleep(((i) * 1) / Clock_tickPeriod)) 85 #define MS_2_TICKS(ms) (((ms) * 1000) / Clock_tickPeriod) uint16_t SensorUtil_intToSfloat(int data)
Convert an integer to a short float.
void SensorUtil_convertToLe(uint8_t *pData, uint8_t nWords)
Convert 16-bit words to/from big-endian to little-endian.
uint16_t SensorUtil_floatToSfloat(float data)
Convert a float to a short float.
float SensorUtil_sfloatToFloat(uint16_t data)
Convert a short float to a float.