SPI Device API (#304)
* spi device config * fix api_interrupt_call warning * added configs for spi2 bus devices * simplified spi bus api * use new spi device api
This commit is contained in:
@@ -26,7 +26,7 @@ bool hal_gpio_read_sd_detect(void) {
|
||||
const GpioPin* sd_cs_record = &sd_cs_gpio;
|
||||
|
||||
// TODO: SPI manager
|
||||
api_hal_spi_lock(&SPI_SD_HANDLE);
|
||||
api_hal_spi_lock(sd_fast_spi.spi);
|
||||
|
||||
// configure pin as input
|
||||
gpio_init_ex(sd_cs_record, GpioModeInput, GpioPullUp, GpioSpeedVeryHigh);
|
||||
@@ -41,7 +41,7 @@ bool hal_gpio_read_sd_detect(void) {
|
||||
delay(1);
|
||||
|
||||
// TODO: SPI manager
|
||||
api_hal_spi_unlock(&SPI_SD_HANDLE);
|
||||
api_hal_spi_unlock(sd_fast_spi.spi);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user