FreeRTOS:
Common I/O
AWS IoT Common I/O library
|
Return to main page ↑ |
This file contains all the Timer HAL API definitions. More...
Go to the source code of this file.
Macros | |
#define | IOT_TIMER_SUCCESS ( 0 ) |
Return values used by timer driver. More... | |
#define | IOT_TIMER_INVALID_VALUE ( 1 ) |
#define | IOT_TIMER_FUNCTION_NOT_SUPPORTED ( 2 ) |
#define | IOT_TIMER_NOT_RUNNING ( 3 ) |
#define | IOT_TIMER_SET_FAILED ( 4 ) |
Typedefs | |
typedef struct IotTimerDescriptor * | IotTimerHandle_t |
IotTimerHandle_t type is the timer handle returned by calling iot_timer_open() this is initialized in open and returned to caller. Caller must pass this pointer to the rest of the APIs. | |
typedef void(* | IotTimerCallback_t) (void *pvUserContext) |
timer callback notification type. This callback is used for notifying the caller when the setup timer expires. More... | |
Functions | |
IotTimerHandle_t | iot_timer_open (int32_t lTimerInstance) |
iot_timer_open is used to initialize the timer. This function will start the timer. More... | |
void | iot_timer_set_callback (IotTimerHandle_t const pxTimerHandle, IotTimerCallback_t xCallback, void *pvUserContext) |
iot_timer_set_callback is used to set the callback to be called when the timer reaches the count (delay) set by the caller. Callers can set the delay using the iot_timer_delay API. More... | |
int32_t | iot_timer_start (IotTimerHandle_t const pxTimerHandle) |
iot_timer_start is used to start the timer counter. This call only makes the timer counter running, and does not setup any match values etc.. More... | |
int32_t | iot_timer_stop (IotTimerHandle_t const pxTimerHandle) |
iot_timer_stop is used to stop the timer counter if the timer is running. More... | |
int32_t | iot_timer_get_value (IotTimerHandle_t const pxTimerHandle, uint64_t *ullMicroSeconds) |
iot_timer_get_value is used to get the current timer value in micro seconds. More... | |
int32_t | iot_timer_delay (IotTimerHandle_t const pxTimerHandle, uint32_t ulDelayMicroSeconds) |
iot_timer_delay is used to set up a delay/wake-up time in microseconds. The caller can use this API to delay current execution until the specified microSeconds. A callback is called once the delay is expired (i,e the amount of microseconds is passed from the time the API is called). If no callback is registered by the caller, then once the delay is expired, caller cannot be notified, but this mechanism can be useful to wake up the target from sleep. More... | |
int32_t | iot_timer_cancel (IotTimerHandle_t const pxTimerHandle) |
iot_timer_cancel is used to cancel any existing delay call. If a call to iot_timer_delay() was made earlier, calling iot_timer_cancel will cancel that delay call, so no call-back will be called. More... | |
int32_t | iot_timer_close (IotTimerHandle_t const pxTimerHandle) |
iot_timer_close is used to de-initializes the timer, stops the timer if it was started and cancels the delay calls, and resets the timer value. More... | |
This file contains all the Timer HAL API definitions.