![]() |
LibDriver W25QXX
|
w25qxx basic driver modules More...
Data Structures | |
| struct | w25qxx_handle_s |
| w25qxx handle structure definition More... | |
| struct | w25qxx_info_s |
| w25qxx information structure definition More... | |
Macros | |
| #define | W25QXX_WRITE_STATUS_TIMEOUT_MS (1000U) |
| w25qxx write status register timeout definition | |
| #define | W25QXX_ERASE_CHIP_TIMEOUT_MS (1000U * 1000U) |
| w25qxx erase chip timeout definition | |
| #define | W25QXX_ERASE_SECURITY_TIMEOUT_MS (100U) |
| w25qxx erase security timeout definition | |
| #define | W25QXX_PROGRAM_SECURITY_TIMEOUT_MS (3U) |
| w25qxx program security timeout definition | |
| #define | W25QXX_PAGE_PROGRAM_TIMEOUT_MS (3U) |
| w25qxx page program timeout definition | |
| #define | W25QXX_ERASE_4K_TIMEOUT_MS (400U) |
| w25qxx erase 4k timeout definition | |
| #define | W25QXX_ERASE_32K_TIMEOUT_MS (1600U) |
| w25qxx erase 32k timeout definition | |
| #define | W25QXX_ERASE_64K_TIMEOUT_MS (2000U) |
| w25qxx erase 64k timeout definition | |
Typedefs | |
| typedef struct w25qxx_handle_s | w25qxx_handle_t |
| w25qxx handle structure definition | |
| typedef struct w25qxx_info_s | w25qxx_info_t |
| w25qxx information structure definition | |
Enumerations | |
| enum | w25qxx_type_t { W25Q10 = 0XEF10U , W25Q20 = 0XEF11U , W25Q40 = 0XEF12U , W25Q80 = 0XEF13U , W25Q16 = 0XEF14U , W25Q32 = 0XEF15U , W25Q64 = 0XEF16U , W25Q128 = 0XEF17U , W25Q256 = 0XEF18U , W25Q512 = 0XEF19U , W25Q01 = 0XEF20U , W25Q02 = 0XEF21U } |
| w25qxx type enumeration definition More... | |
| enum | w25qxx_interface_t { W25QXX_INTERFACE_SPI = 0x00 , W25QXX_INTERFACE_QSPI = 0x01 } |
| w25qxx interface enumeration definition More... | |
| enum | w25qxx_bool_t { W25QXX_BOOL_FALSE = 0x00 , W25QXX_BOOL_TRUE = 0x01 } |
| w25qxx bool enumeration definition More... | |
| enum | w25qxx_address_mode_t { W25QXX_ADDRESS_MODE_3_BYTE = 0x00 , W25QXX_ADDRESS_MODE_4_BYTE = 0x01 } |
| w25qxx address mode enumeration definition More... | |
Functions | |
| uint8_t | w25qxx_info (w25qxx_info_t *info) |
| get chip's information | |
| uint8_t | w25qxx_set_dual_quad_spi (w25qxx_handle_t *handle, w25qxx_bool_t enable) |
| enable or disable the dual quad spi | |
| uint8_t | w25qxx_get_dual_quad_spi (w25qxx_handle_t *handle, w25qxx_bool_t *enable) |
| get the dual quad spi status | |
| uint8_t | w25qxx_set_type (w25qxx_handle_t *handle, w25qxx_type_t type) |
| set the chip type | |
| uint8_t | w25qxx_get_type (w25qxx_handle_t *handle, w25qxx_type_t *type) |
| get the chip type | |
| uint8_t | w25qxx_set_interface (w25qxx_handle_t *handle, w25qxx_interface_t interface) |
| set the chip interface | |
| uint8_t | w25qxx_get_interface (w25qxx_handle_t *handle, w25qxx_interface_t *interface) |
| get the chip interface | |
| uint8_t | w25qxx_set_address_mode (w25qxx_handle_t *handle, w25qxx_address_mode_t mode) |
| set the chip address mode | |
| uint8_t | w25qxx_get_address_mode (w25qxx_handle_t *handle, w25qxx_address_mode_t *mode) |
| get the chip address mode | |
| uint8_t | w25qxx_init (w25qxx_handle_t *handle) |
| initialize the chip | |
| uint8_t | w25qxx_deinit (w25qxx_handle_t *handle) |
| close the chip | |
| uint8_t | w25qxx_read (w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len) |
| read data | |
| uint8_t | w25qxx_write (w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len) |
| write data | |
| uint8_t | w25qxx_only_spi_read (w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len) |
| read only in the spi interface | |
| uint8_t | w25qxx_fast_read (w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len) |
| read in the fast mode | |
| uint8_t | w25qxx_page_program (w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint16_t len) |
| page program | |
| uint8_t | w25qxx_sector_erase_4k (w25qxx_handle_t *handle, uint32_t addr) |
| erase the 4k sector | |
| uint8_t | w25qxx_block_erase_32k (w25qxx_handle_t *handle, uint32_t addr) |
| erase the 32k block | |
| uint8_t | w25qxx_block_erase_64k (w25qxx_handle_t *handle, uint32_t addr) |
| erase the 64k block | |
| uint8_t | w25qxx_chip_erase (w25qxx_handle_t *handle) |
| erase the chip | |
| uint8_t | w25qxx_power_down (w25qxx_handle_t *handle) |
| power down | |
| uint8_t | w25qxx_release_power_down (w25qxx_handle_t *handle) |
| release power down | |
| uint8_t | w25qxx_get_manufacturer_device_id (w25qxx_handle_t *handle, uint8_t *manufacturer, uint8_t *device_id) |
| get the manufacturer && device id information | |
w25qxx basic driver modules
| #define W25QXX_ERASE_32K_TIMEOUT_MS (1600U) |
| #define W25QXX_ERASE_4K_TIMEOUT_MS (400U) |
| #define W25QXX_ERASE_64K_TIMEOUT_MS (2000U) |
| #define W25QXX_ERASE_CHIP_TIMEOUT_MS (1000U * 1000U) |
| #define W25QXX_ERASE_SECURITY_TIMEOUT_MS (100U) |
| #define W25QXX_PAGE_PROGRAM_TIMEOUT_MS (3U) |
| #define W25QXX_PROGRAM_SECURITY_TIMEOUT_MS (3U) |
| #define W25QXX_WRITE_STATUS_TIMEOUT_MS (1000U) |
w25qxx write status register timeout definition
max 1000ms
Definition at line 63 of file driver_w25qxx.h.
| typedef struct w25qxx_handle_s w25qxx_handle_t |
w25qxx handle structure definition
| typedef struct w25qxx_info_s w25qxx_info_t |
w25qxx information structure definition
w25qxx address mode enumeration definition
| Enumerator | |
|---|---|
| W25QXX_ADDRESS_MODE_3_BYTE | 3 byte mode |
| W25QXX_ADDRESS_MODE_4_BYTE | 4 byte mode |
Definition at line 155 of file driver_w25qxx.h.
| enum w25qxx_bool_t |
w25qxx bool enumeration definition
| Enumerator | |
|---|---|
| W25QXX_BOOL_FALSE | false |
| W25QXX_BOOL_TRUE | true |
Definition at line 146 of file driver_w25qxx.h.
| enum w25qxx_interface_t |
w25qxx interface enumeration definition
| Enumerator | |
|---|---|
| W25QXX_INTERFACE_SPI | spi interface |
| W25QXX_INTERFACE_QSPI | dspi qspi interface |
Definition at line 137 of file driver_w25qxx.h.
| enum w25qxx_type_t |
w25qxx type enumeration definition
Definition at line 118 of file driver_w25qxx.h.
| uint8_t w25qxx_block_erase_32k | ( | w25qxx_handle_t * | handle, |
| uint32_t | addr ) |
erase the 32k block
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | addr | erase address |
Definition at line 5419 of file driver_w25qxx.c.
| uint8_t w25qxx_block_erase_64k | ( | w25qxx_handle_t * | handle, |
| uint32_t | addr ) |
erase the 64k block
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | addr | erase address |
Definition at line 5758 of file driver_w25qxx.c.
| uint8_t w25qxx_chip_erase | ( | w25qxx_handle_t * | handle | ) |
erase the chip
| [in] | *handle | pointer to a w25qxx handle structure |
Definition at line 1459 of file driver_w25qxx.c.
| uint8_t w25qxx_deinit | ( | w25qxx_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to a w25qxx handle structure |
Definition at line 7195 of file driver_w25qxx.c.
| uint8_t w25qxx_fast_read | ( | w25qxx_handle_t * | handle, |
| uint32_t | addr, | ||
| uint8_t * | data, | ||
| uint32_t | len ) |
read in the fast mode
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | addr | read address |
| [out] | *data | pointer to a data buffer |
| [in] | len | data length |
Definition at line 3634 of file driver_w25qxx.c.
| uint8_t w25qxx_get_address_mode | ( | w25qxx_handle_t * | handle, |
| w25qxx_address_mode_t * | mode ) |
get the chip address mode
| [in] | *handle | pointer to a w25qxx handle structure |
| [out] | *mode | pointer to an address mode buffer |
Definition at line 405 of file driver_w25qxx.c.
| uint8_t w25qxx_get_dual_quad_spi | ( | w25qxx_handle_t * | handle, |
| w25qxx_bool_t * | enable ) |
get the dual quad spi status
| [in] | *handle | pointer to a w25qxx handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 196 of file driver_w25qxx.c.
| uint8_t w25qxx_get_interface | ( | w25qxx_handle_t * | handle, |
| w25qxx_interface_t * | interface ) |
get the chip interface
| [in] | *handle | pointer to a w25qxx handle structure |
| [out] | *interface | pointer to a chip interface buffer |
Definition at line 280 of file driver_w25qxx.c.
| uint8_t w25qxx_get_manufacturer_device_id | ( | w25qxx_handle_t * | handle, |
| uint8_t * | manufacturer, | ||
| uint8_t * | device_id ) |
get the manufacturer && device id information
| [in] | *handle | pointer to a w25qxx handle structure |
| [out] | *manufacturer | pointer to a manufacturer buffer |
| [out] | *device_id | pointer to a device id buffer |
Definition at line 1952 of file driver_w25qxx.c.
| uint8_t w25qxx_get_type | ( | w25qxx_handle_t * | handle, |
| w25qxx_type_t * | type ) |
get the chip type
| [in] | *handle | pointer to a w25qxx handle structure |
| [out] | *type | pointer to a chip type buffer |
Definition at line 238 of file driver_w25qxx.c.
| uint8_t w25qxx_info | ( | w25qxx_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to a w25qxx info structure |
Definition at line 8566 of file driver_w25qxx.c.
| uint8_t w25qxx_init | ( | w25qxx_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to a w25qxx handle structure |
Definition at line 6819 of file driver_w25qxx.c.
| uint8_t w25qxx_only_spi_read | ( | w25qxx_handle_t * | handle, |
| uint32_t | addr, | ||
| uint8_t * | data, | ||
| uint32_t | len ) |
read only in the spi interface
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | addr | read address |
| [out] | *data | pointer to a data buffer |
| [in] | len | data length |
Definition at line 3465 of file driver_w25qxx.c.
| uint8_t w25qxx_page_program | ( | w25qxx_handle_t * | handle, |
| uint32_t | addr, | ||
| uint8_t * | data, | ||
| uint16_t | len ) |
page program
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | addr | programming address |
| [in] | *data | pointer to a data buffer |
| [in] | len | data length |
Definition at line 4569 of file driver_w25qxx.c.
| uint8_t w25qxx_power_down | ( | w25qxx_handle_t * | handle | ) |
power down
| [in] | *handle | pointer to a w25qxx handle structure |
Definition at line 1792 of file driver_w25qxx.c.
| uint8_t w25qxx_read | ( | w25qxx_handle_t * | handle, |
| uint32_t | addr, | ||
| uint8_t * | data, | ||
| uint32_t | len ) |
read data
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | addr | read address |
| [out] | *data | pointer to a data buffer |
| [in] | len | data length |
Definition at line 7289 of file driver_w25qxx.c.
| uint8_t w25qxx_release_power_down | ( | w25qxx_handle_t * | handle | ) |
release power down
| [in] | *handle | pointer to a w25qxx handle structure |
Definition at line 1875 of file driver_w25qxx.c.
| uint8_t w25qxx_sector_erase_4k | ( | w25qxx_handle_t * | handle, |
| uint32_t | addr ) |
erase the 4k sector
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | addr | erase address |
Definition at line 5080 of file driver_w25qxx.c.
| uint8_t w25qxx_set_address_mode | ( | w25qxx_handle_t * | handle, |
| w25qxx_address_mode_t | mode ) |
set the chip address mode
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | mode | address mode |
Definition at line 304 of file driver_w25qxx.c.
| uint8_t w25qxx_set_dual_quad_spi | ( | w25qxx_handle_t * | handle, |
| w25qxx_bool_t | enable ) |
enable or disable the dual quad spi
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | enable | bool value |
Definition at line 175 of file driver_w25qxx.c.
| uint8_t w25qxx_set_interface | ( | w25qxx_handle_t * | handle, |
| w25qxx_interface_t | interface ) |
set the chip interface
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | interface | chip interface |
Definition at line 259 of file driver_w25qxx.c.
| uint8_t w25qxx_set_type | ( | w25qxx_handle_t * | handle, |
| w25qxx_type_t | type ) |
set the chip type
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | type | chip type |
Definition at line 217 of file driver_w25qxx.c.
| uint8_t w25qxx_write | ( | w25qxx_handle_t * | handle, |
| uint32_t | addr, | ||
| uint8_t * | data, | ||
| uint32_t | len ) |
write data
| [in] | *handle | pointer to a w25qxx handle structure |
| [in] | addr | written address |
| [in] | *data | pointer to a data buffer |
| [in] | len | data length |
Definition at line 8415 of file driver_w25qxx.c.