| LibDriver W25QXX 1.0.0 W25QXX full function driver

Enumerations | Functions
w25qxx advance driver function
w25qxx driver function

w25qxx advance driver modules More...

## Enumerations
enum | w25qxx_qspi_read_dummy_t { W25QXX_QSPI_READ_DUMMY_2_33MHZ = 0x00 , W25QXX_QSPI_READ_DUMMY_4_55MHZ = 0x01 , W25QXX_QSPI_READ_DUMMY_6_80MHZ = 0x02 , W25QXX_QSPI_READ_DUMMY_8_80MHZ = 0x03 }
| w25qxx qspi read dummy enumeration definition More...
enum | w25qxx_qspi_read_wrap_length_t { W25QXX_QSPI_READ_WRAP_LENGTH_8_BYTE = 0x00 , W25QXX_QSPI_READ_WRAP_LENGTH_16_BYTE = 0x01 , W25QXX_QSPI_READ_WRAP_LENGTH_32_BYTE = 0x02 , W25QXX_QSPI_READ_WRAP_LENGTH_64_BYTE = 0x03 }
| w25qxx qspi read wrap length enumeration definition More...
enum | w25qxx_security_register_t { W25QXX_SECURITY_REGISTER_1 = 0x10 , W25QXX_SECURITY_REGISTER_2 = 0x20 , W25QXX_SECURITY_REGISTER_3 = 0x30 }
| w25qxx security register enumeration definition More...
enum | w25qxx_burst_wrap_t { W25QXX_BURST_WRAP_NONE = 0x10 , W25QXX_BURST_WRAP_8_BYTE = 0x00 , W25QXX_BURST_WRAP_16_BYTE = 0x20 , W25QXX_BURST_WRAP_32_BYTE = 0x40 , W25QXX_BURST_WRAP_64_BYTE = 0x60 }
| w25qxx burst wrap enumeration definition More...
enum | w25qxx_status1_t { W25QXX_STATUS1_STATUS_REGISTER_PROTECT_0 = (1 << 7) , W25QXX_STATUS1_SECTOR_PROTECT_OR_TOP_BOTTOM_PROTECT = (1 << 6) , W25QXX_STATUS1_TOP_BOTTOM_PROTECT_OR_BLOCK_PROTECT_3 = (1 << 5) , W25QXX_STATUS1_BLOCK_PROTECT_2 = (1 << 4) , W25QXX_STATUS1_BLOCK_PROTECT_1 = (1 << 3) , W25QXX_STATUS1_BLOCK_PROTECT_0 = (1 << 2) , W25QXX_STATUS1_WRITE_ENABLE_LATCH = (1 << 1) , W25QXX_STATUS1_ERASE_WRITE_PROGRESS = (1 << 0) }
| w25qxx status 1 enumeration definition More...
enum | w25qxx_status2_t { W25QXX_STATUS2_SUSPEND_STATUS = (1 << 7) , W25QXX_STATUS2_COMPLEMENT_PROTECT = (1 << 6) , W25QXX_STATUS2_SECURITY_REGISTER_3_LOCK_BITS = (1 << 5) , W25QXX_STATUS2_SECURITY_REGISTER_2_LOCK_BITS = (1 << 4) , W25QXX_STATUS2_SECURITY_REGISTER_1_LOCK_BITS = (1 << 3) , W25QXX_STATUS2_QUAD_ENABLE = (1 << 1) , W25QXX_STATUS2_STATUS_REGISTER_PROTECT_1 = (1 << 0) }
| w25qxx status 2 enumeration definition More...
enum | w25qxx_status3_t { W25QXX_STATUS3_HOLD_RESET_FUNCTION = (1 << 7) , W25QXX_STATUS3_OUTPUT_DRIVER_STRENGTH_100_PERCENTAGE = (0 << 5) , W25QXX_STATUS3_OUTPUT_DRIVER_STRENGTH_75_PERCENTAGE = (1 << 5) , W25QXX_STATUS3_OUTPUT_DRIVER_STRENGTH_50_PERCENTAGE = (2 << 5) , W25QXX_STATUS3_OUTPUT_DRIVER_STRENGTH_25_PERCENTAGE = (3 << 5) , W25QXX_STATUS3_WRITE_PROTECT_SELECTION = (1 << 2) , W25QXX_STATUS3_POWER_UP_ADDRESS_MODE = (1 << 1) , W25QXX_STATUS3_CURRENT_ADDRESS_MODE = (1 << 0) }
| w25qxx status 3 enumeration definition More...

