Definition in file qt60168_controller_init.h.
#include "compiler.h"
#include "controller.h"
Go to the source code of this file.
Functions | |
void | rtc_init_qt (void) |
unsigned short | special_qt60168_get_all_key () |
void rtc_init_qt | ( | void | ) |
Definition at line 116 of file qt60168_controller_init.c.
References rtc_irq().
Referenced by controller_init().
00116 { 00117 00118 // Disable all interrupts. */ 00119 Disable_global_interrupt(); 00120 00121 // Register the RTC interrupt handler to the interrupt controller. 00122 INTC_register_interrupt(&rtc_irq, AVR32_RTC_IRQ, AVR32_INTC_INT0); 00123 00124 // Initialize the RTC 00125 // Frtc = 1024Hz 00126 rtc_init(&AVR32_RTC, RTC_OSC_32KHZ, 4); 00127 00128 // Set top value to 0 to generate an interrupt every seconds */ 00129 rtc_set_top_value(&AVR32_RTC, 1); 00130 // Enable the interrupts 00131 rtc_enable_interrupt(&AVR32_RTC); 00132 00133 // Enable the RTC 00134 rtc_enable(&AVR32_RTC); 00135 00136 // Enable global interrupts 00137 Enable_global_interrupt(); 00138 00139 }
unsigned short special_qt60168_get_all_key | ( | ) |