drivers/memory/spiflash: Change from hard-coded soft SPI to generic SPI.
The SPI flash driver now supports using an arbitrary SPI object to
communicate with the flash chip, and in particular can use a hardware SPI
peripheral.
diff --git a/drivers/memory/spiflash.h b/drivers/memory/spiflash.h
index 967352b..cd96b16 100644
--- a/drivers/memory/spiflash.h
+++ b/drivers/memory/spiflash.h
@@ -30,8 +30,7 @@
typedef struct _mp_spiflash_t {
mp_hal_pin_obj_t cs;
- // TODO replace with generic SPI object
- mp_machine_soft_spi_obj_t spi;
+ mp_obj_base_t *spi; // object must have protocol pointing to mp_machine_spi_p_t struct
} mp_spiflash_t;
void mp_spiflash_init(mp_spiflash_t *self);