## Functions
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 More...
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 More...
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 More...
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 More...
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 More...
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 More...
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 More...
uint8_t | w25qxx_enable_write (w25qxx_handle_t *handle)
| enable writing More...
uint8_t | w25qxx_enable_volatile_sr_write (w25qxx_handle_t *handle)
| enable volatile sr writing More...
uint8_t | w25qxx_disable_write (w25qxx_handle_t *handle)
| disable writing More...
uint8_t | w25qxx_get_status1 (w25qxx_handle_t *handle, uint8_t *status)
| get the status 1 More...
uint8_t | w25qxx_get_status2 (w25qxx_handle_t *handle, uint8_t *status)
| get the status 2 More...
uint8_t | w25qxx_get_status3 (w25qxx_handle_t *handle, uint8_t *status)
| get the status 3 More...
uint8_t | w25qxx_set_status1 (w25qxx_handle_t *handle, uint8_t status)
| set the status 1 More...
uint8_t | w25qxx_set_status2 (w25qxx_handle_t *handle, uint8_t status)
| set the status 2 More...
uint8_t | w25qxx_set_status3 (w25qxx_handle_t *handle, uint8_t status)
| set the status 3 More...
uint8_t | w25qxx_erase_program_suspend (w25qxx_handle_t *handle)
| suspend erase or program More...
uint8_t | w25qxx_erase_program_resume (w25qxx_handle_t *handle)
| resume erase or program More...
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 More...
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 More...
uint8_t | w25qxx_get_jedec_id (w25qxx_handle_t *handle, uint8_t *manufacturer, uint8_t device_id[2])
| get the jedec id information More...
uint8_t | w25qxx_global_block_lock (w25qxx_handle_t *handle)
| lock the whole block More...
uint8_t | w25qxx_global_block_unlock (w25qxx_handle_t *handle)
| unlock the whole block More...
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 More...
uint8_t | w25qxx_enter_qspi_mode (w25qxx_handle_t *handle)
| enter the qspi mode More...
uint8_t | w25qxx_exit_qspi_mode (w25qxx_handle_t *handle)
| exit the qspi mode More...
uint8_t | w25qxx_enable_reset (w25qxx_handle_t *handle)
| enable the reset More...
uint8_t | w25qxx_reset_device (w25qxx_handle_t *handle)
| reset the device More...
uint8_t | w25qxx_get_unique_id (w25qxx_handle_t *handle, uint8_t id[8])
| get the unique id More...
uint8_t | w25qxx_get_sfdp (w25qxx_handle_t *handle, uint8_t sfdp[256])
| get the sfdp More...
uint8_t | w25qxx_erase_security_register (w25qxx_handle_t *handle, w25qxx_security_register_t num)
| erase the security register More...
uint8_t | w25qxx_program_security_register (w25qxx_handle_t *handle, w25qxx_security_register_t num, uint8_t data[256])
| program the security register More...
uint8_t | w25qxx_read_security_register (w25qxx_handle_t *handle, w25qxx_security_register_t num, uint8_t data[256])
| read the security register More...
uint8_t | w25qxx_individual_block_lock (w25qxx_handle_t *handle, uint32_t addr)
| lock the individual block More...
uint8_t | w25qxx_individual_block_unlock (w25qxx_handle_t *handle, uint32_t addr)
| unlock the individual block More...
uint8_t | w25qxx_read_block_lock (w25qxx_handle_t *handle, uint32_t addr, uint8_t *value)
| read the block lock More...
uint8_t | w25qxx_set_burst_with_wrap (w25qxx_handle_t *handle, w25qxx_burst_wrap_t wrap)
| set the burst with wrap More...

