1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

PICO: Further implementation of DMA / SPI

This commit is contained in:
blckmn 2025-04-05 13:13:23 +11:00
parent add56ec155
commit 0b376bff50
7 changed files with 164 additions and 25 deletions

View file

@ -40,6 +40,7 @@
#include "RP2350.h"
#include "pico/stdlib.h"
#include "hardware/spi.h"
#include "hardware/dma.h"
#if defined(RP2350A) || defined(RP2350B)
@ -52,7 +53,7 @@ typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
#define TIM_TypeDef void*
//#define TIM_OCInitTypeDef
#define DMA_TypeDef void*
//#define DMA_InitTypeDef
#define DMA_InitTypeDef void*
//#define DMA_Channel_TypeDef
#define SPI_TypeDef SPI0_Type
#define ADC_TypeDef void*
@ -69,6 +70,9 @@ typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
//#define EXTI_InitTypeDef
//#define IRQn_Type void*
#define SPI_INST(spi) ((spi_inst_t *)(spi))
#endif
#define DMA_DATA_ZERO_INIT
@ -103,3 +107,6 @@ extern uint32_t systemUniqueId[3];
#define UART_RX_BUFFER_ATTRIBUTE
#define MAX_SPI_PIN_SEL 4
#define SERIAL_TRAIT_PIN_CONFIG 1
#define xDMA_GetCurrDataCounter(dma_resource) (((dma_channel_hw_t *)(dma_resource))->transfer_count)