#include <string.h>
#include "board.h"
#include "print_funcs.h"
#include "gpio.h"
#include "power_clocks_lib.h"
#include "usart.h"
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 |
#define | FPBA FOSC0 |
#define | EXAMPLE_USART_CLOCK_MASK AVR32_USART1_CLK_PBA |
#define | NB_TOGGLE 512 |
int32_t | toggle_led (uint32_t number_of_toggles) |
Toggle LED. More... | |
static void | configure_hmatrix (uint32_t mode) |
Initializes the HSB bus matrix. More... | |
int | main (void) |
The main function. More... | |
#define EXAMPLE_USART (&AVR32_USART1) |
Referenced by main(), and toggle_led().
#define EXAMPLE_USART_CLOCK_MASK AVR32_USART1_CLK_PBA |
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().
#define NB_TOGGLE 512 |
Referenced by main().
|
static |
int main | ( | void | ) |
The main function.
References usart_options_t::baudrate, configure_hmatrix(), EXAMPLE_USART, EXAMPLE_USART_CLOCK_MASK, EXAMPLE_USART_RX_FUNCTION, EXAMPLE_USART_RX_PIN, EXAMPLE_USART_TX_FUNCTION, EXAMPLE_USART_TX_PIN, FOSC0, FPBA, gpio_enable_module(), NB_TOGGLE, pcl_configure_clocks(), pcl_dfll_freq_param, pcl_disable_module, PCL_OSC0, pcl_switch_to_osc(), print(), print_ulong(), SLEEP, toggle_led(), USART_1_STOPBIT, usart_gpio_map, usart_init_rs232(), USART_NO_PARITY, usart_options, usart_tx_empty(), and usart_write_line().
int32_t toggle_led | ( | uint32_t | number_of_toggles | ) |
Toggle LED.
References EXAMPLE_USART, Get_system_register, i, print(), and print_ulong().
Referenced by main().