![]() |
LibDriver W25QXX
1.0.0
W25QXX full function driver
|
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... | |
Typedefs | |
| typedef struct w25qxx_handle_s | w25qxx_handle_t |
| w25qxx handle structure definition More... | |
| typedef struct w25qxx_info_s | w25qxx_info_t |
| w25qxx information structure definition More... | |
Enumerations | |
| enum | w25qxx_type_t { W25Q80 = 0XEF13U , W25Q16 = 0XEF14U , W25Q32 = 0XEF15U , W25Q64 = 0XEF16U , W25Q128 = 0XEF17U , W25Q256 = 0XEF18U } |
| 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 More... | |
| uint8_t | w25qxx_set_dual_quad_spi (w25qxx_handle_t *handle, w25qxx_bool_t enable) |
| enable or disable the dual quad spi More... | |
| uint8_t | w25qxx_get_dual_quad_spi (w25qxx_handle_t *handle, w25qxx_bool_t *enable) |
| get the dual quad spi status More... | |
| uint8_t | w25qxx_set_type (w25qxx_handle_t *handle, w25qxx_type_t type) |
| set the chip type More... | |
| uint8_t | w25qxx_get_type (w25qxx_handle_t *handle, w25qxx_type_t *type) |
| get the chip type More... | |
| uint8_t | w25qxx_set_interface (w25qxx_handle_t *handle, w25qxx_interface_t interface) |
| set the chip interface More... | |
| uint8_t | w25qxx_get_interface (w25qxx_handle_t *handle, w25qxx_interface_t *interface) |
| get the chip interface More... | |
| uint8_t | w25qxx_set_address_mode (w25qxx_handle_t *handle, w25qxx_address_mode_t mode) |
| set the chip address mode More... | |
| uint8_t | w25qxx_get_address_mode (w25qxx_handle_t *handle, w25qxx_address_mode_t *mode) |
| get the chip address mode More... | |
| uint8_t | w25qxx_init (w25qxx_handle_t *handle) |
| initialize the chip More... | |
| uint8_t | w25qxx_deinit (w25qxx_handle_t *handle) |
| close the chip More... | |
| uint8_t | w25qxx_read (w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len) |
| read data More... | |
| uint8_t | w25qxx_write (w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len) |
| write data More... | |
| 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 More... | |
| uint8_t | w25qxx_fast_read (w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len) |
| read in the fast mode More... | |
| uint8_t | w25qxx_page_program (w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint16_t len) |
| page program More... | |
| uint8_t | w25qxx_sector_erase_4k (w25qxx_handle_t *handle, uint32_t addr) |
| erase the 4k sector More... | |
| uint8_t | w25qxx_block_erase_32k (w25qxx_handle_t *handle, uint32_t addr) |
| erase the 32k block More... | |
| uint8_t | w25qxx_block_erase_64k (w25qxx_handle_t *handle, uint32_t addr) |
| erase the 64k block More... | |
| uint8_t | w25qxx_chip_erase (w25qxx_handle_t *handle) |
| erase the chip More... | |
| uint8_t | w25qxx_power_down (w25qxx_handle_t *handle) |
| power down More... | |
| uint8_t | w25qxx_release_power_down (w25qxx_handle_t *handle) |
| release power down More... | |
| uint8_t | w25qxx_get_manufacturer_device_id (w25qxx_handle_t *handle, uint8_t *manufacturer, uint8_t *device_id) |
| get the manufacturer && device id information More... | |
w25qxx basic driver modules
| 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 93 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 84 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 75 of file driver_w25qxx.h.
| enum w25qxx_type_t |
w25qxx type enumeration definition
| Enumerator | |
|---|---|
| W25Q80 | w25q80 |
| W25Q16 | w25q16 |
| W25Q32 | w25q32 |
| W25Q64 | w25q64 |
| W25Q128 | w25q128 |
| W25Q256 | w25q256 |
Definition at line 62 of file driver_w25qxx.h.
| uint8_t w25qxx_block_erase_32k | ( | w25qxx_handle_t * | handle, |
| uint32_t | addr | ||
| ) |
erase the 32k block
| [in] | *handle | points to a w25qxx handle structure |
| [in] | addr | is the 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 | points to a w25qxx handle structure |
| [in] | addr | is the 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 | points 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 | points 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 | points to a w25qxx handle structure |
| [in] | addr | is the read address |
| [out] | *data | points to a data buffer |
| [in] | len | is the 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 | points to a w25qxx handle structure |
| [out] | *mode | points 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 | points to a w25qxx handle structure |
| [out] | enable | points 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 | points to a w25qxx handle structure |
| [out] | *interface | points 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 | points to a w25qxx handle structure |
| [out] | *manufacturer | points to a manufacturer buffer |
| [out] | *device_id | points 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 | points to a w25qxx handle structure |
| [out] | *type | points 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 | points 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 | points 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 | points to a w25qxx handle structure |
| [in] | addr | is the read address |
| [out] | *data | points to a data buffer |
| [in] | len | is the 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 | points to a w25qxx handle structure |
| [in] | addr | is the programming address |
| [in] | *data | points to a data buffer |
| [in] | len | is the data length |
Definition at line 4569 of file driver_w25qxx.c.
| uint8_t w25qxx_power_down | ( | w25qxx_handle_t * | handle | ) |
power down
| [in] | *handle | points 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 | points to a w25qxx handle structure |
| [in] | addr | is the read address |
| [out] | *data | points to a data buffer |
| [in] | len | is the 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 | points 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 | points to a w25qxx handle structure |
| [in] | addr | is the 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 | points to a w25qxx handle structure |
| [in] | mode | is the 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 | points to a w25qxx handle structure |
| [in] | enable | is a 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 | points to a w25qxx handle structure |
| [in] | interface | is the 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 | points to a w25qxx handle structure |
| [in] | type | is the 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 | points to a w25qxx handle structure |
| [in] | addr | is the write address |
| [in] | *data | points to a data buffer |
| [in] | len | is the data length |
Definition at line 8415 of file driver_w25qxx.c.