![]() |
PDK API Guide for J721E
|
ClockP interface
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... | |
Functions | |
| 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... | |
Typedefs | |
| 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... | |
Enumerations | |
| enum | ClockP_Status { ClockP_OK = 0, ClockP_FAILURE = (-(int32_t)1) } |
| Status codes for ClockP APIs. More... | |
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... | |
| #define | ClockP_StartMode_USER ((uint8_t) 0U) |
| #define | ClockP_StartMode_AUTO ((uint8_t) 1U) |
| #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 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 |
| enum ClockP_Status |
| 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 |