![]() |
Contiki-NG
|
Implementation of a generic external SPI flash driver. More...
#include "contiki.h"#include "dev/storage/ext-flash/ext-flash.h"#include "dev/spi.h"#include "gpio-hal.h"#include "sys/log.h"#include <stdint.h>#include <stdbool.h>Go to the source code of this file.
Functions | |
| static const spi_device_t * | get_spi_conf (const spi_device_t *conf) |
| Get spi configuration, return default configuration if NULL. | |
| static bool | select_on_bus (const spi_device_t *flash_spi_configuration) |
| Clear external flash CSN line. | |
| static void | deselect (const spi_device_t *flash_spi_configuration) |
| Set external flash CSN line. | |
| static bool | wait_ready (const spi_device_t *flash_spi_configuration) |
| Wait till previous erase/program operation completes. | |
| static uint8_t | verify_part (const spi_device_t *flash_spi_configuration) |
| Verify the flash part. | |
| static bool | power_down (const spi_device_t *flash_spi_configuration) |
| Put the device in power save mode. | |
| static bool | power_standby (const spi_device_t *flash_spi_configuration) |
| Take device out of power save mode and prepare it for normal operation. | |
| static bool | write_enable (const spi_device_t *flash_spi_configuration) |
| Enable write. | |
| bool | ext_flash_open (const spi_device_t *conf) |
| Initialize storage driver. | |
| bool | ext_flash_close (const spi_device_t *conf) |
| Close the storage driver. | |
| bool | ext_flash_read (const spi_device_t *conf, uint32_t offset, uint32_t length, uint8_t *buf) |
| Read storage content. | |
| bool | ext_flash_write (const spi_device_t *conf, uint32_t offset, uint32_t length, const uint8_t *buf) |
| Write to storage sectors. | |
| bool | ext_flash_erase (const spi_device_t *conf, uint32_t offset, uint32_t length) |
| Erase storage sectors corresponding to the range. | |
| bool | ext_flash_init (const spi_device_t *conf) |
| Initialise the external flash. | |
Implementation of a generic external SPI flash driver.
Definition in file ext-flash.c.