Files | |
| file | ClockP.h |
| Clock module for the RTOS Porting Interface. This implements the software timer support. For hardware timer support, please check TimerP.h. | |
Data Structures | |
| struct | ClockP_Params |
| Basic ClockP Parameters. More... | |
Variables | |
| void * | ClockP_Params::pErrBlk |
| uint8_t | ClockP_Params::startMode |
| uint32_t | ClockP_Params::period |
| uint8_t | ClockP_Params::runMode |
| void * | ClockP_Params::arg |
Status codes for ClockP APIs | |
| typedef int32_t | ClockP_Status |
| Status codes for ClockP APIs. More... | |
| #define | ClockP_OK ((int32_t) 0) |
| #define | ClockP_FAILURE ((int32_t) (-1)) |
Timer runtime modes for ClockP APIs | |
| typedef uint8_t | ClockP_RunMode |
| This enumerator defines the Timer runtime modes. More... | |
| #define | ClockP_RunMode_ONESHOT ((uint8_t) 0U) |
| #define | ClockP_RunMode_CONTINUOUS ((uint8_t) 1U) |
Timer start modes for ClockP APIs | |
| 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... | |
| #define | ClockP_StartMode_USER ((uint8_t) 0U) |
| #define | ClockP_StartMode_AUTO ((uint8_t) 1U) |
ClockP interface
| #define ClockP_OK ((int32_t) 0) |
API completed successfully
| #define ClockP_FAILURE ((int32_t) (-1)) |
API failed
| #define ClockP_RunMode_ONESHOT ((uint8_t) 0U) |
Timer runs for a single period values and stops
| #define ClockP_RunMode_CONTINUOUS ((uint8_t) 1U) |
Timer is periodic and runs continuously
| #define ClockP_StartMode_USER ((uint8_t) 0U) |
Timer will be started by the user
| #define ClockP_StartMode_AUTO ((uint8_t) 1U) |
Timer starts automatically after create or scheduler start
| typedef int32_t ClockP_Status |
Status codes for ClockP APIs.
| typedef uint8_t ClockP_RunMode |
This enumerator defines the Timer runtime modes.
| typedef uint8_t ClockP_StartMode |
This enumerator defines the Timer start modes.
| typedef void* ClockP_Handle |
Opaque client reference to an instance of a ClockP.
A ClockP_Handle returned from the ClockP_create represents that instance and is used in the other instance based functions
| typedef void(* ClockP_FxnCallback) (void *args) |
Callback that is called when the clock expires.
| args | [in] user specific argument pointer that was passed via ClockP_Params |
| void ClockP_Params_init | ( | ClockP_Params * | params | ) |
Initialize params structure to default values.
| params | Pointer to the instance configuration parameters. |
| ClockP_Handle ClockP_create | ( | ClockP_FxnCallback | clockfxn, |
| const ClockP_Params * | params | ||
| ) |
Function to create a clock.
| clockfxn | Function pointer of the clock function ClockP_FxnCallback. |
| params | Pointer to the instance configuration parameters. |
| ClockP_Status ClockP_delete | ( | ClockP_Handle | handle | ) |
Function to delete a clock.
| handle | A ClockP_Handle returned from ClockP_create |
| ClockP_Status ClockP_start | ( | ClockP_Handle | handle | ) |
Function to start a clock.
| handle | A ClockP_Handle returned from ClockP_create |
| ClockP_Status ClockP_stop | ( | ClockP_Handle | handle | ) |
Function to stop a clock.
| handle | A ClockP_Handle returned from ClockP_create |
| void* ClockP_Params::pErrBlk |
Pointer to the error block for clock create
| uint8_t ClockP_Params::startMode |
Timer Start Mode ClockP_StartMode
| uint32_t ClockP_Params::period |
The clock period in units of clock ticks
| uint8_t ClockP_Params::runMode |
Timer Run Mode ClockP_RunMode
| void* ClockP_Params::arg |
User argument that is available inside the callback