## Detailed Description

w25qxx advance driver modules

## Enumeration Type Documentation

## ◆ w25qxx_burst_wrap_t

enum w25qxx_burst_wrap_t

w25qxx burst wrap enumeration definition

Enumerator
W25QXX_BURST_WRAP_NONE | no burst wrap
W25QXX_BURST_WRAP_8_BYTE | 8 byte burst wrap
W25QXX_BURST_WRAP_16_BYTE | 16 byte burst wrap
W25QXX_BURST_WRAP_32_BYTE | 32 byte burst wrap
W25QXX_BURST_WRAP_64_BYTE | 64 byte burst wrap

Definition at line 144 of file driver_w25qxx.h.

## ◆ w25qxx_qspi_read_dummy_t

enum w25qxx_qspi_read_dummy_t

w25qxx qspi read dummy enumeration definition

Enumerator
W25QXX_QSPI_READ_DUMMY_2_33MHZ | qspi read dummy 2 max 33 MHz
W25QXX_QSPI_READ_DUMMY_4_55MHZ | qspi read dummy 4 max 55 MHz
W25QXX_QSPI_READ_DUMMY_6_80MHZ | qspi read dummy 6 max 80 MHz
W25QXX_QSPI_READ_DUMMY_8_80MHZ | qspi read dummy 8 max 80 MHz

Definition at line 111 of file driver_w25qxx.h.

## ◆ w25qxx_qspi_read_wrap_length_t

enum w25qxx_qspi_read_wrap_length_t

w25qxx qspi read wrap length enumeration definition

Enumerator
W25QXX_QSPI_READ_WRAP_LENGTH_8_BYTE | read wrap length 8 byte
W25QXX_QSPI_READ_WRAP_LENGTH_16_BYTE | read wrap length 16 byte
W25QXX_QSPI_READ_WRAP_LENGTH_32_BYTE | read wrap length 32 byte
W25QXX_QSPI_READ_WRAP_LENGTH_64_BYTE | read wrap length 64 byte

Definition at line 122 of file driver_w25qxx.h.

## ◆ w25qxx_security_register_t

enum w25qxx_security_register_t

w25qxx security register enumeration definition

Enumerator
W25QXX_SECURITY_REGISTER_1 | security register 1
W25QXX_SECURITY_REGISTER_2 | security register 2
W25QXX_SECURITY_REGISTER_3 | security register 3

Definition at line 134 of file driver_w25qxx.h.

## ◆ w25qxx_status1_t

enum w25qxx_status1_t

w25qxx status 1 enumeration definition

Enumerator
W25QXX_STATUS1_STATUS_REGISTER_PROTECT_0 | status register protect 0
W25QXX_STATUS1_SECTOR_PROTECT_OR_TOP_BOTTOM_PROTECT | sector protect bit or top / bottom protect bit
W25QXX_STATUS1_TOP_BOTTOM_PROTECT_OR_BLOCK_PROTECT_3 | top / bottom protect bit or block 3 protect bit
W25QXX_STATUS1_BLOCK_PROTECT_2 | block 2 protect bit
W25QXX_STATUS1_BLOCK_PROTECT_1 | block 1 protect bit
W25QXX_STATUS1_BLOCK_PROTECT_0 | block 0 protect bit
W25QXX_STATUS1_WRITE_ENABLE_LATCH | write enable latch
W25QXX_STATUS1_ERASE_WRITE_PROGRESS | erase / write in progress

Definition at line 156 of file driver_w25qxx.h.

## ◆ w25qxx_status2_t

enum w25qxx_status2_t

w25qxx status 2 enumeration definition

Enumerator
W25QXX_STATUS2_SUSPEND_STATUS | suspend status
W25QXX_STATUS2_COMPLEMENT_PROTECT | complement protect
W25QXX_STATUS2_SECURITY_REGISTER_3_LOCK_BITS | security register 3 lock bits
W25QXX_STATUS2_SECURITY_REGISTER_2_LOCK_BITS | security register 2 lock bits
W25QXX_STATUS2_SECURITY_REGISTER_1_LOCK_BITS | security register 1 lock bits
W25QXX_STATUS2_QUAD_ENABLE | quad enable
W25QXX_STATUS2_STATUS_REGISTER_PROTECT_1 | status register protect 1

