AST example driver for AVR32 UC3.
Copyright (c) 2009-2018 Microchip Technology Inc. and its subsidiaries.
#include <avr32/io.h>
#include "intc.h"
#include "board.h"
#include "ast.h"
#include "usart.h"
#include "gpio.h"
#include "power_clocks_lib.h"
Macros | |
USART Settings | |
#define | EXAMPLE_USART (&AVR32_USART2) |
#define | EXAMPLE_USART_RX_PIN AVR32_USART2_RXD_0_1_PIN |
#define | EXAMPLE_USART_RX_FUNCTION AVR32_USART2_RXD_0_1_FUNCTION |
#define | EXAMPLE_USART_TX_PIN AVR32_USART2_TXD_0_1_PIN |
#define | EXAMPLE_USART_TX_FUNCTION AVR32_USART2_TXD_0_1_FUNCTION |
#define | FPBA FOSC0 |
Functions | |
int | main (void) |
main function : do init and loop (poll if configured so) More... | |
static char * | print_i (char *str, int n) |
print_i function : convert the given number to an ASCII decimal representation. More... | |
#define EXAMPLE_USART (&AVR32_USART2) |
Referenced by main().
#define EXAMPLE_USART_RX_FUNCTION AVR32_USART2_RXD_0_1_FUNCTION |
Referenced by main().
#define EXAMPLE_USART_RX_PIN AVR32_USART2_RXD_0_1_PIN |
Referenced by main().
#define EXAMPLE_USART_TX_FUNCTION AVR32_USART2_TXD_0_1_FUNCTION |
Referenced by main().
#define EXAMPLE_USART_TX_PIN AVR32_USART2_TXD_0_1_PIN |
Referenced by main().
int main | ( | void | ) |
main function : do init and loop (poll if configured so)
References ast_enable(), ast_get_calendar_value(), ast_init_calendar(), AST_OSC_32KHZ, AST_PSEL_32KHZ_1HZ, usart_options_t::baudrate, EXAMPLE_USART, EXAMPLE_USART_RX_FUNCTION, EXAMPLE_USART_RX_PIN, EXAMPLE_USART_TX_FUNCTION, EXAMPLE_USART_TX_PIN, ast_calendar_t::FIELD, FOSC0, FPBA, gpio_enable_module(), gpio_tgl_gpio_pin(), LED0_GPIO, scif_osc32_opt_t::mode, OSC0_STARTUP, pcl_configure_clocks(), PCL_OSC0, pcl_switch_to_osc(), print_i(), SCIF_OSC_MODE_2PIN_CRYSTAL, SCIF_OSC_MODE_2PIN_CRYSTAL_HICUR, scif_start_osc32(), scif_osc32_opt_t::startup, USART_1_STOPBIT, usart_init_rs232(), USART_NO_PARITY, and usart_write_line().
|
static |
print_i function : convert the given number to an ASCII decimal representation.
Referenced by main().