Macros | |
#define | PDCA_CHANNEL_USART_EXAMPLE 0 |
The channel instance for the USART example, here PDCA channel 0 (highest priority). More... | |
Functions | |
int | main (void) |
The given example is a transfer of an ASCII animation stored in internal flash to the USART_0 output (57600 bps/8 data bits/no parity bit/1 stop bit/no flow control) More... | |
static void | pdca_set_irq (void) |
The PDCA interrupt handler. More... | |
Variables | |
volatile bool | animation_high_section = false |
Counter for interrupt test. More... | |
const char | ascii_anim1 [] |
String for ASCII animation: this is the first part of the ASCII animation. More... | |
const char | ascii_anim2 [] |
String for ASCII animation: this is the second and final part of the ASCII animation. More... | |
#define PDCA_CHANNEL_USART_EXAMPLE 0 |
The channel instance for the USART example, here PDCA channel 0 (highest priority).
Referenced by main().
int main | ( | void | ) |
The given example is a transfer of an ASCII animation stored in internal flash to the USART_0 output (57600 bps/8 data bits/no parity bit/1 stop bit/no flow control)
This example uses the USART, GPIO, INTC and PDCA modules.
References ascii_anim1, AVR32_PDCA_PID_USART_TX, usart_options_t::baudrate, EXAMPLE_USART, EXAMPLE_USART_RX_FUNCTION, EXAMPLE_USART_RX_PIN, EXAMPLE_USART_TX_FUNCTION, EXAMPLE_USART_TX_PIN, gpio_enable_module(), PDCA_CHANNEL_USART_EXAMPLE, pdca_enable(), pdca_enable_interrupt_reload_counter_zero(), pdca_init_channel(), pdca_set_irq(), PDCA_TRANSFER_SIZE_BYTE, pdca_channel_options_t::pid, sleepmgr_enter_sleep(), SLEEPMGR_IDLE, sleepmgr_init(), sleepmgr_lock_mode(), sysclk_get_peripheral_bus_hz(), sysclk_init(), USART_1_STOPBIT, usart_init_rs232(), USART_NO_PARITY, USART_NORMAL_CHMODE, and usart_write_line().
|
static |
The PDCA interrupt handler.
The handler reload the PDCA settings with the correct ASCII animation address and size using the reload register. The interrupt will happen each time half of the animation is played.Init interrupt controller and register pdca_int_handler interrupt.
References Enable_global_interrupt.
Referenced by main().
const char ascii_anim1[] |
String for ASCII animation: this is the first part of the ASCII animation.
Referenced by main().
const char ascii_anim2[] |
String for ASCII animation: this is the second and final part of the ASCII animation.