RTEMS
5.1
|
#include "chip.h"
#include "string.h"
#include "stdlib.h"
Functions | |
uint32_t | USARTD_Configure (UsartDma *pUsartd, uint8_t usartId, uint32_t UsartMode, uint32_t BaudRate, uint32_t UsartClk) |
Initializes the USARTDma structure and the corresponding USART & 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 USART command processing. More... | |
uint32_t | USARTD_EnableRxChannels (UsartDma *pUsartd, UsartChannel *pRxCh) |
This function initialize the appropriate DMA channel for Rx channel of USART. More... | |
uint32_t | USARTD_EnableTxChannels (UsartDma *pUsartd, UsartChannel *pTxCh) |
This function initialize the appropriate DMA channel for Tx channel of USART. More... | |
uint32_t | USARTD_DisableRxChannels (UsartDma *pUsartd, UsartChannel *pRxCh) |
This function disables the appropriate DMA channel for Rx channel of USART. More... | |
uint32_t | USARTD_DisableTxChannels (UsartDma *pUsartd, UsartChannel *pTxCh) |
This function disables the appropriate DMA channel for Tx channel of USART. More... | |
uint32_t | USARTD_SendData (UsartDma *pUsartd) |
Starts a USART master transfer. This is a non blocking function. It will return as soon as the transfer is started. More... | |
uint32_t | USARTD_RcvData (UsartDma *pUsartd) |
Starts a USART master transfer. This is a non blocking function. It will return as soon as the transfer is started. More... | |
Implementation for the USART with xDMA driver.
uint32_t USARTD_Configure | ( | UsartDma * | pUsartd, |
uint8_t | usartId, | ||
uint32_t | UsartMode, | ||
uint32_t | BaudRate, | ||
uint32_t | UsartClk | ||
) |
Initializes the USARTDma structure and the corresponding USART & 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 USART command processing.
pUSARTD | Pointer to a UsartDma instance. |
pUsartHw | Associated USART peripheral. |
usartId | USART peripheral identifier. |
UsartClk | USART clock. |
pXdmad | Pointer to a Dmad instance. |
uint32_t USARTD_DisableRxChannels | ( | UsartDma * | pUsartd, |
UsartChannel * | 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 USARTD_DisableTxChannels | ( | UsartDma * | pUsartd, |
UsartChannel * | 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 USARTD_EnableRxChannels | ( | UsartDma * | pUsartd, |
UsartChannel * | pRxCh | ||
) |
This function initialize the appropriate DMA channel for Rx channel of USART.
pUsartd | Pointer to a UsartDma instance. |
pRxCh | Pointer to TxChannel configuration |
uint32_t USARTD_EnableTxChannels | ( | UsartDma * | pUsartd, |
UsartChannel * | pTxCh | ||
) |
This function initialize the appropriate DMA channel for Tx channel of USART.
pUsartd | Pointer to a USARTDma instance. |
pTxCh | Pointer to TxChannel configuration |
uint32_t USARTD_RcvData | ( | UsartDma * | pUsartd | ) |
Starts a USART master transfer. This is a non blocking function. It will return as soon as the transfer is started.
pUSARTD | Pointer to a USARTDma instance. |
uint32_t USARTD_SendData | ( | UsartDma * | pUsartd | ) |
Starts a USART master transfer. This is a non blocking function. It will return as soon as the transfer is started.
pUSARTD | Pointer to a USARTDma instance. |