Definition at line 171 of file driver_w25qxx.h.

## ◆ w25qxx_status3_t

enum w25qxx_status3_t

w25qxx status 3 enumeration definition

Enumerator
W25QXX_STATUS3_HOLD_RESET_FUNCTION | HOLD or RESET function
W25QXX_STATUS3_OUTPUT_DRIVER_STRENGTH_100_PERCENTAGE | output driver strength 100%
W25QXX_STATUS3_OUTPUT_DRIVER_STRENGTH_75_PERCENTAGE | output driver strength 75%
W25QXX_STATUS3_OUTPUT_DRIVER_STRENGTH_50_PERCENTAGE | output driver strength 50%
W25QXX_STATUS3_OUTPUT_DRIVER_STRENGTH_25_PERCENTAGE | output driver strength 25%
W25QXX_STATUS3_WRITE_PROTECT_SELECTION | write protect selection
W25QXX_STATUS3_POWER_UP_ADDRESS_MODE | power up address mode
W25QXX_STATUS3_CURRENT_ADDRESS_MODE | current address mode

Definition at line 185 of file driver_w25qxx.h.

## Function Documentation

## ◆ w25qxx_disable_write()

uint8_t w25qxx_disable_write | ( | w25qxx_handle_t * | handle | ) |

disable writing

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 disable write failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 572 of file driver_w25qxx.c.

## ◆ w25qxx_enable_reset()

uint8_t w25qxx_enable_reset | ( | w25qxx_handle_t * | handle | ) |

enable the reset

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 enable reset failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2619 of file driver_w25qxx.c.

## ◆ w25qxx_enable_volatile_sr_write()

uint8_t w25qxx_enable_volatile_sr_write | ( | w25qxx_handle_t * | handle | ) |

enable volatile sr writing

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 enable volatile sr write failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 501 of file driver_w25qxx.c.

## ◆ w25qxx_enable_write()

uint8_t w25qxx_enable_write | ( | w25qxx_handle_t * | handle | ) |

enable writing

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 enable write failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 431 of file driver_w25qxx.c.

## ◆ w25qxx_enter_qspi_mode()

uint8_t w25qxx_enter_qspi_mode | ( | w25qxx_handle_t * | handle | ) |

enter the qspi mode

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 enter qspi mode failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 qspi interface can't use this function

Note
  none

Definition at line 2494 of file driver_w25qxx.c.

## ◆ w25qxx_erase_program_resume()

uint8_t w25qxx_erase_program_resume | ( | w25qxx_handle_t * | handle | ) |

resume erase or program

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 erase program resume failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1722 of file driver_w25qxx.c.

## ◆ w25qxx_erase_program_suspend()

uint8_t w25qxx_erase_program_suspend | ( | w25qxx_handle_t * | handle | ) |

suspend erase or program

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 erase program suspend failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 1650 of file driver_w25qxx.c.

## ◆ w25qxx_erase_security_register()

uint8_t w25qxx_erase_security_register | ( | w25qxx_handle_t * | handle,
|  | w25qxx_security_register_t | num
| ) |  |

erase the security register

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | num | is the security register number

Returns
  status code
  - 0 success
  - 1 erase security register failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function
  - 6 erase security register timeout

Note
  none

Definition at line 2952 of file driver_w25qxx.c.

## ◆ w25qxx_exit_qspi_mode()

uint8_t w25qxx_exit_qspi_mode | ( | w25qxx_handle_t * | handle | ) |

exit the qspi mode

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 exit qspi mode failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 spi interface can't use this function

Note
  none

