![]() |
LibDriver W25QXX
1.0.0
W25QXX full-featured 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 , W25Q512 = 0XEF19U , W25Q1024 = 0XEF20U , W25Q2048 = 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 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 96 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 87 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 78 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 |
W25Q512 | w25q512 |
W25Q1024 | w25q01 |
W25Q2048 | w25q02 |
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 | 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 |
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
deinit
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.