Herzog Library 00.00.01  rel_libdev.herzog.00.00.01.10606
Data Structures | Typedefs | Enumerations | Functions
rtc_device.h File Reference
#include <stdint.h>
#include "hdf.h"

Go to the source code of this file.

Data Structures

struct  RTC_Device_t
 A structure to represent RTC device. More...
 

Typedefs

typedef void(* rtc_cb_func_t) (RTC_Device_t *dev)
 

Enumerations

enum  RTC_ALARM_t { RTC_ALARM_0, RTC_ALARM_1, RTC_ALARM_MAX }
 
enum  RTC_ALARM_MODE_t { RTC_ALARM_MODE_IDLE, RTC_ALARM_MODE_SINGLE, RTC_ALARM_MODE_REPEAT }
 

Functions

RTC_Device_tRTC_devRequest (void)
 Request A RTC Device. More...
 
int32_t RTC_devInit (RTC_Device_t *dev)
 Initialize RTC Timer. More...
 
int32_t RTC_devStop (RTC_Device_t *dev)
 Stop RTC Timer. More...
 
int32_t RTC_devStartAlarm (RTC_Device_t *dev, RTC_ALARM_t alarm, RTC_ALARM_MODE_t mode, uint32_t sec, void *cb)
 Start a Alarm Timer. More...
 
int32_t RTC_devStopAlarm (RTC_Device_t *dev, RTC_ALARM_t alarm)
 Stop a Alarm Timer. More...
 

Detailed Description

This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.

Typedef Documentation

typedef void(* rtc_cb_func_t) (RTC_Device_t *dev)

Enumeration Type Documentation

Enumerator
RTC_ALARM_MODE_IDLE 
RTC_ALARM_MODE_SINGLE 
RTC_ALARM_MODE_REPEAT 
Enumerator
RTC_ALARM_0 
RTC_ALARM_1 
RTC_ALARM_MAX 

Function Documentation

int32_t RTC_devInit ( RTC_Device_t dev)

Initialize RTC Timer.

Parameters
devThe pointer to RTC device,
Returns
0 for success or error code upon a failure.
RTC_Device_t* RTC_devRequest ( void  )

Request A RTC Device.

Returns
The pointer to the RTC device instance.

Request A RTC Device.

int32_t RTC_devStartAlarm ( RTC_Device_t dev,
RTC_ALARM_t  alarm,
RTC_ALARM_MODE_t  mode,
uint32_t  sec,
void *  cb 
)

Start a Alarm Timer.

Parameters
devThe pointer to RTC device,
alarmThe enumeration of the alarm to be started.
modeThe enumeration of alarm mode.
secThe seconds for the alarm to fire.
cbThe pointer to the call back function when the alarm fires.
Returns
0 for success or error code upon a failure.
int32_t RTC_devStop ( RTC_Device_t dev)

Stop RTC Timer.

Parameters
devThe pointer to RTC device,
Returns
0 for success or error code upon a failure.
int32_t RTC_devStopAlarm ( RTC_Device_t dev,
RTC_ALARM_t  alarm 
)

Stop a Alarm Timer.

Parameters
devThe pointer to RTC device,
alarmThe enumeration of the alarm to be started.
Returns
0 for success or error code upon a failure.