refactor: SD card SPI HAL (#3957)

* refactor: SD card SPI driver

* Removed SPI and DMA StdPeriph drivers

* Allow for disabling SPI DMA support

* Disable SPI sdcard CRC support

* Fix 2MHz timer on NV14

* Shared VS1053b driver

* Fix: SPI2 uses PCLK1

* feat: new generic diskio API

* More generic SD_CARD_PRESENT()

* Fixes

* Flush incoming block on token mismatch

* Scratch buffer test

* Incredible hack to re-sync sd card

* fix: SDIO driver
This commit is contained in:
Raphael Coeffic
2023-09-23 19:31:56 +10:00
committed by GitHub
parent 870fe7eca3
commit 87df8a4f2c
61 changed files with 2697 additions and 2628 deletions
-1
View File
@@ -176,7 +176,6 @@ class ADCInputParser:
adc.gpio_pin_mosi = self.hw_defs['ADC_SPI_GPIO_PIN_MOSI']
adc.gpio_pin_sck = self.hw_defs['ADC_SPI_GPIO_PIN_SCK']
adc.gpio_pin_cs = self.hw_defs['ADC_SPI_GPIO_PIN_CS']
adc.gpio_af = self.hw_defs['ADC_SPI_GPIO_AF']
adcs.append(adc)
adc_main = self._parse_adc('MAIN', 'ADC_MAIN', 'ADC')
+7 -5
View File
@@ -49,11 +49,13 @@ static const stm32_spi_adc_t _ADC_spi[] = {
{% set inputs = adc_inputs.inputs | selectattr('adc', '==', adc.name) | selectattr('channel','defined') %}
{% set input_count = inputs | list | count %}
{
{{ adc.adc }},
{{ adc.gpio }},
{{ adc.gpio_pin_miso }} | {{ adc.gpio_pin_mosi }} | {{ adc.gpio_pin_sck }},
{{ adc.gpio_af }},
{{ adc.gpio_pin_cs }},
.spi = {
{{ adc.adc }},
{{ adc.gpio }},
{{ adc.gpio_pin_miso }} | {{ adc.gpio_pin_mosi }} | {{ adc.gpio_pin_sck }},
{{ adc.gpio }},
{{ adc.gpio_pin_cs }},
},
_ADC_{{ adc.name }}_channels,
{{ input_count }}
},