Definition at line 2572 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [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

Returns
  status code
  - 0 success
  - 1 fast read dual io failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function
  - 6 standard spi can't use this function failed

Note
  none

Definition at line 4076 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [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

Returns
  status code
  - 0 success
  - 1 fast read dual output failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function
  - 6 standard spi can't use this function failed

Note
  none

Definition at line 3858 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [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

Returns
  status code
  - 0 success
  - 1 fast read quad io failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 6 standard spi can't use this function failed

Note
  none

Definition at line 4184 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [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

Returns
  status code
  - 0 success
  - 1 fast read quad output failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function
  - 6 standard spi can't use this function failed

Note
  none

Definition at line 3967 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [out] | *manufacturer | points to a manufacturer buffer
  [out] | *device_id | points to a device id buffer

Returns
  status code
  - 0 success
  - 1 get jedec id failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2203 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [out] | *manufacturer | points to a manufacturer buffer
  [out] | *device_id | points to a device id buffer

Returns
  status code
  - 0 success
  - 1 get manufacturer device id dual io failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function
  - 6 standard spi can't use this function failed

Note
  none

Definition at line 2038 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [out] | *manufacturer | points to a manufacturer buffer
  [out] | *device_id | points to a device id buffer

Returns
  status code
  - 0 success
  - 1 get manufacturer device id quad io failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function
  - 6 standard spi can't use this function failed

Note
  none

Definition at line 2122 of file driver_w25qxx.c.

## ◆ w25qxx_get_sfdp()

uint8_t w25qxx_get_sfdp | ( | w25qxx_handle_t * | handle,
|  | uint8_t | sfdp[256]
| ) |  |

get the sfdp

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [out] | *sfdp | points to an sfdp buffer

Returns
  status code
  - 0 success
  - 1 get the sfdp failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 qspi can't use this function

Note
  none

Definition at line 2880 of file driver_w25qxx.c.

## ◆ w25qxx_get_status1()

uint8_t w25qxx_get_status1 | ( | w25qxx_handle_t * | handle,
|  | uint8_t * | status
| ) |  |

get the status 1

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [out] | *status | points to a status buffer

Returns
  status code
  - 0 success
  - 1 get status 1 failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 643 of file driver_w25qxx.c.

## ◆ w25qxx_get_status2()

uint8_t w25qxx_get_status2 | ( | w25qxx_handle_t * | handle,
|  | uint8_t * | status
| ) |  |

get the status 2

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [out] | *status | points to a status buffer

Returns
  status code
  - 0 success
  - 1 get status 2 failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 716 of file driver_w25qxx.c.

## ◆ w25qxx_get_status3()

uint8_t w25qxx_get_status3 | ( | w25qxx_handle_t * | handle,
|  | uint8_t * | status
| ) |  |

get the status 3

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [out] | *status | points to a status buffer

Returns
  status code
  - 0 success
  - 1 get status 3 failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 789 of file driver_w25qxx.c.

## ◆ w25qxx_get_unique_id()

uint8_t w25qxx_get_unique_id | ( | w25qxx_handle_t * | handle,
|  | uint8_t | id[8]
| ) |  |

get the unique id

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [out] | *id | points to an id buffer

Returns
  status code
  - 0 success
  - 1 get the unique id failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function

Note
  none

Definition at line 2764 of file driver_w25qxx.c.

## ◆ w25qxx_global_block_lock()

uint8_t w25qxx_global_block_lock | ( | w25qxx_handle_t * | handle | ) |

lock the whole block

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 global block lock failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2284 of file driver_w25qxx.c.

## ◆ w25qxx_global_block_unlock()

uint8_t w25qxx_global_block_unlock | ( | w25qxx_handle_t * | handle | ) |

unlock the whole block

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 global block unlock failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2354 of file driver_w25qxx.c.

## ◆ w25qxx_individual_block_lock()

uint8_t w25qxx_individual_block_lock | ( | w25qxx_handle_t * | handle,
|  | uint32_t | addr
| ) |  |

lock the individual block

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | addr | is the block address

Returns
  status code
  - 0 success
  - 1 individual block lock failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid

Note
  none

Definition at line 6094 of file driver_w25qxx.c.

## ◆ w25qxx_individual_block_unlock()

uint8_t w25qxx_individual_block_unlock | ( | w25qxx_handle_t * | handle,
|  | uint32_t | addr
| ) |  |

unlock the individual block

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | addr | is the block address

Returns
  status code
  - 0 success
  - 1 individual block unlock failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid

Note
  none

Definition at line 6311 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [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

Returns
  status code
  - 0 success
  - 1 octal word read quad io failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function
  - 6 standard spi can't use this function failed

Note
  none

Definition at line 4459 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [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

Returns
  status code
  - 0 success
  - 1 quad page program failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 addr is invalid
  - 5 qspi can't use this function
  - 6 page program timeout
  - 7 length is over 256
  - 8 standard spi can't use this function failed

Note
  len <= 256

Definition at line 4920 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | num | is the security register number
  [in] | *data | points to a data buffer

Returns
  status code
  - 0 success
  - 1 program security register failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function
  - 6 program security register timeout

Note
  none

Definition at line 3147 of file driver_w25qxx.c.

## ◆ w25qxx_read_block_lock()

uint8_t w25qxx_read_block_lock | ( | w25qxx_handle_t * | handle,
|  | uint32_t | addr,
|  | uint8_t * | value
| ) |  |

read the block lock

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | addr | is the block address
  [out] | *value | points to a value buffer

Returns
  status code
  - 0 success
  - 1 read block lock failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid

Note
  none

Definition at line 6529 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | num | is the security register number
  [out] | *data | points to a data buffer

Returns
  status code
  - 0 success
  - 1 read security register failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function
  - 6 program security register timeout

Note
  none

Definition at line 3344 of file driver_w25qxx.c.

## ◆ w25qxx_reset_device()

uint8_t w25qxx_reset_device | ( | w25qxx_handle_t * | handle | ) |

reset the device

Parameters

  [in] | *handle | points to a w25qxx handle structure

Returns
  status code
  - 0 success
  - 1 reset device failed
  - 2 handle is NULL
  - 3 handle is not initialized

Note
  none

Definition at line 2690 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | wrap | is the burst wrap

Returns
  status code
  - 0 success
  - 1 set burst with wrap failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 qspi can't use this function

Note
  none

Definition at line 6746 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | dummy | is the qspi read dummy
  [in] | length | is the qspi read wrap length

Returns
  status code
  - 0 success
  - 1 set read parameters failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 spi interface can't use this function

Note
  none

Definition at line 2427 of file driver_w25qxx.c.

## ◆ w25qxx_set_status1()

uint8_t w25qxx_set_status1 | ( | w25qxx_handle_t * | handle,
|  | uint8_t | status
| ) |  |

set the status 1

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | status | is the set status

Returns
  status code
  - 0 success
  - 1 set status 1 failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 write status 1 timeout

Note
  none

Definition at line 863 of file driver_w25qxx.c.

## ◆ w25qxx_set_status2()

uint8_t w25qxx_set_status2 | ( | w25qxx_handle_t * | handle,
|  | uint8_t | status
| ) |  |

set the status 2

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | status | is the set status

Returns
  status code
  - 0 success
  - 1 set status 2 failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 write status 2 timeout

Note
  none

Definition at line 1062 of file driver_w25qxx.c.

## ◆ w25qxx_set_status3()

uint8_t w25qxx_set_status3 | ( | w25qxx_handle_t * | handle,
|  | uint8_t | status
| ) |  |

set the status 3

Parameters

  [in] | *handle | points to a w25qxx handle structure
  [in] | status | is the set status

Returns
  status code
  - 0 success
  - 1 set status 3 failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 write status 3 timeout

Note
  none

Definition at line 1261 of file driver_w25qxx.c.

## ◆ 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

Parameters

  [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

Returns
  status code
  - 0 success
  - 1 word read quad io failed
  - 2 handle is NULL
  - 3 handle is not initialized
  - 4 address mode is invalid
  - 5 qspi can't use this function
  - 6 standard spi can't use this function failed

Note
  none

Definition at line 4350 of file driver_w25qxx.c.