mirror of
https://github.com/apache/nuttx.git
synced 2026-09-02 07:03:04 +00:00
SAMV7 Cut'n'paste Errors; CONFIG_SAMV7_XDMAC, not CONFIG_SAMV7_DMAC0/1
This commit is contained in:
parent
7fa4e4daab
commit
dec9742df4
2 changed files with 5 additions and 8 deletions
|
|
@ -87,13 +87,13 @@
|
|||
|
||||
#ifdef CONFIG_SAMV7_SPI_DMA
|
||||
|
||||
# if defined(CONFIG_SAMV7_SPI0_MASTER) && defined(CONFIG_SAMV7_DMAC0)
|
||||
# if defined(CONFIG_SAMV7_SPI0_MASTER) && defined(CONFIG_SAMV7_XDMAC)
|
||||
# define SAMV7_SPI0_DMA true
|
||||
# else
|
||||
# define SAMV7_SPI0_DMA false
|
||||
# endif
|
||||
|
||||
# if defined(CONFIG_SAMV7_SPI1_MASTER) && defined(CONFIG_SAMV7_DMAC1)
|
||||
# if defined(CONFIG_SAMV7_SPI1_MASTER) && defined(CONFIG_SAMV7_XDMAC)
|
||||
# define SAMV7_SPI1_DMA true
|
||||
# else
|
||||
# define SAMV7_SPI1_DMA false
|
||||
|
|
|
|||
|
|
@ -2982,17 +2982,14 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/* Allocate DMA channels. These allocations exploit that fact that
|
||||
* SSC0 is managed by DMAC0 and SSC1 is managed by DMAC1. Hence,
|
||||
* the SSC number (sscno) is the same as the DMAC number.
|
||||
*/
|
||||
/* Allocate DMA channels. */
|
||||
|
||||
#ifdef SSC_HAVE_RX
|
||||
if (priv->rxenab)
|
||||
{
|
||||
/* Allocate an RX DMA channel */
|
||||
|
||||
priv->rx.dma = sam_dmachannel(priv->sscno, dmaflags);
|
||||
priv->rx.dma = sam_dmachannel(0, dmaflags);
|
||||
if (!priv->rx.dma)
|
||||
{
|
||||
i2sdbg("ERROR: Failed to allocate the RX DMA channel\n");
|
||||
|
|
@ -3015,7 +3012,7 @@ static int ssc_dma_allocate(struct sam_ssc_s *priv)
|
|||
{
|
||||
/* Allocate a TX DMA channel */
|
||||
|
||||
priv->tx.dma = sam_dmachannel(priv->sscno, dmaflags);
|
||||
priv->tx.dma = sam_dmachannel(0, dmaflags);
|
||||
if (!priv->tx.dma)
|
||||
{
|
||||
i2sdbg("ERROR: Failed to allocate the TX DMA channel\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue