circuitpython/drivers/memory
Damien George 86fe73beb9 drivers/memory/spiflash: Move cache buffer to user-provided config.
This patch removes the global cache variables from the SPI flash driver and
now requires the user to provide the cache memory themselves, via the SPI
flash configuration struct.  This allows to either have a shared cache for
multiple SPI flash devices (by sharing a mp_spiflash_cache_t struct), or
have a single cache per device (or a mix of these options).

To configure the cache use:

    mp_spiflash_cache_t spi_bdev_cache;

    const mp_spiflash_config_t spiflash_config =
        // any bus options
        .cache = &spi_bdev_cache,
    };
2018-06-14 16:52:56 +10:00
..
spiflash.c drivers/memory/spiflash: Move cache buffer to user-provided config. 2018-06-14 16:52:56 +10:00
spiflash.h drivers/memory/spiflash: Move cache buffer to user-provided config. 2018-06-14 16:52:56 +10:00