Clock module for the RTOS Porting Interface. This implements the software timer support. For hardware timer support, please check TimerP.h. More...
#include <stdint.h>#include <stdbool.h>#include <stddef.h>Go to the source code of this file.
Data Structures | |
| struct | ClockP_Params |
| Basic ClockP Parameters. More... | |
Status codes for ClockP APIs | |
| #define | ClockP_OK ((int32_t) 0) |
| #define | ClockP_FAILURE ((int32_t) (-1)) |
| typedef int32_t | ClockP_Status |
| Status codes for ClockP APIs. More... | |
Timer runtime modes for ClockP APIs | |
| #define | ClockP_RunMode_ONESHOT ((uint8_t) 0U) |
| #define | ClockP_RunMode_CONTINUOUS ((uint8_t) 1U) |
| typedef uint8_t | ClockP_RunMode |
| This enumerator defines the Timer runtime modes. More... | |
Timer start modes for ClockP APIs | |
| #define | ClockP_StartMode_USER ((uint8_t) 0U) |
| #define | ClockP_StartMode_AUTO ((uint8_t) 1U) |
| typedef uint8_t | ClockP_StartMode |
| This enumerator defines the Timer start modes. More... | |
| typedef void * | ClockP_Handle |
| Opaque client reference to an instance of a ClockP. More... | |
| typedef void(* | ClockP_FxnCallback) (void *args) |
| Callback that is called when the clock expires. More... | |
| void | ClockP_Params_init (ClockP_Params *params) |
| Initialize params structure to default values. More... | |
| ClockP_Handle | ClockP_create (ClockP_FxnCallback clockfxn, const ClockP_Params *params) |
| Function to create a clock. More... | |
| ClockP_Status | ClockP_delete (ClockP_Handle handle) |
| Function to delete a clock. More... | |
| ClockP_Status | ClockP_start (ClockP_Handle handle) |
| Function to start a clock. More... | |
| ClockP_Status | ClockP_stop (ClockP_Handle handle) |
| Function to stop a clock. More... | |
Clock module for the RTOS Porting Interface. This implements the software timer support. For hardware timer support, please check TimerP.h.
============================================================================
The ClockP module can be used to create a software (OS) timer and configure it to invoke a User callback when timer expires.
The timer can be configured as a one-shot or a continuous mode timer.