Serial Bridge.
Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
#include <inttypes.h>
#include <asf.h>
Macros | |
#define | USART_BUFFER_MAX (2 * 1024) |
Functions | |
void | configure_usart (uint32_t baud_rate) |
Initialize USART module. More... | |
void | usart_stream_move (uint32_t offset) |
Move back USART buffer. More... | |
int | usart_stream_read (uint8_t **data, uint32_t *size) |
Read data from USART module. More... | |
void | usart_stream_reset (void) |
Clear USART buffer and flush USART module. More... | |
void | usart_stream_write (uint8_t data) |
Write one byte of data. More... | |
void | usart_stream_write_buffer (uint8_t *data, uint32_t size) |
Write multiple bytes of data. More... | |
#define USART_BUFFER_MAX (2 * 1024) |
Referenced by usart_read_block_handler().
void configure_usart | ( | uint32_t | baud_rate | ) |
Initialize USART module.
baud_rate | Baudrate of USART. |
void usart_stream_move | ( | uint32_t | offset | ) |
Move back USART buffer.
offset | Size of data to remove. |
int usart_stream_read | ( | uint8_t ** | data, |
uint32_t * | size | ||
) |
Read data from USART module.
data | Pointer to USART buffer. |
data | Pointer to USART buffer size. |
void usart_stream_reset | ( | void | ) |
Clear USART buffer and flush USART module.
void usart_stream_write | ( | uint8_t | data | ) |
Write one byte of data.
data | Data to send. |
void usart_stream_write_buffer | ( | uint8_t * | data, |
uint32_t | size | ||
) |
Write multiple bytes of data.
data | Pointer to data to send. |
size | Size of data. |