#include "board.h"
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
Go to the source code of this file.
Defines |
#define | BUFFER_SIZE 1000 |
#define | BAUDRATE_RS485 256000 |
#define | USART USART0 |
#define | ID_USART ID_USART0 |
#define | PIN_USART0_CTS_IOR {PIO_PB2C_CTS0, PIOB, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT} |
Functions |
| COMPILER_ALIGNED (8) |
| Configures USART in rs485 mode.
|
void | XDMAC_Handler (void) |
| xDMA interrupt handler.
|
int | main (void) |
| Application entry point.
|
Variables |
const Pin | pins [] = { PIN_USART0_RXD, PIN_USART0_TXD, PIN_USART0_CTS_IOR, PIN_USART0_RTS } |
char | palette [BUFFER_SIZE] |
Detailed Description
This file contains all the specific code for the usart_rs485 example.
Definition in file main.c.
Define Documentation
#define BAUDRATE_RS485 256000 |
baud rate
Definition at line 115 of file main.c.
size of the receive buffer used by the DMA, in bytes.
Definition at line 112 of file main.c.
#define PIN_USART0_CTS_IOR {PIO_PB2C_CTS0, PIOB, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT} |
RE for RS485
Definition at line 131 of file main.c.
Register base for USART
Definition at line 118 of file main.c.
Function Documentation
Configures USART in rs485 mode.
Transmit buffer.
Definition at line 151 of file main.c.
Application entry point.
- Returns:
- Unused (ANSI-C compatibility).
Definition at line 350 of file main.c.
Variable Documentation
Initial value:"**************************************************************************\n\r\
* This application gives an example of how to use USART in RS485 mode.\n\r\
* The USART features the RS485 mode to enable line driver control.\n\r\
* While operating in RS485 mode, the USART behaves as though in asynchronous \n\r\
* or synchronous mode and configuration of all the parameters is possible \n\r\
* \n\r\
* The difference is that the RTS pin is driven high when the transmitter\n\r\
* is operating. The behavior of the RTS pin is controlled by the TXEMPTY bit.\n\r\
* \n\r\
**************************************************************************\n\r\
"
Transmit buffer.
Definition at line 137 of file main.c.
const Pin pins[] = { PIN_USART0_RXD, PIN_USART0_TXD, PIN_USART0_CTS_IOR, PIN_USART0_RTS } |
Pins to configure for the application.
Definition at line 134 of file main.c.