![]() |
![]() |
TI-RTOS Drivers
tidrivers_full_2_20_01_10
|
Common utility code for SensorTag.
============================================================================
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/knl/Task.h>
Go to the source code of this file.
Macros | |
#define | ST_ASSERT(cond) ST( if (!(cond)) {SensorI2C_deselect(); return false;}) |
#define | ST_ASSERT_V(cond) ST( if (!(cond)) {SensorI2C_deselect(); return;} ) |
#define | ST(x) do { x } while (__LINE__ == -1) |
#define | HI_UINT16(a) (((a) >> 8) & 0xFF) |
#define | LO_UINT16(a) ((a) & 0xFF) |
#define | SWAP(v) ((LO_UINT16(v) << 8) | HI_UINT16(v)) |
#define | DELAY_MS(i) (Task_sleep(((i) * 1000) / Clock_tickPeriod)) |
#define | DELAY_US(i) (Task_sleep(((i) * 1) / Clock_tickPeriod)) |
#define | MS_2_TICKS(ms) (((ms) * 1000) / Clock_tickPeriod) |
Functions | |
void | SensorUtil_convertToLe (uint8_t *data, uint8_t len) |
uint16_t | SensorUtil_floatToSfloat (float data) |
float | SensorUtil_sfloatToFloat (uint16_t rawData) |
uint16_t | SensorUtil_intToSfloat (int data) |
#define ST_ASSERT | ( | cond | ) | ST( if (!(cond)) {SensorI2C_deselect(); return false;}) |
#define ST_ASSERT_V | ( | cond | ) | ST( if (!(cond)) {SensorI2C_deselect(); return;} ) |
#define ST | ( | x | ) | do { x } while (__LINE__ == -1) |
#define HI_UINT16 | ( | a | ) | (((a) >> 8) & 0xFF) |
#define LO_UINT16 | ( | a | ) | ((a) & 0xFF) |
#define DELAY_MS | ( | i | ) | (Task_sleep(((i) * 1000) / Clock_tickPeriod)) |
#define DELAY_US | ( | i | ) | (Task_sleep(((i) * 1) / Clock_tickPeriod)) |
#define MS_2_TICKS | ( | ms | ) | (((ms) * 1000) / Clock_tickPeriod) |
void SensorUtil_convertToLe | ( | uint8_t * | data, |
uint8_t | len | ||
) |
uint16_t SensorUtil_floatToSfloat | ( | float | data | ) |
float SensorUtil_sfloatToFloat | ( | uint16_t | rawData | ) |
uint16_t SensorUtil_intToSfloat | ( | int | data | ) |