#include <avr32/io.h>
#include "intc.h"
#include "board.h"
#include "rtc.h"
#include "usart.h"
#include "gpio.h"
#include "pm.h"
Macros | |
USART Settings | |
#define | EXAMPLE_USART (&AVR32_USART1) |
#define | EXAMPLE_USART_RX_PIN AVR32_USART1_RXD_0_0_PIN |
#define | EXAMPLE_USART_RX_FUNCTION AVR32_USART1_RXD_0_0_FUNCTION |
#define | EXAMPLE_USART_TX_PIN AVR32_USART1_TXD_0_0_PIN |
#define | EXAMPLE_USART_TX_FUNCTION AVR32_USART1_TXD_0_0_FUNCTION |
Functions | |
int | main (void) |
main function : do init and loop (poll if configured so) More... | |
char * | print_i (char *str, unsigned int n) |
print_i function : convert the given number to an ASCII decimal representation. More... | |
void | rtc_irq (void) |
Variables | |
static volatile int | print_sec = 1 |
static int | sec = 0 |
#define EXAMPLE_USART (&AVR32_USART1) |
Referenced by main().
#define EXAMPLE_USART_RX_FUNCTION AVR32_USART1_RXD_0_0_FUNCTION |
Referenced by main().
#define EXAMPLE_USART_RX_PIN AVR32_USART1_RXD_0_0_PIN |
Referenced by main().
#define EXAMPLE_USART_TX_FUNCTION AVR32_USART1_TXD_0_0_FUNCTION |
Referenced by main().
#define EXAMPLE_USART_TX_PIN AVR32_USART1_TXD_0_0_PIN |
Referenced by main().
int main | ( | void | ) |
main function : do init and loop (poll if configured so)
References usart_options_t::baudrate, Disable_global_interrupt, Enable_global_interrupt, EXAMPLE_USART, EXAMPLE_USART_RX_FUNCTION, EXAMPLE_USART_RX_PIN, EXAMPLE_USART_TX_FUNCTION, EXAMPLE_USART_TX_PIN, FOSC0, gpio_enable_module(), INTC_init_interrupts(), INTC_register_interrupt(), OSC0_STARTUP, pm_switch_to_osc0(), print_i(), print_sec, rtc_enable(), rtc_enable_interrupt(), rtc_init(), rtc_irq(), RTC_OSC_32KHZ, RTC_PSEL_32KHZ_1HZ, rtc_set_top_value(), sec, USART_1_STOPBIT, usart_init_rs232(), USART_NO_PARITY, and usart_write_line().
char* print_i | ( | char * | str, |
unsigned int | n | ||
) |
print_i function : convert the given number to an ASCII decimal representation.
Referenced by main().
void rtc_irq | ( | void | ) |
References print_sec, rtc_clear_interrupt(), and sec.
Referenced by main().