объявляются два экземпляра spi по номеру железного spi, по дефолту используется тот, что задан для каждой платы

This commit is contained in:
klassents committed 2025-05-26 19:09:41 +07:00
1 parent 2a561ad0ed
commit 90b42b9fac
6 files changed
+44 -36

No files matched your search

+9 -8
View File
@@ -144,6 +144,7 @@ HAL_TIMER32_CHANNEL_IndexTypeDef pwmPinToTimerChannel(uint32_t digPinNumber);
// SPI
#define SPI_COMMON_QTY 2
#define DEFAULT_SPI SPI1
#define PIN_SPI_SS P1_3
#define PIN_SPI_MOSI P1_1
@@ -154,14 +155,14 @@ 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 PIN_SPI1_SS P0_3
#define PIN_SPI1_MOSI P0_1
#define PIN_SPI1_MISO P0_0
#define PIN_SPI1_SCK P0_2
static const uint8_t SS1 = PIN_SPI1_SS;
static const uint8_t MOSI1 = PIN_SPI1_MOSI;
static const uint8_t MISO1 = PIN_SPI1_MISO;
static const uint8_t SCK1 = PIN_SPI1_SCK;
#define PIN_SPI0_SS P0_3
#define PIN_SPI0_MOSI P0_1
#define PIN_SPI0_MISO P0_0
#define PIN_SPI0_SCK P0_2
static const uint8_t SS0 = PIN_SPI0_SS;
static const uint8_t MOSI0 = PIN_SPI0_MOSI;
static const uint8_t MISO0 = PIN_SPI0_MISO;
static const uint8_t SCK0 = PIN_SPI0_SCK;
// check if pwm is used on spi pins
void spi_onBegin(uint8_t spiNum);