Z-Stack API Reference
3.2.0
|
Clock_Handle | Util_constructClock (Clock_Struct *pClock, Clock_FuncPtr clockCB, uint32_t clockDuration, uint32_t clockPeriod, uint8_t startFlag, UArg arg) |
Initialize a TIRTOS Clock instance. More... | |
void | Util_startClock (Clock_Struct *pClock) |
Start a clock. More... | |
bool | Util_isClockActive (Clock_Struct *pClock) |
Determine if a clock is currently active. More... | |
void | Util_stopClock (Clock_Struct *pClock) |
Stop a clock. More... | |
void | Util_uint16toa (uint16_t u, char *string) |
Converts from a uint16 to ascii hex string. The # will be exactly 4 hex digits (e.g. 0x0000 or 0x1E3F). NULL terminates the string. More... | |
void | Util_itoa (uint16_t num, uint8_t *buf, uint8_t radix) |
convert a 16bit number to ASCII More... | |
unsigned char * | Util_ltoa (uint32_t l, uint8_t *buf, uint8_t radix) |
convert a long unsigned int to a string. More... | |
Clock and miscellaneous string conversion functions.
Clock_Handle Util_constructClock | ( | Clock_Struct * | pClock, |
Clock_FuncPtr | clockCB, | ||
uint32_t | clockDuration, | ||
uint32_t | clockPeriod, | ||
uint8_t | startFlag, | ||
UArg | arg | ||
) |
Initialize a TIRTOS Clock instance.
pClock | - pointer to clock instance structure. |
clockCB | - callback function upon clock expiration. |
clockDuration | - longevity of clock timer in milliseconds |
clockPeriod | - duration of a periodic clock, used continuously after clockDuration expires. |
startFlag | - TRUE to start immediately, FALSE to wait. |
arg | - argument passed to callback function. |
Initialize a TIRTOS Clock instance.
Public function defined in util.h
bool Util_isClockActive | ( | Clock_Struct * | pClock | ) |
Determine if a clock is currently active.
pClock | - pointer to clock struct |
Determine if a clock is currently active.
Public function defined in util.h
void Util_itoa | ( | uint16_t | num, |
uint8_t * | buf, | ||
uint8_t | radix | ||
) |
convert a 16bit number to ASCII
num | - number to convert |
buf | - buffer to write ASCII |
radix | - base to convert to (ie. 10 or 16) |
Convert a 16bit number to ASCII
Public function defined in util.h
unsigned char* Util_ltoa | ( | uint32_t | l, |
uint8_t * | buf, | ||
uint8_t | radix | ||
) |
convert a long unsigned int to a string.
l | - long to convert |
buf | - buffer to convert to |
radix | - 10 dec, 16 hex |
Convert a long unsigned int to a string.
Public function defined in util.h
void Util_startClock | ( | Clock_Struct * | pClock | ) |
Start a clock.
pClock | - pointer to clock struct |
Start a clock.
Public function defined in util.h
void Util_stopClock | ( | Clock_Struct * | pClock | ) |
Stop a clock.
pClock | - pointer to clock struct |
Stop a clock.
Public function defined in util.h
void Util_uint16toa | ( | uint16_t | u, |
char * | string | ||
) |
Converts from a uint16 to ascii hex string. The # will be exactly 4 hex digits (e.g. 0x0000 or 0x1E3F). NULL terminates the string.
u | - Number to be converted |
string | - pointer to coverted string |
Converts from a uint16 to ascii hex string.
Public function defined in util.h