RTEMS
5.0.0
|
#include "chip.h"
Go to the source code of this file.
Data Structures | |
struct | UartChannel |
usart Transfer Request prepared by the application upper layer. More... | |
struct | UartDma |
Macros | |
#define | UARTD_ERROR 1 |
#define | UARTD_ERROR_LOCK 2 |
Typedefs | |
typedef void(* | UartdCallback) (uint8_t, void *) |
Functions | |
uint32_t | UARTD_Configure (UartDma *pUartd, uint8_t uartId, uint32_t uartMode, uint32_t baud, uint32_t clk) |
Initializes the UartDma structure and the corresponding UART & DMA . hardware select value. The driver will uses DMA channel 0 for RX and DMA channel 1 for TX. The DMA channels are freed automatically when no UART command processing. More... | |
uint32_t | UARTD_EnableTxChannels (UartDma *pUartd, UartChannel *pTxCh) |
This function initialize the appropriate DMA channel for Tx channel of UART. More... | |
uint32_t | UARTD_EnableRxChannels (UartDma *pUartd, UartChannel *pRxCh) |
This function initialize the appropriate DMA channel for Rx channel of UART. More... | |
uint32_t | UARTD_DisableTxChannels (UartDma *pUartd, UartChannel *pTxCh) |
This function disables the appropriate DMA channel for Tx channel of USART. More... | |
uint32_t | UARTD_DisableRxChannels (UartDma *pUartd, UartChannel *pRxCh) |
This function disables the appropriate DMA channel for Rx channel of USART. More... | |
uint32_t | UARTD_SendData (UartDma *pUartd) |
Starts a UART master transfer. This is a non blocking function. It will return as soon as the transfer is started. More... | |
uint32_t | UARTD_RcvData (UartDma *pUartd) |
Starts a UART master transfer. This is a non blocking function. It will return as soon as the transfer is started. More... | |
Implementation of UART driver, transfer data through DMA.
#define UARTD_ERROR 1 |
An unspecified error has occurred.
#define UARTD_ERROR_LOCK 2 |
UART driver is currently in use.
typedef void(* UartdCallback) (uint8_t, void *) |
UART transfer complete callback.
uint32_t UARTD_Configure | ( | UartDma * | pUartd, |
uint8_t | uartId, | ||
uint32_t | uartMode, | ||
uint32_t | baud, | ||
uint32_t | clk | ||
) |
Initializes the UartDma structure and the corresponding UART & DMA . hardware select value. The driver will uses DMA channel 0 for RX and DMA channel 1 for TX. The DMA channels are freed automatically when no UART command processing.
pUartd | Pointer to a UartDma instance. |
pUartHw | Associated UART peripheral. |
uartId | UART peripheral identifier. |
uartMode | UART peripheral identifier.* |
baud | UART baud rate |
clk | UART ref clock |
pXdmad | Pointer to a Dmad instance. |
uint32_t UARTD_DisableRxChannels | ( | UartDma * | pUartd, |
UartChannel * | pRxCh | ||
) |
This function disables the appropriate DMA channel for Rx channel of USART.
pUsartd | Pointer to a UsartDma instance. |
pRxCh | Pointer to TxChannel configuration |
uint32_t UARTD_DisableTxChannels | ( | UartDma * | pUartd, |
UartChannel * | pTxCh | ||
) |
This function disables the appropriate DMA channel for Tx channel of USART.
pUsartd | Pointer to a USARTDma instance. |
pTxCh | Pointer to TxChannel configuration |
uint32_t UARTD_EnableRxChannels | ( | UartDma * | pUartd, |
UartChannel * | pRxCh | ||
) |
This function initialize the appropriate DMA channel for Rx channel of UART.
pUartd | Pointer to a UartDma instance. |
pRxCh | Pointer to TxChannel configuration |
uint32_t UARTD_EnableTxChannels | ( | UartDma * | pUartd, |
UartChannel * | pTxCh | ||
) |
This function initialize the appropriate DMA channel for Tx channel of UART.
pUartd | Pointer to a UartDma instance. |
pTxCh | Pointer to RxChannel configuration |
uint32_t UARTD_RcvData | ( | UartDma * | pUartd | ) |
Starts a UART master transfer. This is a non blocking function. It will return as soon as the transfer is started.
pUartd | Pointer to a UartDma instance. |
uint32_t UARTD_SendData | ( | UartDma * | pUartd | ) |
Starts a UART master transfer. This is a non blocking function. It will return as soon as the transfer is started.
pUartd | Pointer to a UartDma instance. |