#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 | |
__STATIC_INLINE void | _UpdateTxConfig (uint32_t Source, uint32_t size) |
__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 |
uint8_t | pRxBuffer [RX_BUFFER] |
uint8_t | FirstAppBuff [APP_BUFFER] |
uint8_t | SecondAppBuff [APP_BUFFER] |
COMPILER_WORD_ALIGNED RignBuffer_t * | pUsartBuffer |
This file contains all the specific code for the usart_hw_handshaking.
Definition in file main.c.
#define BUFFER_SIZE 128 |
#define PINS_USART PIN_USART0_TXD, PIN_USART0_RXD, PIN_USART0_RTS, PIN_USART0_CTS |
__STATIC_INLINE void _ConfigureUsart | ( | uint32_t | baudrate, | |
uint32_t | rxTimeout | |||
) |
int main | ( | void | ) |
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.
Definition at line 491 of file main.c.
uint8_t FirstAppBuff[APP_BUFFER] |
volatile uint32_t mutexTimeout |