ChibiOS/HAL 9.0.0
|
Serial NOR driver header. More...
Go to the source code of this file.
Data Structures | |
struct | SNORConfig |
Type of a SNOR configuration structure. More... | |
struct | SNORDriverVMT |
SNOR virtual methods table. More... | |
struct | snor_nocache_buffer |
struct | SNORDriver |
Type of SNOR flash class. More... |
Macros | |
#define | SNOR_BUFFER_SIZE 32 |
Size of the buffer for internal operations. | |
#define | BUSConfig SPIConfig |
#define | BUSDriver SPIDriver |
#define | _snor_flash_methods_alone |
SNORDriver specific methods. | |
#define | _snor_flash_methods |
SNORDriver specific methods with inherited ones. | |
#define | bus_acquire(busp, config) |
#define | bus_release(busp) |
Bus interface modes. | |
#define | SNOR_BUS_DRIVER_SPI 0U |
#define | SNOR_BUS_DRIVER_WSPI 1U |
Configuration options | |
#define | SNOR_BUS_DRIVER SNOR_BUS_DRIVER_WSPI |
Physical transport interface. | |
#define | SNOR_SHARED_BUS TRUE |
Shared bus switch. | |
#define | SNOR_USE_MUTUAL_EXCLUSION TRUE |
Exclusive access control. | |
#define | SNOR_SPI_4BYTES_ADDRESS FALSE |
SPI 4-bytes address switch. |
Typedefs | |
typedef struct snor_nocache_buffer | snor_nocache_buffer_t |
Functions | |
void | bus_acquire (BUSDriver *busp, const BUSConfig *config) |
Bus acquisition and lock. | |
void | bus_release (BUSDriver *busp) |
Bus release. | |
void | bus_cmd (BUSDriver *busp, uint32_t cmd) |
Sends a naked command. | |
void | bus_cmd_send (BUSDriver *busp, uint32_t cmd, size_t n, const uint8_t *p) |
Sends a command followed by a data transmit phase. | |
void | bus_cmd_receive (BUSDriver *busp, uint32_t cmd, size_t n, uint8_t *p) |
Sends a command followed by a data receive phase. | |
void | bus_cmd_addr (BUSDriver *busp, uint32_t cmd, flash_offset_t offset) |
Sends a command followed by a flash address. | |
void | bus_cmd_addr_send (BUSDriver *busp, uint32_t cmd, flash_offset_t offset, size_t n, const uint8_t *p) |
Sends a command followed by a flash address and a data transmit phase. | |
void | bus_cmd_addr_receive (BUSDriver *busp, uint32_t cmd, flash_offset_t offset, size_t n, uint8_t *p) |
Sends a command followed by a flash address and a data receive phase. | |
void | bus_cmd_dummy_receive (BUSDriver *busp, uint32_t cmd, uint32_t dummy, size_t n, uint8_t *p) |
Sends a command followed by dummy cycles and a data receive phase. | |
void | bus_cmd_addr_dummy_receive (BUSDriver *busp, uint32_t cmd, flash_offset_t offset, uint32_t dummy, size_t n, uint8_t *p) |
Sends a command followed by a flash address, dummy cycles and a data receive phase. | |
void | snorObjectInit (SNORDriver *devp, snor_nocache_buffer_t *nocache) |
Initializes an instance. | |
void | snorStart (SNORDriver *devp, const SNORConfig *config) |
Configures and activates SNOR driver. | |
void | snorStop (SNORDriver *devp) |
Deactivates the SNOR driver. | |
void | snorMemoryMap (SNORDriver *devp, uint8_t **addrp) |
Enters the memory Mapping mode. | |
void | snorMemoryUnmap (SNORDriver *devp) |
Leaves the memory Mapping mode. |
Serial NOR driver header.
Definition in file hal_serial_nor.h.