| LibDriver W25QXX 1.0.0 W25QXX full function driver

driver_w25qxx_advance.h
Go to the documentation of this file.
1
37 #ifndef DRIVER_W25QXX_ADVANCE_H
38 #define DRIVER_W25QXX_ADVANCE_H
39
40 #include "driver_w25qxx_interface.h"
41
42 #ifdef __cplusplus
43 extern "C"{
44 #endif
45
61 uint8_t w25qxx_advance_init(w25qxx_type_t type, w25qxx_interface_t interface, w25qxx_bool_t dual_quad_spi_enable);
62
70 uint8_t w25qxx_advance_deinit(void);
71
79 uint8_t w25qxx_advance_power_down(void);
80
88 uint8_t w25qxx_advance_wake_up(void);
89
97 uint8_t w25qxx_advance_chip_erase(void);
98
108 uint8_t w25qxx_advance_get_id(uint8_t *manufacturer, uint8_t *device_id);
109
120 uint8_t w25qxx_advance_write(uint32_t addr, uint8_t *data, uint32_t len);
121
132 uint8_t w25qxx_advance_read(uint32_t addr, uint8_t *data, uint32_t len);
133
144 uint8_t w25qxx_advance_page_program(uint32_t addr, uint8_t *data, uint16_t len);
145
154 uint8_t w25qxx_advance_sector_erase_4k(uint32_t addr);
155
164 uint8_t w25qxx_advance_block_erase_32k(uint32_t addr);
165
174 uint8_t w25qxx_advance_block_erase_64k(uint32_t addr);
175
186 uint8_t w25qxx_advance_fast_read(uint32_t addr, uint8_t *data, uint32_t len);
187
196 uint8_t w25qxx_advance_get_status1(uint8_t *status);
197
206 uint8_t w25qxx_advance_get_status2(uint8_t *status);
207
216 uint8_t w25qxx_advance_get_status3(uint8_t *status);
217
226 uint8_t w25qxx_advance_set_status1(uint8_t status);
227
236 uint8_t w25qxx_advance_set_status2(uint8_t status);
237
246 uint8_t w25qxx_advance_set_status3(uint8_t status);
247
257 uint8_t w25qxx_advance_get_get_jedec_id(uint8_t *manufacturer, uint8_t device_id[2]);
258
266 uint8_t w25qxx_advance_global_block_lock(void);
267
275 uint8_t w25qxx_advance_global_block_unlock(void);
276
285 uint8_t w25qxx_advance_individual_block_lock(uint32_t addr);
286
295 uint8_t w25qxx_advance_individual_block_unlock(uint32_t addr);
296
306 uint8_t w25qxx_advance_read_block_lock(uint32_t addr, uint8_t *value);
307
315 uint8_t w25qxx_advance_reset(void);
316
327 uint8_t w25qxx_advance_only_spi_read(uint32_t addr, uint8_t *data, uint32_t len);
328
339 uint8_t w25qxx_advance_only_spi_fast_read_dual_output(uint32_t addr, uint8_t *data, uint32_t len);
340
351 uint8_t w25qxx_advance_only_spi_fast_read_quad_output(uint32_t addr, uint8_t *data, uint32_t len);
352
363 uint8_t w25qxx_advance_only_spi_fast_read_dual_io(uint32_t addr, uint8_t *data, uint32_t len);
364
375 uint8_t w25qxx_advance_only_spi_fast_read_quad_io(uint32_t addr, uint8_t *data, uint32_t len);
376
387 uint8_t w25qxx_advance_only_spi_word_read_quad_io(uint32_t addr, uint8_t *data, uint32_t len);
388
399 uint8_t w25qxx_advance_only_spi_octal_word_read_quad_io(uint32_t addr, uint8_t *data, uint32_t len);
400
411 uint8_t w25qxx_advance_only_spi_page_program_quad_input(uint32_t addr, uint8_t *data, uint16_t len);
412
422 uint8_t w25qxx_advance_only_spi_get_manufacturer_device_id_dual_io(uint8_t *manufacturer, uint8_t *device_id);
423
433 uint8_t w25qxx_advance_only_spi_get_manufacturer_device_id_quad_io(uint8_t *manufacturer, uint8_t *device_id);
434
443 uint8_t w25qxx_advance_only_spi_get_unique_id(uint8_t id[8]);
444
453 uint8_t w25qxx_advance_only_spi_get_sfdp(uint8_t sfdp[256]);
454
464 uint8_t w25qxx_advance_only_spi_write_security_register(w25qxx_security_register_t num, uint8_t data[256]);
465
475 uint8_t w25qxx_advance_only_spi_read_security_register(w25qxx_security_register_t num, uint8_t data[256]);
476
485 uint8_t w25qxx_advance_only_spi_set_burst_with_wrap(w25qxx_burst_wrap_t wrap);
486
496 uint8_t w25qxx_advance_only_qspi_set_read_parameters(w25qxx_qspi_read_dummy_t dummy, w25qxx_qspi_read_wrap_length_t length);
497
502 #ifdef __cplusplus
503 }
504 #endif
505
506 #endif
driver_w25qxx_interface.h
driver w25qxx interface header file
w25qxx_qspi_read_wrap_length_t
w25qxx_qspi_read_wrap_length_t
w25qxx qspi read wrap length enumeration definition
Definition: driver_w25qxx.h:123
w25qxx_qspi_read_dummy_t
w25qxx_qspi_read_dummy_t
w25qxx qspi read dummy enumeration definition
Definition: driver_w25qxx.h:112
w25qxx_security_register_t
w25qxx_security_register_t
w25qxx security register enumeration definition
Definition: driver_w25qxx.h:135
w25qxx_burst_wrap_t
w25qxx_burst_wrap_t
w25qxx burst wrap enumeration definition
Definition: driver_w25qxx.h:145
w25qxx_type_t
w25qxx_type_t
w25qxx type enumeration definition
Definition: driver_w25qxx.h:63
w25qxx_interface_t
w25qxx_interface_t
w25qxx interface enumeration definition
Definition: driver_w25qxx.h:76
w25qxx_bool_t
w25qxx_bool_t
w25qxx bool enumeration definition
Definition: driver_w25qxx.h:85
w25qxx_advance_read
uint8_t w25qxx_advance_read(uint32_t addr, uint8_t *data, uint32_t len)
advance example read
Definition: driver_w25qxx_advance.c:169
w25qxx_advance_only_spi_read_security_register
uint8_t w25qxx_advance_only_spi_read_security_register(w25qxx_security_register_t num, uint8_t data[256])
advance example read the security register only in the spi interface
Definition: driver_w25qxx_advance.c:939
w25qxx_advance_get_id
uint8_t w25qxx_advance_get_id(uint8_t *manufacturer, uint8_t *device_id)
advance example get the manufacturer && device id information
Definition: driver_w25qxx_advance.c:247
w25qxx_advance_reset
uint8_t w25qxx_advance_reset(void)
advance example reset
Definition: driver_w25qxx_advance.c:828
w25qxx_advance_chip_erase
uint8_t w25qxx_advance_chip_erase(void)
advance example chip erase
Definition: driver_w25qxx_advance.c:226
w25qxx_advance_only_spi_set_burst_with_wrap
uint8_t w25qxx_advance_only_spi_set_burst_with_wrap(w25qxx_burst_wrap_t wrap)
advance example set the burst with wrap only in the spi interface
Definition: driver_w25qxx_advance.c:959
w25qxx_advance_global_block_lock
uint8_t w25qxx_advance_global_block_lock(void)
advance example global block lock
Definition: driver_w25qxx_advance.c:729
w25qxx_advance_get_status3
uint8_t w25qxx_advance_get_status3(uint8_t *status)
advance example get the status 3
Definition: driver_w25qxx_advance.c:587
w25qxx_advance_only_spi_fast_read_dual_output
uint8_t w25qxx_advance_only_spi_fast_read_dual_output(uint32_t addr, uint8_t *data, uint32_t len)
advance example fast read only in the spi dual output interface
Definition: driver_w25qxx_advance.c:395
w25qxx_advance_only_spi_get_unique_id
uint8_t w25qxx_advance_only_spi_get_unique_id(uint8_t id[8])
advance example get the unique id only in the spi interface
Definition: driver_w25qxx_advance.c:873
w25qxx_advance_only_spi_fast_read_quad_io
uint8_t w25qxx_advance_only_spi_fast_read_quad_io(uint32_t addr, uint8_t *data, uint32_t len)
advance example fast read only in the spi quad io interface
Definition: driver_w25qxx_advance.c:461
w25qxx_advance_page_program
uint8_t w25qxx_advance_page_program(uint32_t addr, uint8_t *data, uint16_t len)
advance example page program
Definition: driver_w25qxx_advance.c:269
w25qxx_advance_init
uint8_t w25qxx_advance_init(w25qxx_type_t type, w25qxx_interface_t interface, w25qxx_bool_t dual_quad_spi_enable)
advance example init
Definition: driver_w25qxx_advance.c:51
w25qxx_advance_only_spi_fast_read_dual_io
uint8_t w25qxx_advance_only_spi_fast_read_dual_io(uint32_t addr, uint8_t *data, uint32_t len)
advance example fast read only in the spi dual io interface
Definition: driver_w25qxx_advance.c:439
w25qxx_advance_get_status1
uint8_t w25qxx_advance_get_status1(uint8_t *status)
advance example get the status 1
Definition: driver_w25qxx_advance.c:547
w25qxx_advance_power_down
uint8_t w25qxx_advance_power_down(void)
advance example power down
Definition: driver_w25qxx_advance.c:188
w25qxx_advance_set_status1
uint8_t w25qxx_advance_set_status1(uint8_t status)
advance example set the status 1
Definition: driver_w25qxx_advance.c:607
w25qxx_advance_only_spi_get_manufacturer_device_id_quad_io
uint8_t w25qxx_advance_only_spi_get_manufacturer_device_id_quad_io(uint8_t *manufacturer, uint8_t *device_id)
advance example get the manufacturer && device id information only in the spi quad io interface
Definition: driver_w25qxx_advance.c:689
w25qxx_advance_write
uint8_t w25qxx_advance_write(uint32_t addr, uint8_t *data, uint32_t len)
advance example write
Definition: driver_w25qxx_advance.c:147
w25qxx_advance_individual_block_unlock
uint8_t w25qxx_advance_individual_block_unlock(uint32_t addr)
advance example unlock the individual block
Definition: driver_w25qxx_advance.c:788
w25qxx_advance_global_block_unlock
uint8_t w25qxx_advance_global_block_unlock(void)
advance example global block unlock
Definition: driver_w25qxx_advance.c:748
w25qxx_advance_fast_read
uint8_t w25qxx_advance_fast_read(uint32_t addr, uint8_t *data, uint32_t len)
advance example read in the fast mode
Definition: driver_w25qxx_advance.c:351
w25qxx_advance_only_spi_octal_word_read_quad_io
uint8_t w25qxx_advance_only_spi_octal_word_read_quad_io(uint32_t addr, uint8_t *data, uint32_t len)
advance example octal word read only in the spi quad io interface
Definition: driver_w25qxx_advance.c:505
w25qxx_advance_wake_up
uint8_t w25qxx_advance_wake_up(void)
advance example wake up
Definition: driver_w25qxx_advance.c:207
w25qxx_advance_sector_erase_4k
uint8_t w25qxx_advance_sector_erase_4k(uint32_t addr)
advance example erase the 4k sector
Definition: driver_w25qxx_advance.c:289
w25qxx_advance_only_spi_get_sfdp
uint8_t w25qxx_advance_only_spi_get_sfdp(uint8_t sfdp[256])
advance example get the sfdp only in the spi interface
Definition: driver_w25qxx_advance.c:893
w25qxx_advance_set_status2
uint8_t w25qxx_advance_set_status2(uint8_t status)
advance example set the status 2
Definition: driver_w25qxx_advance.c:627
w25qxx_advance_only_spi_write_security_register
uint8_t w25qxx_advance_only_spi_write_security_register(w25qxx_security_register_t num, uint8_t data[256])
advance example write the security register only in the spi interface
Definition: driver_w25qxx_advance.c:914
w25qxx_advance_individual_block_lock
uint8_t w25qxx_advance_individual_block_lock(uint32_t addr)
advance example lock the individual block
Definition: driver_w25qxx_advance.c:768
w25qxx_advance_set_status3
uint8_t w25qxx_advance_set_status3(uint8_t status)
advance example set the status 3
Definition: driver_w25qxx_advance.c:647
w25qxx_advance_only_spi_get_manufacturer_device_id_dual_io
uint8_t w25qxx_advance_only_spi_get_manufacturer_device_id_dual_io(uint8_t *manufacturer, uint8_t *device_id)
advance example get the manufacturer && device id information only in the spi dual io interface
Definition: driver_w25qxx_advance.c:668
w25qxx_advance_read_block_lock
uint8_t w25qxx_advance_read_block_lock(uint32_t addr, uint8_t *value)
advance example read the block lock
Definition: driver_w25qxx_advance.c:809
w25qxx_advance_only_spi_read
uint8_t w25qxx_advance_only_spi_read(uint32_t addr, uint8_t *data, uint32_t len)
advance example read only in the spi interface
Definition: driver_w25qxx_advance.c:373
w25qxx_advance_only_spi_word_read_quad_io
uint8_t w25qxx_advance_only_spi_word_read_quad_io(uint32_t addr, uint8_t *data, uint32_t len)
advance example word read only in the spi quad io interface
Definition: driver_w25qxx_advance.c:483
w25qxx_advance_get_get_jedec_id
uint8_t w25qxx_advance_get_get_jedec_id(uint8_t *manufacturer, uint8_t device_id[2])
advance example get the jedec id information
Definition: driver_w25qxx_advance.c:710
w25qxx_advance_only_qspi_set_read_parameters
uint8_t w25qxx_advance_only_qspi_set_read_parameters(w25qxx_qspi_read_dummy_t dummy, w25qxx_qspi_read_wrap_length_t length)
advance example set the read parameters only in the qspi interface
Definition: driver_w25qxx_advance.c:853
w25qxx_advance_only_spi_page_program_quad_input
uint8_t w25qxx_advance_only_spi_page_program_quad_input(uint32_t addr, uint8_t *data, uint16_t len)
advance example quad page program only in the spi quad input interface
Definition: driver_w25qxx_advance.c:527
w25qxx_advance_block_erase_64k
uint8_t w25qxx_advance_block_erase_64k(uint32_t addr)
advance example erase the 64k block
Definition: driver_w25qxx_advance.c:329
w25qxx_advance_block_erase_32k
uint8_t w25qxx_advance_block_erase_32k(uint32_t addr)
advance example erase the 32k block
Definition: driver_w25qxx_advance.c:309
w25qxx_advance_deinit
uint8_t w25qxx_advance_deinit(void)
advance example deinit
Definition: driver_w25qxx_advance.c:125
w25qxx_advance_get_status2
uint8_t w25qxx_advance_get_status2(uint8_t *status)
advance example get the status 2
Definition: driver_w25qxx_advance.c:567
w25qxx_advance_only_spi_fast_read_quad_output
uint8_t w25qxx_advance_only_spi_fast_read_quad_output(uint32_t addr, uint8_t *data, uint32_t len)
advance example fast read only in the spi quad output interface
Definition: driver_w25qxx_advance.c:417