SAM USART Quick Start.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
#include <stdio.h>
Macros | |
#define | MAX_RX_BUFFER_LENGTH 5 |
[module_inst] More... | |
Functions | |
void | configure_usart (void) |
[callback_funcs] More... | |
void | configure_usart_callbacks (void) |
int | main (void) |
[setup] More... | |
void | usart_read_callback (struct usart_module *const usart_module) |
[rx_buffer_var] More... | |
void | usart_write_callback (struct usart_module *const usart_module) |
Variables | |
volatile uint8_t | rx_buffer [MAX_RX_BUFFER_LENGTH] |
struct usart_module | usart_instance |
[module_inst] More... | |
#define MAX_RX_BUFFER_LENGTH 5 |
void configure_usart | ( | void | ) |
[callback_funcs]
[setup]
[setup_config]
[setup_config] [setup_config_defaults]
[setup_config_defaults]
[setup_change_config]
[setup_set_config]
[setup_set_config]
[setup_enable]
[setup_enable]
void configure_usart_callbacks | ( | void | ) |
[setup_register_callbacks]
[setup_register_callbacks]
[setup_enable_callbacks]
[setup_enable_callbacks]
References USART_CALLBACK_BUFFER_RECEIVED, USART_CALLBACK_BUFFER_TRANSMITTED, usart_enable_callback(), usart_instance, usart_read_callback(), usart_register_callback(), and usart_write_callback().
Referenced by main().
int main | ( | void | ) |
[setup]
[setup_init]
[setup_init]
[main] [enable_global_interrupts]
[enable_global_interrupts]
[main_send_string]
[main_send_string]
[main_loop]
[main_loop] [main_read]
[main_read]
[main]
References configure_usart(), configure_usart_callbacks(), MAX_RX_BUFFER_LENGTH, rx_buffer, system_init(), system_interrupt_enable_global(), usart_instance, usart_read_buffer_job(), and usart_write_buffer_wait().
void usart_read_callback | ( | struct usart_module *const | usart_module | ) |
[rx_buffer_var]
[callback_funcs]
References MAX_RX_BUFFER_LENGTH, rx_buffer, usart_instance, and usart_write_buffer_job().
Referenced by configure_usart_callbacks().
void usart_write_callback | ( | struct usart_module *const | usart_module | ) |
References port_pin_toggle_output_level().
Referenced by configure_usart_callbacks().
volatile uint8_t rx_buffer[MAX_RX_BUFFER_LENGTH] |
Referenced by main(), and usart_read_callback().
struct usart_module usart_instance |
[module_inst]