Loading...
Searching...
No Matches
W25Q128

Data Structures

struct  W25Q128_t
 

Functions

W25Q128_t W25Q128_init (W25Q128_t *, SPI_t *, GPIOpin_t)
 Initialise flash struct.
 
void W25Q128_readPage (Flash_t *, uint32_t, volatile uint8_t *)
 Read from flash.
 
void W25Q128_writePage (Flash_t *, uint32_t, uint8_t *)
 Write page to flash.
 
void W25Q128_erase (Flash_t *)
 Erase flash chip.
 

Detailed Description


Data Structure Documentation

◆ W25Q128_t

struct W25Q128_t

Definition at line 33 of file w25q128.h.

Data Fields
Flash_t base
SPI_t * spi Parent SPI interface.
GPIOpin_t cs Chip select GPIO.

Function Documentation

◆ W25Q128_init()

W25Q128_t W25Q128_init ( W25Q128_t * flash,
SPI_t * spi,
GPIOpin_t cs )

Initialise flash struct.

Parameters
*flashPointer to Flash struct.
*portPointer to GPIO port.
csAddress to flash chip select.
Returns
NULL.

Definition at line 22 of file w25q128.c.

◆ W25Q128_readPage()

void W25Q128_readPage ( Flash_t * flash,
uint32_t address,
volatile uint8_t * data )

Read from flash.

Parameters
*flashPointer to Flash struct.
addressAddress in memory to write to.
*dataPointer to start of page buffer to read to.
Returns
NULL.

Definition at line 197 of file w25q128.c.

◆ W25Q128_writePage()

void W25Q128_writePage ( Flash_t * flash,
uint32_t address,
uint8_t * data )

Write page to flash.

Parameters
*flashPointer to Flash struct.
addressAddress in memory to write to.
*dataPointer to start of page buffer to write.
Returns
NULL.

Definition at line 158 of file w25q128.c.

◆ W25Q128_erase()

void W25Q128_erase ( Flash_t * flash)

Erase flash chip.

Parameters
*flashPointer to Flash struct.
Returns
NULL.

Definition at line 129 of file w25q128.c.