| LibDriver W25QXX 1.0.0 W25QXX full function driver

driver_w25qxx_advance.c
Go to the documentation of this file.
1
37 #include "driver_w25qxx_advance.h"
38
39 static w25qxx_handle_t gs_handle;
51 uint8_t w25qxx_advance_init(w25qxx_type_t type, w25qxx_interface_t interface, w25qxx_bool_t dual_quad_spi_enable)
52 {
53 uint8_t res;
54
55 /* link interface function */
56 DRIVER_W25QXX_LINK_INIT(&gs_handle, w25qxx_handle_t);
57 DRIVER_W25QXX_LINK_SPI_QSPI_INIT(&gs_handle, w25qxx_interface_spi_qspi_init);
58 DRIVER_W25QXX_LINK_SPI_QSPI_DEINIT(&gs_handle, w25qxx_interface_spi_qspi_deinit);
59 DRIVER_W25QXX_LINK_SPI_QSPI_WRITE_READ(&gs_handle, w25qxx_interface_spi_qspi_write_read);
60 DRIVER_W25QXX_LINK_DELAY_MS(&gs_handle, w25qxx_interface_delay_ms);
61 DRIVER_W25QXX_LINK_DELAY_US(&gs_handle, w25qxx_interface_delay_us);
62 DRIVER_W25QXX_LINK_DEBUG_PRINT(&gs_handle, w25qxx_interface_debug_print);
63
64 /* set chip type */
65 res = w25qxx_set_type(&gs_handle, type);
66 if (res != 0)
67 {
68 w25qxx_interface_debug_print("w25qxx: set type failed.\n");
69
70 return 1;
71 }
72
73 /* set chip interface */
74 res = w25qxx_set_interface(&gs_handle, interface);
75 if (res != 0)
76 {
77 w25qxx_interface_debug_print("w25qxx: set interface failed.\n");
78
79 return 1;
80 }
81
82 /* set dual quad spi */
83 res = w25qxx_set_dual_quad_spi(&gs_handle, dual_quad_spi_enable);
84 if (res != 0)
85 {
86 w25qxx_interface_debug_print("w25qxx: set dual quad spi failed.\n");
87 (void)w25qxx_deinit(&gs_handle);
88
89 return 1;
90 }
91
92 /* chip init */
93 res = w25qxx_init(&gs_handle);
94 if (res != 0)
95 {
96 w25qxx_interface_debug_print("w25qxx: init failed.\n");
97
98 return 1;
99 }
100 else
101 {
102 if (type >= W25Q256)
103 {
104 res = w25qxx_set_address_mode(&gs_handle, W25QXX_ADDRESS_MODE_4_BYTE);
105 if (res != 0)
106 {
107 w25qxx_interface_debug_print("w25qxx: set address mode failed.\n");
108 (void)w25qxx_deinit(&gs_handle);
109
110 return 1;
111 }
112 }
113
114 return 0;
115 }
116 }
117
125 uint8_t w25qxx_advance_deinit(void)
126 {
127 if (w25qxx_deinit(&gs_handle) != 0)
128 {
129 return 1;
130 }
131 else
132 {
133 return 0;
134 }
135 }
136
147 uint8_t w25qxx_advance_write(uint32_t addr, uint8_t *data, uint32_t len)
148 {
149 if (w25qxx_write(&gs_handle, addr, data, len) != 0)
150 {
151 return 1;
152 }
153 else
154 {
155 return 0;
156 }
157 }
158
169 uint8_t w25qxx_advance_read(uint32_t addr, uint8_t *data, uint32_t len)
170 {
171 if (w25qxx_read(&gs_handle, addr, data, len) != 0)
172 {
173 return 1;
174 }
175 else
176 {
177 return 0;
178 }
179 }
180
188 uint8_t w25qxx_advance_power_down(void)
189 {
190 if (w25qxx_power_down(&gs_handle) != 0)
191 {
192 return 1;
193 }
194 else
195 {
196 return 0;
197 }
198 }
199
207 uint8_t w25qxx_advance_wake_up(void)
208 {
209 if (w25qxx_release_power_down(&gs_handle) != 0)
210 {
211 return 1;
212 }
213 else
214 {
215 return 0;
216 }
217 }
218
226 uint8_t w25qxx_advance_chip_erase(void)
227 {
228 if (w25qxx_chip_erase(&gs_handle) != 0)
229 {
230 return 1;
231 }
232 else
233 {
234 return 0;
235 }
236 }
237
247 uint8_t w25qxx_advance_get_id(uint8_t *manufacturer, uint8_t *device_id)
248 {
249 if (w25qxx_get_manufacturer_device_id(&gs_handle, manufacturer, device_id) != 0)
250 {
251 return 1;
252 }
253 else
254 {
255 return 0;
256 }
257 }
258
269 uint8_t w25qxx_advance_page_program(uint32_t addr, uint8_t *data, uint16_t len)
270 {
271 if (w25qxx_page_program(&gs_handle, addr, data, len) != 0)
272 {
273 return 1;
274 }
275 else
276 {
277 return 0;
278 }
279 }
280
289 uint8_t w25qxx_advance_sector_erase_4k(uint32_t addr)
290 {
291 if (w25qxx_sector_erase_4k(&gs_handle, addr) != 0)
292 {
293 return 1;
294 }
295 else
296 {
297 return 0;
298 }
299 }
300
309 uint8_t w25qxx_advance_block_erase_32k(uint32_t addr)
310 {
311 if (w25qxx_block_erase_32k(&gs_handle, addr) != 0)
312 {
313 return 1;
314 }
315 else
316 {
317 return 0;
318 }
319 }
320
329 uint8_t w25qxx_advance_block_erase_64k(uint32_t addr)
330 {
331 if (w25qxx_block_erase_64k(&gs_handle, addr) != 0)
332 {
333 return 1;
334 }
335 else
336 {
337 return 0;
338 }
339 }
340
351 uint8_t w25qxx_advance_fast_read(uint32_t addr, uint8_t *data, uint32_t len)
352 {
353 if (w25qxx_fast_read(&gs_handle, addr, data, len) != 0)
354 {
355 return 1;
356 }
357 else
358 {
359 return 0;
360 }
361 }
362
373 uint8_t w25qxx_advance_only_spi_read(uint32_t addr, uint8_t *data, uint32_t len)
374 {
375 if (w25qxx_only_spi_read(&gs_handle, addr, data, len) != 0)
376 {
377 return 1;
378 }
379 else
380 {
381 return 0;
382 }
383 }
384
395 uint8_t w25qxx_advance_only_spi_fast_read_dual_output(uint32_t addr, uint8_t *data, uint32_t len)
396 {
397 if (w25qxx_fast_read_dual_output(&gs_handle, addr, data, len) != 0)
398 {
399 return 1;
400 }
401 else
402 {
403 return 0;
404 }
405 }
406
417 uint8_t w25qxx_advance_only_spi_fast_read_quad_output(uint32_t addr, uint8_t *data, uint32_t len)
418 {
419 if (w25qxx_fast_read_quad_output(&gs_handle, addr, data, len) != 0)
420 {
421 return 1;
422 }
423 else
424 {
425 return 0;
426 }
427 }
428
439 uint8_t w25qxx_advance_only_spi_fast_read_dual_io(uint32_t addr, uint8_t *data, uint32_t len)
440 {
441 if (w25qxx_fast_read_dual_io(&gs_handle, addr, data, len) != 0)
442 {
443 return 1;
444 }
445 else
446 {
447 return 0;
448 }
449 }
450
461 uint8_t w25qxx_advance_only_spi_fast_read_quad_io(uint32_t addr, uint8_t *data, uint32_t len)
462 {
463 if (w25qxx_fast_read_quad_io(&gs_handle, addr, data, len) != 0)
464 {
465 return 1;
466 }
467 else
468 {
469 return 0;
470 }
471 }
472
483 uint8_t w25qxx_advance_only_spi_word_read_quad_io(uint32_t addr, uint8_t *data, uint32_t len)
484 {
485 if (w25qxx_word_read_quad_io(&gs_handle, addr, data, len) != 0)
486 {
487 return 1;
488 }
489 else
490 {
491 return 0;
492 }
493 }
494
505 uint8_t w25qxx_advance_only_spi_octal_word_read_quad_io(uint32_t addr, uint8_t *data, uint32_t len)
506 {
507 if (w25qxx_octal_word_read_quad_io(&gs_handle, addr, data, len) != 0)
508 {
509 return 1;
510 }
511 else
512 {
513 return 0;
514 }
515 }
516
527 uint8_t w25qxx_advance_only_spi_page_program_quad_input(uint32_t addr, uint8_t *data, uint16_t len)
528 {
529 if (w25qxx_page_program_quad_input(&gs_handle, addr, data, len) != 0)
530 {
531 return 1;
532 }
533 else
534 {
535 return 0;
536 }
537 }
538
547 uint8_t w25qxx_advance_get_status1(uint8_t *status)
548 {
549 if (w25qxx_get_status1(&gs_handle, status) != 0)
550 {
551 return 1;
552 }
553 else
554 {
555 return 0;
556 }
557 }
558
567 uint8_t w25qxx_advance_get_status2(uint8_t *status)
568 {
569 if (w25qxx_get_status2(&gs_handle, status) != 0)
570 {
571 return 1;
572 }
573 else
574 {
575 return 0;
576 }
577 }
578
587 uint8_t w25qxx_advance_get_status3(uint8_t *status)
588 {
589 if (w25qxx_get_status3(&gs_handle, status) != 0)
590 {
591 return 1;
592 }
593 else
594 {
595 return 0;
596 }
597 }
598
607 uint8_t w25qxx_advance_set_status1(uint8_t status)
608 {
609 if (w25qxx_set_status1(&gs_handle, status) != 0)
610 {
611 return 1;
612 }
613 else
614 {
615 return 0;
616 }
617 }
618
627 uint8_t w25qxx_advance_set_status2(uint8_t status)
628 {
629 if (w25qxx_set_status2(&gs_handle, status) != 0)
630 {
631 return 1;
632 }
633 else
634 {
635 return 0;
636 }
637 }
638
647 uint8_t w25qxx_advance_set_status3(uint8_t status)
648 {
649 if (w25qxx_set_status3(&gs_handle, status) != 0)
650 {
651 return 1;
652 }
653 else
654 {
655 return 0;
656 }
657 }
658
668 uint8_t w25qxx_advance_only_spi_get_manufacturer_device_id_dual_io(uint8_t *manufacturer, uint8_t *device_id)
669 {
670 if (w25qxx_get_manufacturer_device_id_dual_io(&gs_handle, manufacturer, device_id) != 0)
671 {
672 return 1;
673 }
674 else
675 {
676 return 0;
677 }
678 }
679
689 uint8_t w25qxx_advance_only_spi_get_manufacturer_device_id_quad_io(uint8_t *manufacturer, uint8_t *device_id)
690 {
691 if (w25qxx_get_manufacturer_device_id_quad_io(&gs_handle, manufacturer, device_id) != 0)
692 {
693 return 1;
694 }
695 else
696 {
697 return 0;
698 }
699 }
700
710 uint8_t w25qxx_advance_get_get_jedec_id(uint8_t *manufacturer, uint8_t device_id[2])
711 {
712 if (w25qxx_get_jedec_id(&gs_handle, manufacturer, device_id) != 0)
713 {
714 return 1;
715 }
716 else
717 {
718 return 0;
719 }
720 }
721
729 uint8_t w25qxx_advance_global_block_lock(void)
730 {
731 if (w25qxx_global_block_lock(&gs_handle) != 0)
732 {
733 return 1;
734 }
735 else
736 {
737 return 0;
738 }
739 }
740
748 uint8_t w25qxx_advance_global_block_unlock(void)
749 {
750 if (w25qxx_global_block_unlock(&gs_handle) != 0)
751 {
752 return 1;
753 }
754 else
755 {
756 return 0;
757 }
758 }
759
768 uint8_t w25qxx_advance_individual_block_lock(uint32_t addr)
769 {
770 if (w25qxx_individual_block_lock(&gs_handle, addr) != 0)
771 {
772 return 1;
773 }
774 else
775 {
776 return 0;
777 }
778 }
779
788 uint8_t w25qxx_advance_individual_block_unlock(uint32_t addr)
789 {
790 if (w25qxx_individual_block_unlock(&gs_handle, addr) != 0)
791 {
792 return 1;
793 }
794 else
795 {
796 return 0;
797 }
798 }
799
809 uint8_t w25qxx_advance_read_block_lock(uint32_t addr, uint8_t *value)
810 {
811 if (w25qxx_read_block_lock(&gs_handle, addr, value) != 0)
812 {
813 return 1;
814 }
815 else
816 {
817 return 0;
818 }
819 }
820
828 uint8_t w25qxx_advance_reset(void)
829 {
830 if (w25qxx_enable_reset(&gs_handle) != 0)
831 {
832 return 1;
833 }
834 if (w25qxx_reset_device(&gs_handle) != 0)
835 {
836 return 1;
837 }
838 else
839 {
840 return 0;
841 }
842 }
843
853 uint8_t w25qxx_advance_only_qspi_set_read_parameters(w25qxx_qspi_read_dummy_t dummy, w25qxx_qspi_read_wrap_length_t length)
854 {
855 if (w25qxx_set_read_parameters(&gs_handle, dummy, length) != 0)
856 {
857 return 1;
858 }
859 else
860 {
861 return 0;
862 }
863 }
864
873 uint8_t w25qxx_advance_only_spi_get_unique_id(uint8_t id[8])
874 {
875 if (w25qxx_get_unique_id(&gs_handle, id) != 0)
876 {
877 return 1;
878 }
879 else
880 {
881 return 0;
882 }
883 }
884
893 uint8_t w25qxx_advance_only_spi_get_sfdp(uint8_t sfdp[256])
894 {
895 if (w25qxx_get_sfdp(&gs_handle, sfdp) != 0)
896 {
897 return 1;
898 }
899 else
900 {
901 return 0;
902 }
903 }
904
914 uint8_t w25qxx_advance_only_spi_write_security_register(w25qxx_security_register_t num, uint8_t data[256])
915 {
916 if (w25qxx_erase_security_register(&gs_handle, num) != 0)
917 {
918 return 1;
919 }
920 if (w25qxx_program_security_register(&gs_handle, num, data) != 0)
921 {
922 return 1;
923 }
924 else
925 {
926 return 0;
927 }
928 }
929
939 uint8_t w25qxx_advance_only_spi_read_security_register(w25qxx_security_register_t num, uint8_t data[256])
940 {
941 if (w25qxx_read_security_register(&gs_handle, num, data) != 0)
942 {
943 return 1;
944 }
945 else
946 {
947 return 0;
948 }
949 }
950
959 uint8_t w25qxx_advance_only_spi_set_burst_with_wrap(w25qxx_burst_wrap_t wrap)
960 {
961 if (w25qxx_set_burst_with_wrap(&gs_handle, wrap) != 0)
962 {
963 return 1;
964 }
965 else
966 {
967 return 0;
968 }
969 }
driver_w25qxx_advance.h
driver w25qxx advance header file
w25qxx_get_unique_id
uint8_t w25qxx_get_unique_id(w25qxx_handle_t *handle, uint8_t id[8])
get the unique id
Definition: driver_w25qxx.c:2764
w25qxx_get_manufacturer_device_id_dual_io
uint8_t w25qxx_get_manufacturer_device_id_dual_io(w25qxx_handle_t *handle, uint8_t *manufacturer, uint8_t *device_id)
get the manufacturer && device id information with dual io
Definition: driver_w25qxx.c:2038
w25qxx_page_program_quad_input
uint8_t w25qxx_page_program_quad_input(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint16_t len)
quad page program with quad input
Definition: driver_w25qxx.c:4920
w25qxx_get_sfdp
uint8_t w25qxx_get_sfdp(w25qxx_handle_t *handle, uint8_t sfdp[256])
get the sfdp
Definition: driver_w25qxx.c:2880
w25qxx_set_status1
uint8_t w25qxx_set_status1(w25qxx_handle_t *handle, uint8_t status)
set the status 1
Definition: driver_w25qxx.c:863
w25qxx_reset_device
uint8_t w25qxx_reset_device(w25qxx_handle_t *handle)
reset the device
Definition: driver_w25qxx.c:2690
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_read_security_register
uint8_t w25qxx_read_security_register(w25qxx_handle_t *handle, w25qxx_security_register_t num, uint8_t data[256])
read the security register
Definition: driver_w25qxx.c:3344
w25qxx_program_security_register
uint8_t w25qxx_program_security_register(w25qxx_handle_t *handle, w25qxx_security_register_t num, uint8_t data[256])
program the security register
Definition: driver_w25qxx.c:3147
w25qxx_individual_block_lock
uint8_t w25qxx_individual_block_lock(w25qxx_handle_t *handle, uint32_t addr)
lock the individual block
Definition: driver_w25qxx.c:6094
w25qxx_read_block_lock
uint8_t w25qxx_read_block_lock(w25qxx_handle_t *handle, uint32_t addr, uint8_t *value)
read the block lock
Definition: driver_w25qxx.c:6529
w25qxx_get_manufacturer_device_id_quad_io
uint8_t w25qxx_get_manufacturer_device_id_quad_io(w25qxx_handle_t *handle, uint8_t *manufacturer, uint8_t *device_id)
get the manufacturer && device id information with quad io
Definition: driver_w25qxx.c:2122
w25qxx_global_block_unlock
uint8_t w25qxx_global_block_unlock(w25qxx_handle_t *handle)
unlock the whole block
Definition: driver_w25qxx.c:2354
w25qxx_qspi_read_dummy_t
w25qxx_qspi_read_dummy_t
w25qxx qspi read dummy enumeration definition
Definition: driver_w25qxx.h:112
w25qxx_fast_read_dual_output
uint8_t w25qxx_fast_read_dual_output(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len)
read with dual output in the fast mode
Definition: driver_w25qxx.c:3858
w25qxx_individual_block_unlock
uint8_t w25qxx_individual_block_unlock(w25qxx_handle_t *handle, uint32_t addr)
unlock the individual block
Definition: driver_w25qxx.c:6311
w25qxx_security_register_t
w25qxx_security_register_t
w25qxx security register enumeration definition
Definition: driver_w25qxx.h:135
w25qxx_octal_word_read_quad_io
uint8_t w25qxx_octal_word_read_quad_io(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len)
octal word read with quad io
Definition: driver_w25qxx.c:4459
w25qxx_get_jedec_id
uint8_t w25qxx_get_jedec_id(w25qxx_handle_t *handle, uint8_t *manufacturer, uint8_t device_id[2])
get the jedec id information
Definition: driver_w25qxx.c:2203
w25qxx_burst_wrap_t
w25qxx_burst_wrap_t
w25qxx burst wrap enumeration definition
Definition: driver_w25qxx.h:145
w25qxx_get_status3
uint8_t w25qxx_get_status3(w25qxx_handle_t *handle, uint8_t *status)
get the status 3
Definition: driver_w25qxx.c:789
w25qxx_set_read_parameters
uint8_t w25qxx_set_read_parameters(w25qxx_handle_t *handle, w25qxx_qspi_read_dummy_t dummy, w25qxx_qspi_read_wrap_length_t length)
set the read parameters
Definition: driver_w25qxx.c:2427
w25qxx_get_status2
uint8_t w25qxx_get_status2(w25qxx_handle_t *handle, uint8_t *status)
get the status 2
Definition: driver_w25qxx.c:716
w25qxx_get_status1
uint8_t w25qxx_get_status1(w25qxx_handle_t *handle, uint8_t *status)
get the status 1
Definition: driver_w25qxx.c:643
w25qxx_set_status2
uint8_t w25qxx_set_status2(w25qxx_handle_t *handle, uint8_t status)
set the status 2
Definition: driver_w25qxx.c:1062
w25qxx_global_block_lock
uint8_t w25qxx_global_block_lock(w25qxx_handle_t *handle)
lock the whole block
Definition: driver_w25qxx.c:2284
w25qxx_enable_reset
uint8_t w25qxx_enable_reset(w25qxx_handle_t *handle)
enable the reset
Definition: driver_w25qxx.c:2619
w25qxx_fast_read_quad_io
uint8_t w25qxx_fast_read_quad_io(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len)
read with quad io in the fast mode
Definition: driver_w25qxx.c:4184
w25qxx_set_burst_with_wrap
uint8_t w25qxx_set_burst_with_wrap(w25qxx_handle_t *handle, w25qxx_burst_wrap_t wrap)
set the burst with wrap
Definition: driver_w25qxx.c:6746
w25qxx_fast_read_dual_io
uint8_t w25qxx_fast_read_dual_io(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len)
read with dual io in the fast mode
Definition: driver_w25qxx.c:4076
w25qxx_word_read_quad_io
uint8_t w25qxx_word_read_quad_io(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len)
word read with quad io
Definition: driver_w25qxx.c:4350
w25qxx_set_status3
uint8_t w25qxx_set_status3(w25qxx_handle_t *handle, uint8_t status)
set the status 3
Definition: driver_w25qxx.c:1261
w25qxx_erase_security_register
uint8_t w25qxx_erase_security_register(w25qxx_handle_t *handle, w25qxx_security_register_t num)
erase the security register
Definition: driver_w25qxx.c:2952
w25qxx_fast_read_quad_output
uint8_t w25qxx_fast_read_quad_output(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len)
read with quad output in the fast mode
Definition: driver_w25qxx.c:3967
w25qxx_chip_erase
uint8_t w25qxx_chip_erase(w25qxx_handle_t *handle)
erase the chip
Definition: driver_w25qxx.c:1459
w25qxx_release_power_down
uint8_t w25qxx_release_power_down(w25qxx_handle_t *handle)
release power down
Definition: driver_w25qxx.c:1875
w25qxx_only_spi_read
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
Definition: driver_w25qxx.c:3465
w25qxx_block_erase_32k
uint8_t w25qxx_block_erase_32k(w25qxx_handle_t *handle, uint32_t addr)
erase the 32k block
Definition: driver_w25qxx.c:5419
w25qxx_set_interface
uint8_t w25qxx_set_interface(w25qxx_handle_t *handle, w25qxx_interface_t interface)
set the chip interface
Definition: driver_w25qxx.c:259
w25qxx_page_program
uint8_t w25qxx_page_program(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint16_t len)
page program
Definition: driver_w25qxx.c:4569
w25qxx_set_dual_quad_spi
uint8_t w25qxx_set_dual_quad_spi(w25qxx_handle_t *handle, w25qxx_bool_t enable)
enable or disable the dual quad spi
Definition: driver_w25qxx.c:175
w25qxx_type_t
w25qxx_type_t
w25qxx type enumeration definition
Definition: driver_w25qxx.h:63
w25qxx_init
uint8_t w25qxx_init(w25qxx_handle_t *handle)
initialize the chip
Definition: driver_w25qxx.c:6819
w25qxx_get_manufacturer_device_id
uint8_t w25qxx_get_manufacturer_device_id(w25qxx_handle_t *handle, uint8_t *manufacturer, uint8_t *device_id)
get the manufacturer && device id information
Definition: driver_w25qxx.c:1952
w25qxx_sector_erase_4k
uint8_t w25qxx_sector_erase_4k(w25qxx_handle_t *handle, uint32_t addr)
erase the 4k sector
Definition: driver_w25qxx.c:5080
w25qxx_deinit
uint8_t w25qxx_deinit(w25qxx_handle_t *handle)
close the chip
Definition: driver_w25qxx.c:7195
w25qxx_set_type
uint8_t w25qxx_set_type(w25qxx_handle_t *handle, w25qxx_type_t type)
set the chip type
Definition: driver_w25qxx.c:217
w25qxx_write
uint8_t w25qxx_write(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len)
write data
Definition: driver_w25qxx.c:8415
w25qxx_fast_read
uint8_t w25qxx_fast_read(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len)
read in the fast mode
Definition: driver_w25qxx.c:3634
w25qxx_interface_t
w25qxx_interface_t
w25qxx interface enumeration definition
Definition: driver_w25qxx.h:76
w25qxx_set_address_mode
uint8_t w25qxx_set_address_mode(w25qxx_handle_t *handle, w25qxx_address_mode_t mode)
set the chip address mode
Definition: driver_w25qxx.c:304
w25qxx_power_down
uint8_t w25qxx_power_down(w25qxx_handle_t *handle)
power down
Definition: driver_w25qxx.c:1792
w25qxx_read
uint8_t w25qxx_read(w25qxx_handle_t *handle, uint32_t addr, uint8_t *data, uint32_t len)
read data
Definition: driver_w25qxx.c:7289
w25qxx_block_erase_64k
uint8_t w25qxx_block_erase_64k(w25qxx_handle_t *handle, uint32_t addr)
erase the 64k block
Definition: driver_w25qxx.c:5758
w25qxx_bool_t
w25qxx_bool_t
w25qxx bool enumeration definition
Definition: driver_w25qxx.h:85
W25Q256
@ W25Q256
Definition: driver_w25qxx.h:69
W25QXX_ADDRESS_MODE_4_BYTE
@ W25QXX_ADDRESS_MODE_4_BYTE
Definition: driver_w25qxx.h:96
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
w25qxx_interface_spi_qspi_deinit
uint8_t w25qxx_interface_spi_qspi_deinit(void)
interface spi qspi bus deinit
Definition: driver_w25qxx_interface_template.c:58
w25qxx_interface_spi_qspi_init
uint8_t w25qxx_interface_spi_qspi_init(void)
interface spi qspi bus init
Definition: driver_w25qxx_interface_template.c:46
w25qxx_interface_delay_us
void w25qxx_interface_delay_us(uint32_t us)
interface delay us
Definition: driver_w25qxx_interface_template.c:108
w25qxx_interface_spi_qspi_write_read
uint8_t w25qxx_interface_spi_qspi_write_read(uint8_t instruction, uint8_t instruction_line, uint32_t address, uint8_t address_line, uint8_t address_len, uint32_t alternate, uint8_t alternate_line, uint8_t alternate_len, uint8_t dummy, uint8_t *in_buf, uint32_t in_len, uint8_t *out_buf, uint32_t out_len, uint8_t data_line)
interface spi qspi bus write read
Definition: driver_w25qxx_interface_template.c:84
w25qxx_interface_debug_print
void w25qxx_interface_debug_print(const char *const fmt,...)
interface print format data
Definition: driver_w25qxx_interface_template.c:118
w25qxx_interface_delay_ms
void w25qxx_interface_delay_ms(uint32_t ms)
interface delay ms
Definition: driver_w25qxx_interface_template.c:98
DRIVER_W25QXX_LINK_DELAY_MS
#define DRIVER_W25QXX_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
Definition: driver_w25qxx.h:297
DRIVER_W25QXX_LINK_INIT
#define DRIVER_W25QXX_LINK_INIT(HANDLE, STRUCTURE)
initialize w25qxx_handle_t structure
Definition: driver_w25qxx.h:265
DRIVER_W25QXX_LINK_SPI_QSPI_INIT
#define DRIVER_W25QXX_LINK_SPI_QSPI_INIT(HANDLE, FUC)
link spi_qspi_init function
Definition: driver_w25qxx.h:273
DRIVER_W25QXX_LINK_DEBUG_PRINT
#define DRIVER_W25QXX_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
Definition: driver_w25qxx.h:313
DRIVER_W25QXX_LINK_SPI_QSPI_WRITE_READ
#define DRIVER_W25QXX_LINK_SPI_QSPI_WRITE_READ(HANDLE, FUC)
link spi_qspi_write_read function
Definition: driver_w25qxx.h:289
DRIVER_W25QXX_LINK_SPI_QSPI_DEINIT
#define DRIVER_W25QXX_LINK_SPI_QSPI_DEINIT(HANDLE, FUC)
link spi_qspi_deinit function
Definition: driver_w25qxx.h:281
DRIVER_W25QXX_LINK_DELAY_US
#define DRIVER_W25QXX_LINK_DELAY_US(HANDLE, FUC)
link delay_us function
Definition: driver_w25qxx.h:305
w25qxx_handle_s
w25qxx handle structure definition
Definition: driver_w25qxx.h:210