#include "board.h"
#include "..\..\..\..\utils\utility.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "..\..\..\..\utils\md5\md5.h"
Go to the source code of this file.
Data Structures |
struct | RignBuffer_t |
Defines |
#define | FULL_DUPLEX |
#define | BUFFER_SIZE 128 |
#define | PINS_USART PIN_USART0_TXD, PIN_USART0_RXD, PIN_USART0_RTS, PIN_USART0_CTS |
#define | BASE_USART USART0 |
#define | BASE_USART_IRQ USART0_IRQn |
#define | ID_USART ID_USART0 |
#define | USART_Interrupt USART0_Handler |
#define | USART_TX_TIMEOUT 5000 |
#define | USART_DMA_LLI 10 |
#define | APP_BUFFER ( 100*1024) |
#define | RX_BUFFER ( BUFFER_SIZE * USART_DMA_LLI ) |
#define | MIN_FREE_BYTES ( BUFFER_SIZE * (USART_DMA_LLI-1) ) |
#define | MAX_FREE_BYTES ( BUFFER_SIZE * (USART_DMA_LLI-2) ) |
#define | XDMA_NVIC_PRIO 1 |
#define | USART_NVIC_PRIO 3 |
#define | TC_NVIC_PRIO 4 |
Functions |
| COMPILER_ALIGNED (32) |
__STATIC_INLINE void | FlushTxBuffer (uint32_t TxBytesLeft) |
| Send the rest of the data in buffer if it is less than 100KB.
|
__STATIC_INLINE void | _UpdateCount (void) |
| This function updates the Count variable of ring buffer.
|
void | XDMAC_Handler (void) |
| xDMA interrupt handler.
|
void | USART_Interrupt (void) |
| USART interrupt routine to serve Timeout interrupts from USART.
|
__STATIC_INLINE void | _initCircularBuffer (RignBuffer_t *pBuff) |
| Initialize circular buffer.
|
__STATIC_INLINE void | _ConfigureUsart (uint32_t baudrate, uint32_t rxTimeout) |
| USART hardware handshaking configuration.
|
int | main (void) |
| usart-hw-handshaking Application entry point..
|
Variables |
const Pin | pins [] = {PINS_USART} |
volatile uint32_t | mutexTimeout |
volatile uint8_t | semaphore = 0 |
volatile uint32_t | dmaflush = 0 |
volatile uint32_t | TimeOutTimer = 0 |
Detailed Description
This file contains all the specific code for the usart_hw_handshaking.
Definition in file main.c.
Define Documentation
#define BASE_USART USART0 |
Register base for USART
Definition at line 139 of file main.c.
#define BASE_USART_IRQ USART0_IRQn |
Register base for USART
Definition at line 142 of file main.c.
Size of the receive buffer used by the DMA, in bytes.
Definition at line 133 of file main.c.
#define ID_USART ID_USART0 |
ID for USART
Definition at line 145 of file main.c.
#define PINS_USART PIN_USART0_TXD, PIN_USART0_RXD, PIN_USART0_RTS, PIN_USART0_CTS |
Pins for USART
Definition at line 136 of file main.c.
Function Documentation
__STATIC_INLINE void _ConfigureUsart |
( |
uint32_t |
baudrate, |
|
|
uint32_t |
rxTimeout | |
|
) |
| | |
USART hardware handshaking configuration.
Configures USART in hardware handshaking mode, asynchronous, 8 bits, 1 stop bit, no parity, 115200 baud rates and enables its transmitter and receiver.
Definition at line 342 of file main.c.
Ring buffer
Definition at line 210 of file main.c.
usart-hw-handshaking Application entry point..
Configures USART in hardware handshaking mode and Timer Counter 0 to generate an interrupt every second. Then, start the first transfer on the USART and wait in an endless loop.
- Returns:
- Unused (ANSI-C compatibility).
Definition at line 490 of file main.c.
Variable Documentation
Number of bytes received between two timer ticks.
Definition at line 199 of file main.c.
Pins to configure for the application.
Definition at line 196 of file main.c.