Prep SPI SDCard support

This commit is contained in:
Theo Arends 2021-01-04 15:03:56 +01:00
parent fb2c10cb97
commit 928f6f9447
26 changed files with 34 additions and 6 deletions

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -777,6 +777,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -774,6 +774,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 - DC"
#define D_SENSOR_SSD1331_CS "SSD1331 - CS"
#define D_SENSOR_SSD1331_DC "SSD1331 - DC"
#define D_SENSOR_SDCARD_CS "SDCard - CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "А"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "А"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "A"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "安"

View File

@ -778,6 +778,7 @@
#define D_SENSOR_ST7789_DC "ST7789 DC"
#define D_SENSOR_SSD1331_CS "SSD1331 CS"
#define D_SENSOR_SSD1331_DC "SSD1331 DC"
#define D_SENSOR_SDCARD_CS "SDCard CS"
// Units
#define D_UNIT_AMPERE "安培"

View File

@ -142,6 +142,7 @@ enum UserSelectablePins {
GPIO_RA8876_CS,
GPIO_ST7789_CS, GPIO_ST7789_DC,
GPIO_SSD1331_CS, GPIO_SSD1331_DC,
GPIO_SDCARD_CS,
GPIO_SENSOR_END };
enum ProgramSelectablePins {
@ -304,6 +305,7 @@ const char kSensorNames[] PROGMEM =
D_SENSOR_RA8876_CS "|"
D_SENSOR_ST7789_CS "|" D_SENSOR_ST7789_DC "|"
D_SENSOR_SSD1331_CS "|" D_SENSOR_SSD1331_DC "|"
D_SENSOR_SDCARD_CS "|"
;
const char kSensorNamesFixed[] PROGMEM =
@ -374,12 +376,9 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_RC522_CS), // RC522 Rfid Chip Select
AGPIO(GPIO_RC522_RST), // RC522 Rfid Reset
#endif
#ifdef USE_DISPLAY
#ifdef USE_DISPLAY_ILI9341
AGPIO(GPIO_ILI9341_CS),
AGPIO(GPIO_ILI9341_DC),
#endif // USE_DISPLAY_ILI9341
#endif // USE_DISPLAY
#ifdef USE_SDCARD
AGPIO(GPIO_SDCARD_CS),
#endif // USE_SDCARD
#endif // USE_SPI
AGPIO(GPIO_SSPI_MISO), // Software SPI Master Input Client Output
AGPIO(GPIO_SSPI_MOSI), // Software SPI Master Output Client Input
@ -387,6 +386,10 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_SSPI_CS), // Software SPI Chip Select
AGPIO(GPIO_SSPI_DC), // Software SPI Data or Command
#ifdef USE_DISPLAY
#ifdef USE_DISPLAY_ILI9341
AGPIO(GPIO_ILI9341_CS),
AGPIO(GPIO_ILI9341_DC),
#endif // USE_DISPLAY_ILI9341
#ifdef USE_DISPLAY_ILI9488
AGPIO(GPIO_ILI9488_CS),
#endif // USE_DISPLAY_ILI9488