mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 03:50:02 +03:00
PICO: Build changes (makefiles, headers).
PICO.mk updates, tidy-ups, allow for PICO_trace platform_mcu.h #include "pico.h" rather than messing around with addressmap.h (can do since including as system headers now). PICO/target/RP2350[AB]/target.h undef USE_MSP_DISPLAYPORT because won't compile debug when USE_MSP_DISPLAYPORT defined without USE_OSD.
This commit is contained in:
parent
c46c3825a0
commit
f07cb9cc27
7 changed files with 529 additions and 43 deletions
|
@ -21,7 +21,13 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define _ADDRESSMAP_H
|
||||
#include "RP2350.h"
|
||||
|
||||
#include "pico.h"
|
||||
#include "pico/stdlib.h"
|
||||
#include "hardware/spi.h"
|
||||
#include "hardware/dma.h"
|
||||
#include "hardware/flash.h"
|
||||
|
||||
#define NVIC_PriorityGroup_2 0x500
|
||||
|
||||
|
@ -31,17 +37,6 @@
|
|||
#define SPI_IO_AF_SDI_CFG 0
|
||||
#define SPI_IO_CS_CFG 0
|
||||
|
||||
// Register address offsets for atomic RMW aliases
|
||||
#define REG_ALIAS_RW_BITS (_u(0x0) << _u(12))
|
||||
#define REG_ALIAS_XOR_BITS (_u(0x1) << _u(12))
|
||||
#define REG_ALIAS_SET_BITS (_u(0x2) << _u(12))
|
||||
#define REG_ALIAS_CLR_BITS (_u(0x3) << _u(12))
|
||||
|
||||
#include "RP2350.h"
|
||||
#include "pico/stdlib.h"
|
||||
#include "hardware/spi.h"
|
||||
#include "hardware/dma.h"
|
||||
|
||||
#if defined(RP2350A) || defined(RP2350B)
|
||||
|
||||
typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
|
||||
|
@ -55,7 +50,7 @@ typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
|
|||
#define DMA_TypeDef void*
|
||||
#define DMA_InitTypeDef void*
|
||||
//#define DMA_Channel_TypeDef
|
||||
#define SPI_TypeDef SPI0_Type
|
||||
|
||||
#define ADC_TypeDef void*
|
||||
#define USART_TypeDef uart_inst_t
|
||||
#define TIM_OCInitTypeDef void*
|
||||
|
@ -70,9 +65,12 @@ typedef enum {DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
|
|||
//#define EXTI_InitTypeDef
|
||||
//#define IRQn_Type void*
|
||||
|
||||
// We have to use SPI0_Type (or void) because config will pass in SPI0, SPI1,
|
||||
// which are defined in pico-sdk as SPI0_Type*.
|
||||
// SPI_INST converts to the correct type for use in pico-sdk functions.
|
||||
#define SPI_TypeDef SPI0_Type
|
||||
#define SPI_INST(spi) ((spi_inst_t *)(spi))
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#define DMA_DATA_ZERO_INIT
|
||||
|
@ -106,7 +104,6 @@ extern uint32_t systemUniqueId[3];
|
|||
#define UART_TX_BUFFER_ATTRIBUTE
|
||||
#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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue