rtc.h

Go to the documentation of this file.
00001 /* This header file is part of the ATMEL AT32UC3A-SoftwareFramework-1.1.1 Release */
00002 
00003 /*This file is prepared for Doxygen automatic documentation generation.*/
00019 /* Copyright (c) 2007, Atmel Corporation All rights reserved.
00020  *
00021  * Redistribution and use in source and binary forms, with or without
00022  * modification, are permitted provided that the following conditions are met:
00023  *
00024  * 1. Redistributions of source code must retain the above copyright notice,
00025  * this list of conditions and the following disclaimer.
00026  *
00027  * 2. Redistributions in binary form must reproduce the above copyright notice,
00028  * this list of conditions and the following disclaimer in the documentation
00029  * and/or other materials provided with the distribution.
00030  *
00031  * 3. The name of ATMEL may not be used to endorse or promote products derived
00032  * from this software without specific prior written permission.
00033  *
00034  * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
00035  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00036  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
00037  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
00038  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00039  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00040  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00041  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00042  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00043  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00044  */
00045 
00046 
00047 #ifndef _RTC_H_
00048 #define _RTC_H_
00049 
00050 #include "compiler.h"
00051 #include <avr32/io.h>
00052 
00053 
00056 
00057 #define RTC_INT_GROUP   1
00058 #define RTC_INT_LINE    8
00060 
00061 
00063 
00064 #define RTC_OSC_32KHZ    1
00065 #define RTC_OSC_RC       0
00067 
00068 
00070 
00071 #define RTC_PSEL_32KHZ_1HZ    14
00072 #define RTC_PSEL_RC_1HZ       16
00074 
00075 
00090 extern int rtc_init(volatile avr32_rtc_t *rtc, unsigned char osc_type, unsigned char psel);
00091 
00096 extern void rtc_enable(volatile avr32_rtc_t *rtc);
00097 
00102 extern void rtc_disable(volatile avr32_rtc_t *rtc);
00103 
00108 extern void rtc_enable_wake_up(volatile avr32_rtc_t *rtc);
00109 
00114 extern void rtc_disable_wake_up(volatile avr32_rtc_t *rtc);
00115 
00122 extern void rtc_enable_interrupt(volatile avr32_rtc_t *rtc);
00123 
00128 extern void rtc_disable_interrupt(volatile avr32_rtc_t *rtc);
00129 
00135 extern void rtc_clear_interrupt(volatile avr32_rtc_t *rtc);
00136 
00142 extern int rtc_interrupt_enabled(volatile avr32_rtc_t *rtc);
00143 
00149 extern int rtc_is_interrupt(volatile avr32_rtc_t *rtc);
00150 
00156 extern void rtc_set_top_value(volatile avr32_rtc_t *rtc, unsigned long top);
00157 
00163 extern unsigned long rtc_get_top_value(volatile avr32_rtc_t *rtc);
00164 
00170 extern int rtc_is_busy(volatile avr32_rtc_t *rtc);
00171 
00177 extern void rtc_set_value(volatile avr32_rtc_t *rtc, unsigned long val);
00178 
00184 extern unsigned long rtc_get_value(volatile avr32_rtc_t *rtc);
00185 
00186 
00187 #endif  // _RTC_H_

Generated on Wed May 7 14:40:10 2008 for AVR32114 Using the AVR32 LCD Controller by  doxygen 1.5.3-20071008