FL-443 Move sd card to second spi (#271)

* sd card spi 2 fix, add spi mgr
This commit is contained in:
DrZlo13
2020-12-19 17:52:17 +10:00
committed by GitHub
parent 73ecc7cde6
commit 8b6e7fd4ae
10 changed files with 127 additions and 42 deletions

View File

@@ -88,6 +88,9 @@ uint8_t u8x8_hw_spi_stm32(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_
fuprintf(log, "[u8g2] start\n");
#endif
// TODO: SPI manager
api_hal_spi_lock(&SPI_D);
// TODO change it to FuriRecord pin
HAL_GPIO_WritePin(DISPLAY_CS_GPIO_Port, DISPLAY_CS_Pin, GPIO_PIN_RESET);
asm("nop");
@@ -101,6 +104,10 @@ uint8_t u8x8_hw_spi_stm32(u8x8_t* u8x8, uint8_t msg, uint8_t arg_int, void* arg_
asm("nop");
// TODO change it to FuriRecord pin
HAL_GPIO_WritePin(DISPLAY_CS_GPIO_Port, DISPLAY_CS_Pin, GPIO_PIN_SET);
// TODO: SPI manager
api_hal_spi_unlock(&SPI_D);
break;
default: