DM: add spi DMA to other boards and reserved channels macro
This commit is contained in:
parent
703c6dd497
commit
a278034831
8 changed files with 44 additions and 0 deletions
|
|
@ -146,6 +146,13 @@ static const uint8_t MOSI = PIN_SPI_MOSI ;
|
|||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
|
||||
#define SPI_HAS_DMA
|
||||
#define SPI_DMA_CHANNEL_RX (DMAC_CH_NUM-2)
|
||||
#define SPI_DMA_CHANNEL_TX (DMAC_CH_NUM-1)
|
||||
|
||||
#define DMAC_RESERVED_CHANNELS ((1UL << SPI_DMA_CHANNEL_RX) | \
|
||||
(1UL << SPI_DMA_CHANNEL_TX))
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -151,6 +151,13 @@ static const uint8_t MOSI = PIN_SPI_MOSI ;
|
|||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
|
||||
#define SPI_HAS_DMA
|
||||
#define SPI_DMA_CHANNEL_RX (DMAC_CH_NUM-2)
|
||||
#define SPI_DMA_CHANNEL_TX (DMAC_CH_NUM-1)
|
||||
|
||||
#define DMAC_RESERVED_CHANNELS ((1UL << SPI_DMA_CHANNEL_RX) | \
|
||||
(1UL << SPI_DMA_CHANNEL_TX))
|
||||
|
||||
|
||||
#define PIN_SPI1_MISO (36u)
|
||||
#define PIN_SPI1_MOSI (37u)
|
||||
|
|
|
|||
|
|
@ -147,6 +147,9 @@ static const uint8_t SCK = PIN_SPI_SCK ;
|
|||
#define SPI_DMA_CHANNEL_RX (DMAC_CH_NUM-2)
|
||||
#define SPI_DMA_CHANNEL_TX (DMAC_CH_NUM-1)
|
||||
|
||||
#define DMAC_RESERVED_CHANNELS ((1UL << SPI_DMA_CHANNEL_RX) | \
|
||||
(1UL << SPI_DMA_CHANNEL_TX))
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -130,6 +130,13 @@ static const uint8_t MOSI = PIN_SPI_MOSI ;
|
|||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
|
||||
#define SPI_HAS_DMA
|
||||
#define SPI_DMA_CHANNEL_RX (DMAC_CH_NUM-2)
|
||||
#define SPI_DMA_CHANNEL_TX (DMAC_CH_NUM-1)
|
||||
|
||||
#define DMAC_RESERVED_CHANNELS ((1UL << SPI_DMA_CHANNEL_RX) | \
|
||||
(1UL << SPI_DMA_CHANNEL_TX))
|
||||
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
|
|
|
|||
|
|
@ -145,6 +145,13 @@ static const uint8_t MOSI = PIN_SPI_MOSI ;
|
|||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
|
||||
#define SPI_HAS_DMA
|
||||
#define SPI_DMA_CHANNEL_RX (DMAC_CH_NUM-2)
|
||||
#define SPI_DMA_CHANNEL_TX (DMAC_CH_NUM-1)
|
||||
|
||||
#define DMAC_RESERVED_CHANNELS ((1UL << SPI_DMA_CHANNEL_RX) | \
|
||||
(1UL << SPI_DMA_CHANNEL_TX))
|
||||
|
||||
|
||||
#define PIN_SPI1_MISO (36u)
|
||||
#define PIN_SPI1_MOSI (37u)
|
||||
|
|
|
|||
|
|
@ -142,6 +142,13 @@ static const uint8_t MOSI = PIN_SPI_MOSI ;
|
|||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
static const uint8_t SCK = PIN_SPI_SCK ;
|
||||
|
||||
#define SPI_HAS_DMA
|
||||
#define SPI_DMA_CHANNEL_RX (DMAC_CH_NUM-2)
|
||||
#define SPI_DMA_CHANNEL_TX (DMAC_CH_NUM-1)
|
||||
|
||||
#define DMAC_RESERVED_CHANNELS ((1UL << SPI_DMA_CHANNEL_RX) | \
|
||||
(1UL << SPI_DMA_CHANNEL_TX))
|
||||
|
||||
/*
|
||||
* Wire Interfaces
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -155,6 +155,9 @@ static const uint8_t SCK = PIN_SPI_SCK ;
|
|||
#define SPI_DMA_CHANNEL_RX (DMAC_CH_NUM-2)
|
||||
#define SPI_DMA_CHANNEL_TX (DMAC_CH_NUM-1)
|
||||
|
||||
#define DMAC_RESERVED_CHANNELS ((1UL << SPI_DMA_CHANNEL_RX) | \
|
||||
(1UL << SPI_DMA_CHANNEL_TX))
|
||||
|
||||
#define PIN_SPI1_MISO (36u)
|
||||
#define PIN_SPI1_MOSI (37u)
|
||||
#define PIN_SPI1_SCK (38u)
|
||||
|
|
|
|||
|
|
@ -147,6 +147,9 @@ static const uint8_t ATN = PIN_ATN;
|
|||
#define SPI_DMA_CHANNEL_RX (DMAC_CH_NUM-2)
|
||||
#define SPI_DMA_CHANNEL_TX (DMAC_CH_NUM-1)
|
||||
|
||||
#define DMAC_RESERVED_CHANNELS ((1UL << SPI_DMA_CHANNEL_RX) | \
|
||||
(1UL << SPI_DMA_CHANNEL_TX))
|
||||
|
||||
static const uint8_t SS = PIN_A2 ;
|
||||
static const uint8_t MOSI = PIN_SPI_MOSI ;
|
||||
static const uint8_t MISO = PIN_SPI_MISO ;
|
||||
|
|
|
|||
Loading…
Reference in a new issue