STM32 W25Qxx QuadSPI Driver  0.1a
https://github.com/Crazy-Geeks/STM32-W25Q-QSPI
Functions
Read Functions

Read operations - single data type variables or raw 8-bit blocks. More...

Functions

W25Q_STATE W25Q_ReadSByte (i8_t *buf, u8_t pageShift, u32_t pageNum)
 W25Q Read single Signed Byte Read signed 8-bit byte variable. More...
 
W25Q_STATE W25Q_ReadByte (u8_t *buf, u8_t pageShift, u32_t pageNum)
 W25Q Read single Unsigned Byte Read unsigned 8-bit byte variable. More...
 
W25Q_STATE W25Q_ReadSWord (i16_t *buf, u8_t pageShift, u32_t pageNum)
 W25Q Read single Signed Word Read signed 16-bit word variable. More...
 
W25Q_STATE W25Q_ReadWord (u16_t *buf, u8_t pageShift, u32_t pageNum)
 W25Q Read single Unsigned Word Read unsigned 16-bit word variable. More...
 
W25Q_STATE W25Q_ReadSLong (i32_t *buf, u8_t pageShift, u32_t pageNum)
 W25Q Read single Signed Long Read signed 32-bit long variable. More...
 
W25Q_STATE W25Q_ReadLong (u32_t *buf, u8_t pageShift, u32_t pageNum)
 W25Q Read single Signed Long Read signed 32-bit long variable. More...
 
W25Q_STATE W25Q_ReadData (u8_t *buf, u16_t len, u8_t pageShift, u32_t pageNum)
 W25Q Read any 8-bit data Read any 8-bit data from preffered page place. More...
 
W25Q_STATE W25Q_ReadRaw (u8_t *buf, u16_t data_len, u32_t rawAddr)
 W25Q Read any 8-bit data from raw addr Read any 8-bit data from preffered chip address. More...
 
W25Q_STATE W25Q_SingleRead (u8_t *buf, u32_t len, u32_t Addr)
 W25Q Read any 8-bit data from raw addr Read any 8-bit data from preffered chip address by SINGLE SPI. More...
 

Detailed Description

Read operations - single data type variables or raw 8-bit blocks.

Function Documentation

◆ W25Q_ReadByte()

W25Q_STATE W25Q_ReadByte ( u8_t buf,
u8_t  pageShift,
u32_t  pageNum 
)

W25Q Read single Unsigned Byte Read unsigned 8-bit byte variable.

Read 8-bit variable.

Parameters
[out]bufData to be read (single)
[in]pageShiftByte shift inside page (0..254)
[in]pageNumPage number (0..PAGE_COUNT)
Returns
W25Q_STATE enum

◆ W25Q_ReadData()

W25Q_STATE W25Q_ReadData ( u8_t buf,
u16_t  len,
u8_t  pageShift,
u32_t  pageNum 
)

W25Q Read any 8-bit data Read any 8-bit data from preffered page place.

Read any 8-bit data.

Note
Use memcpy to decode data
Parameters
[out]bufPointer to data to be read (single or array)
[in]lenLength of data (1..256)
[in]pageShiftByte shift inside page (0..255 - len)
[in]pageNumPage number (0..PAGE_COUNT)
Returns
W25Q_STATE enum

◆ W25Q_ReadLong()

W25Q_STATE W25Q_ReadLong ( u32_t buf,
u8_t  pageShift,
u32_t  pageNum 
)

W25Q Read single Signed Long Read signed 32-bit long variable.

Read 32-bit variable.

Parameters
[out]bufData to be read (single)
[in]pageShiftByte shift inside page (0..251)
[in]pageNumPage number (0..PAGE_COUNT)
Returns
W25Q_STATE enum

◆ W25Q_ReadRaw()

W25Q_STATE W25Q_ReadRaw ( u8_t buf,
u16_t  data_len,
u32_t  rawAddr 
)

W25Q Read any 8-bit data from raw addr Read any 8-bit data from preffered chip address.

Read data from raw addr.

Note
Address is in [byte] size
Be carefull with page overrun
Parameters
[out]bufPointer to data to be written (single or array)
[in]data_lenLength of data (1..256)
[in]rawAddrStart address of chip's cell
Returns
W25Q_STATE enum

◆ W25Q_ReadSByte()

W25Q_STATE W25Q_ReadSByte ( i8_t buf,
u8_t  pageShift,
u32_t  pageNum 
)

W25Q Read single Signed Byte Read signed 8-bit byte variable.

Read signed 8-bit variable.

Parameters
[out]bufData to be read (single)
[in]pageShiftByte shift inside page (0..254)
[in]pageNumPage number (0..PAGE_COUNT)
Returns
W25Q_STATE enum

◆ W25Q_ReadSLong()

W25Q_STATE W25Q_ReadSLong ( i32_t buf,
u8_t  pageShift,
u32_t  pageNum 
)

W25Q Read single Signed Long Read signed 32-bit long variable.

Read signed 32-bit variable.

Parameters
[out]bufData to be read (single)
[in]pageShiftByte shift inside page (0..251)
[in]pageNumPage number (0..PAGE_COUNT)
Returns
W25Q_STATE enum

◆ W25Q_ReadSWord()

W25Q_STATE W25Q_ReadSWord ( i16_t buf,
u8_t  pageShift,
u32_t  pageNum 
)

W25Q Read single Signed Word Read signed 16-bit word variable.

Read signed 16-bit variable.

Parameters
[out]bufData to be read (single)
[in]pageShiftByte shift inside page (0..253)
[in]pageNumPage number (0..PAGE_COUNT)
Returns
W25Q_STATE enum

◆ W25Q_ReadWord()

W25Q_STATE W25Q_ReadWord ( u16_t buf,
u8_t  pageShift,
u32_t  pageNum 
)

W25Q Read single Unsigned Word Read unsigned 16-bit word variable.

Read 16-bit variable.

Parameters
[out]bufData to be read (single)
[in]pageShiftByte shift inside page (0..253)
[in]pageNumPage number (0..PAGE_COUNT)
Returns
W25Q_STATE enum

◆ W25Q_SingleRead()

W25Q_STATE W25Q_SingleRead ( u8_t buf,
u32_t  len,
u32_t  Addr 
)

W25Q Read any 8-bit data from raw addr Read any 8-bit data from preffered chip address by SINGLE SPI.

Read data from raw addr by single line.

Note
Works only with SINGLE SPI Line
Parameters
[out]bufPointer to data array
[in]lenLength of array
[in]AddrAddress to data
Returns
W25Q_STATE enum