Microchip® Advanced Software Framework

pdca_usart_example.c File Reference

Peripheral DMA Controller Example for SAM4L.

Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.

#include "asf.h"
#include "stdio_serial.h"
#include "conf_board.h"
#include "ascii_anim1.h"
#include "ascii_anim2.h"

Macros

#define PDCA_TX_CHANNEL   0
 
#define STRING_EOL   "\r"
 
#define STRING_HEADER
 

Functions

static void configure_console (void)
 Configure UART console. More...
 
int main (void)
 Application entry point for pdca_usart example. More...
 
static void pdca_tranfer_done (enum pdca_channel_status status)
 Interrupt handler for UART interrupt. More...
 

Variables

const char ascii_anim1 []
 
const char ascii_anim2 []
 
volatile int bool_anim = 1
 
static const pdca_channel_config_t pdca_tx_configs
 

#define PDCA_TX_CHANNEL   0

Referenced by main(), and pdca_tranfer_done().

#define STRING_EOL   "\r"
#define STRING_HEADER
Value:
"-- PDCA_USART Example --\r\n" \
"-- "BOARD_NAME" --\r\n" \
"-- Compiled: "__DATE__" "__TIME__" --"STRING_EOL
#define BOARD_NAME
Definition: inc/app_init.h:140
#define STRING_EOL
Definition: pdca_usart_example.c:80

Referenced by main().

static void configure_console ( void  )
static

Configure UART console.

References uart_rs232_options::baudrate, and stdio_serial_init().

Referenced by main().

int main ( void  )

Application entry point for pdca_usart example.

Returns
Unused (ANSI-C compatibility).

References board_init(), configure_console(), pdca_channel_enable(), pdca_channel_set_callback(), pdca_channel_set_config(), pdca_enable(), pdca_tranfer_done(), PDCA_TX_CHANNEL, STRING_HEADER, and sysclk_init().

static void pdca_tranfer_done ( enum pdca_channel_status  status)
static

Interrupt handler for UART interrupt.

References ascii_anim1, ascii_anim2, bool_anim, PDCA_CH_TRANSFER_COMPLETED, pdca_channel_write_reload(), and PDCA_TX_CHANNEL.

Referenced by main().

const char ascii_anim1[]
Initial value:
=
# 90 "/Jenkins/workspace/check-IS-asf-main-build-doxygen-linux-idc/source/sam/drivers/pdca/pdca_usart_example/pdca_usart_example.c" 2

Referenced by pdca_tranfer_done().

const char ascii_anim2[]
Initial value:
=
# 98 "/Jenkins/workspace/check-IS-asf-main-build-doxygen-linux-idc/source/sam/drivers/pdca/pdca_usart_example/pdca_usart_example.c" 2

Referenced by pdca_tranfer_done().

volatile int bool_anim = 1

Referenced by pdca_tranfer_done().

const pdca_channel_config_t pdca_tx_configs
static
Initial value:
= {
.addr = (void *)ascii_anim1,
.pid = PDCA_PID_USART_TX,
.size = sizeof(ascii_anim1),
.r_addr = 0,
.r_size = 0,
.etrig = false,
.ring = false,
.transfer_size = PDCA_MR_SIZE_BYTE
}
const char ascii_anim1[]
Definition: pdca_usart_example.c:89

Referenced by init_pdca(), and lcdca_automated_char_start().