rtc_api.h File Reference

This file provides mbed RTC API. More...

`#include "device.h"`
`#include <time.h>`

## Data Structures

struct | alarm_s

## Functions

Ameba Common
void | rtc_init (void)
| Initializes the RTC device, include clock, RTC registers and function. More...
void | rtc_free (void)
| Deinitializes the RTC device. More...
int | rtc_isenabled (void)
| This function tells whether RTC is enabled or not. More...
time_t | rtc_read (void)
| Get current timestamp in seconds from RTC. More...
void | rtc_write (time_t t)
| Set the specified timestamp in seconds to RTC. More...

## AmebaZ Only

typedef void(* | alarm_irq_handler) (void)
typedef struct alarm_s | alarm_t
u32 | rtc_set_alarm (alarm_t *alrm, alarm_irq_handler alarmHandler)
| Set the specified RTC Alarm and interrupt. More...
void | rtc_disable_alarm (void)
| Disable RTC Alarm and function. More...

## Detailed Description

This file provides mbed RTC API.

mbed Microcontroller Library

Author

Version
  V1.0.0

Attention

Copyright (c) 2006-2013 ARM Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.