RTCDRV timer API definition. More...
#include <stdint.h>
#include <stdbool.h>
#include "ecode.h"
#include "rtcdrv_config.h"
Go to the source code of this file.
Defines | |
#define | ECODE_EMDRV_RTCDRV_OK ( ECODE_OK ) |
Success return value. | |
#define | ECODE_EMDRV_RTCDRV_ALL_TIMERS_USED ( ECODE_EMDRV_RTCDRV_BASE | 0x00000001 ) |
No timers available. | |
#define | ECODE_EMDRV_RTCDRV_ILLEGAL_TIMER_ID ( ECODE_EMDRV_RTCDRV_BASE | 0x00000002 ) |
Illegal timer id. | |
#define | ECODE_EMDRV_RTCDRV_TIMER_NOT_ALLOCATED ( ECODE_EMDRV_RTCDRV_BASE | 0x00000003 ) |
Timer is not allocated. | |
#define | ECODE_EMDRV_RTCDRV_PARAM_ERROR ( ECODE_EMDRV_RTCDRV_BASE | 0x00000004 ) |
Illegal input parameter. | |
#define | ECODE_EMDRV_RTCDRV_TIMER_NOT_RUNNING ( ECODE_EMDRV_RTCDRV_BASE | 0x00000005 ) |
Timer is not running. | |
Typedefs | |
typedef uint32_t | RTCDRV_TimerID_t |
Timer ID. | |
typedef void(* | RTCDRV_Callback_t )(RTCDRV_TimerID_t id, void *user) |
Typedef for the user supplied callback function which is called when a timer elapse. | |
Enumerations | |
enum | RTCDRV_TimerType_t { rtcdrvTimerTypeOneshot = 0, rtcdrvTimerTypePeriodic = 1 } |
Timer type enumerator. More... | |
Functions | |
Ecode_t | RTCDRV_AllocateTimer (RTCDRV_TimerID_t *id) |
Allocate timer. | |
Ecode_t | RTCDRV_DeInit (void) |
Deinitialize RTCDRV driver. | |
Ecode_t | RTCDRV_Delay (uint32_t ms) |
Millisecond delay function. | |
Ecode_t | RTCDRV_FreeTimer (RTCDRV_TimerID_t id) |
Free timer. | |
Ecode_t | RTCDRV_Init (void) |
Initialize RTCDRV driver. | |
Ecode_t | RTCDRV_IsRunning (RTCDRV_TimerID_t id, bool *isRunning) |
Check if a given timer is running. | |
Ecode_t | RTCDRV_StartTimer (RTCDRV_TimerID_t id, RTCDRV_TimerType_t type, uint32_t timeout, RTCDRV_Callback_t callback, void *user) |
Start a timer. | |
Ecode_t | RTCDRV_StopTimer (RTCDRV_TimerID_t id) |
Stop a given timer. | |
Ecode_t | RTCDRV_TimeRemaining (RTCDRV_TimerID_t id, uint32_t *timeRemaining) |
Get time left before a given timer expires. | |
uint32_t | RTCDRV_GetWallClock (void) |
Get wallclock time. | |
Ecode_t | RTCDRV_SetWallClock (uint32_t secs) |
Set wallclock time. |
RTCDRV timer API definition.
(C) Copyright 2014 Silicon Labs, http://www.silabs.com
This file is licensensed under the Silabs License Agreement. See the file "Silabs_License_Agreement.txt" for details. Before using this software for any purpose, you must agree to the terms of that agreement.
Definition in file rtcdriver.h.