Browse Source

lm4f: Implement DMA enable/disable functions for the UART

Add basic rx/tx_dma_enable/disable functionality.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
pull/112/merge
Alexandru Gagniuc 12 years ago
committed by Piotr Esden-Tempski
parent
commit
5507e14cd4
  1. 28
      lib/lm4f/uart.c

28
lib/lm4f/uart.c

@ -517,24 +517,44 @@ void uart_clear_interrupt_flag(u32 uart, enum uart_interrupt_flag ints)
*/
/**@{*/
/**
* \brief Enable the UART Receive DMA.
*
* @param[in] uart UART block register address base @ref uart_reg_base
*/
void uart_enable_rx_dma(u32 uart)
{
/* TODO: this is just a stub. */
UART_DMACTL(uart) |= UART_DMACTL_RXDMAE;
}
/**
* \brief Disable the UART Receive DMA.
*
* @param[in] uart UART block register address base @ref uart_reg_base
*/
void uart_disable_rx_dma(u32 uart)
{
/* TODO: this is just a stub. */
UART_DMACTL(uart) &= ~UART_DMACTL_RXDMAE;
}
/**
* \brief Enable the UART Transmit DMA.
*
* @param[in] uart UART block register address base @ref uart_reg_base
*/
void uart_enable_tx_dma(u32 uart)
{
/* TODO: this is just a stub. */
UART_DMACTL(uart) |= UART_DMACTL_TXDMAE;
}
/**
* \brief Disable the UART Transmit DMA.
*
* @param[in] uart UART block register address base @ref uart_reg_base
*/
void uart_disable_tx_dma(u32 uart)
{
/* TODO: this is just a stub. */
UART_DMACTL(uart) &= ~UART_DMACTL_TXDMAE;
}
/**@}*/

Loading…
Cancel
Save