|
ChibiOS/HAL 9.0.0
|
Generated SNOR Base Driver header. More...
Go to the source code of this file.
Data Structures | |
| struct | xsnor_buffers |
| SNOR driver configuration. More... | |
| struct | xsnor_commands |
| SNOR command configuration structure. More... | |
| struct | xsnor_bus_wspi |
| WSPI-specific configuration fields. More... | |
| struct | xsnor_bus_spi |
| SPI-specific configuration fields. More... | |
| union | xsnor_bus_configs |
| Union of possible bus configurations. More... | |
| struct | xsnor_config |
| SNOR driver configuration. More... | |
| struct | hal_xsnor_base_vmt |
Class hal_xsnor_base_c virtual methods table. More... | |
| struct | hal_xsnor_base |
| Structure representing a XSNOR base driver class. More... | |
Macros | |
| #define | FLASH_ATTR_SPI_4BYTES_ADDR_HINT 0x00008000U |
| Hint to use 4 bytes addresses in SPI protocol. | |
| #define | XSNOR_USE_BOTH ((XSNOR_USE_SPI == TRUE) && (XSNOR_USE_WSPI == TRUE)) |
This switch is TRUE if both SPI and WSPI are in use. | |
Bus type and width options | |
| #define | XSNOR_BUS_MODE_SPI 0U |
| #define | XSNOR_BUS_MODE_WSPI_1LINE 1U |
| #define | XSNOR_BUS_MODE_WSPI_2LINES 2U |
| #define | XSNOR_BUS_MODE_WSPI_4LINES 3U |
| #define | XSNOR_BUS_MODE_WSPI_8LINES 4U |
Configuration options | |
| #define | XSNOR_BUFFER_SIZE 32 |
| Non-cacheable operations buffer. | |
| #define | XSNOR_USE_SPI TRUE |
| SPI support enable switch. | |
| #define | XSNOR_USE_WSPI TRUE |
| WSPI support enable switch. | |
| #define | XSNOR_SHARED_BUS TRUE |
| Bus share support enable switch. | |
Bus mutex macros when sharing is disabled | |
| #define | __xsnor_bus_acquire(self) |
| #define | __xsnor_bus_release(self) |
Typedefs | |
| typedef struct xsnor_buffers | xsnor_buffers_t |
| Type of a non-cacheable buffer. | |
| typedef struct xsnor_config | xsnor_config_t |
| Type of a SNOR configuration structure. | |
| typedef struct xsnor_commands | xsnor_commands_t |
| Type of a commands configuration structure. | |
Class @p hal_xsnor_base_c structures | |
| typedef struct hal_xsnor_base | hal_xsnor_base_c |
| Type of a XSNOR base driver class. | |
Functions | |
Methods implementations of hal_xsnor_base_c | |
| void * | __xsnor_objinit_impl (void *ip, const void *vmt) |
| Implementation of object creation. | |
| void | __xsnor_dispose_impl (void *ip) |
| Implementation of object finalization. | |
Regular methods of hal_xsnor_base_c | |
| void | __xsnor_spi_cmd_addr (void *ip, uint32_t cmd, flash_offset_t offset) |
| Sends command and address over SPI. | |
| void | __xsnor_bus_acquire (void *ip) |
| Bus acquisition and lock. | |
| void | __xsnor_bus_release (void *ip) |
| Bus release and unlock. | |
| void | __xsnor_bus_cmd (void *ip, uint32_t cmd) |
| Sends a naked command. | |
| void | __xsnor_bus_cmd_send (void *ip, uint32_t cmd, size_t n, const uint8_t *p) |
| Sends a command followed by a data transmit phase. | |
| void | __xsnor_bus_cmd_receive (void *ip, uint32_t cmd, size_t n, uint8_t *p) |
| Sends a command followed by a data receive phase. | |
| void | __xsnor_bus_cmd_addr (void *ip, uint32_t cmd, flash_offset_t offset) |
| Sends a command followed by a flash address. | |
| void | __xsnor_bus_cmd_addr_send (void *ip, 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 | __xsnor_bus_cmd_addr_receive (void *ip, 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 | __xsnor_bus_cmd_dummy_receive (void *ip, 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 | __xsnor_bus_cmd_addr_dummy_receive (void *ip, uint32_t cmd, flash_offset_t offset, uint32_t dummy, size_t n, uint8_t *p) |
| Sends a complete header followed by a data receive phase. | |
| flash_error_t | xsnorStart (void *ip, const xsnor_config_t *config) |
| Configures and activates a SNOR driver. | |
| void | xsnorStop (void *ip) |
| Deactivates a SNOR driver. | |
| flash_error_t | xsnorMemoryMap (void *ip, uint8_t **addrp) |
| Enters the memory mapped mode. | |
| void | xsnorMemoryUnmap (void *ip) |
| Leaves the memory mapped mode. | |
Virtual methods of hal_xsnor_base_c | |
| static CC_FORCE_INLINE flash_error_t | xsnor_device_init (void *ip) |
| static CC_FORCE_INLINE flash_error_t | xsnor_device_read (void *ip, flash_offset_t offset, size_t n, uint8_t *rp) |
| Read operation. | |
| static CC_FORCE_INLINE flash_error_t | xsnor_device_program (void *ip, flash_offset_t offset, size_t n, const uint8_t *pp) |
| Program operation. | |
| static CC_FORCE_INLINE flash_error_t | xsnor_device_start_erase_all (void *ip) |
| Starts a whole-device erase operation. | |
| static CC_FORCE_INLINE flash_error_t | xsnor_device_start_erase_sector (void *ip, flash_sector_t sector) |
| Starts an sector erase operation. | |
| static CC_FORCE_INLINE flash_error_t | xsnor_device_query_erase (void *ip, unsigned *msec) |
| Queries the driver for erase operation progress. | |
| static CC_FORCE_INLINE flash_error_t | xsnor_device_verify_erase (void *ip, flash_sector_t sector) |
| Returns the erase state of a sector. | |
| static CC_FORCE_INLINE flash_error_t | xsnor_device_mmap_on (void *ip, uint8_t **addrp) |
| static CC_FORCE_INLINE void | xsnor_device_mmap_off (void *ip) |
Generated SNOR Base Driver header.
Definition in file hal_xsnor_base.h.