NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
spi_flash.h File Reference

SPI flash driver. More...

#include <stdint.h>

Go to the source code of this file.

Functions

int spi_flash_setup (void)
 
int spi_flash_erase (void)
 
int spi_flash_stream_get (uint32_t *rdata)
 
int spi_flash_stream_put (uint32_t wdata)
 

Detailed Description

SPI flash driver.

Function Documentation

◆ spi_flash_erase()

int spi_flash_erase ( void )

Erase flash. Call spi_flash_setup() before.

Returns
0 if success, !=0 if error

◆ spi_flash_setup()

int spi_flash_setup ( void )

Setup SPI flash.

Returns
0 if success, !=0 if error

◆ spi_flash_stream_get()

int spi_flash_stream_get ( uint32_t * rdata)

Read stream word from SPI flash.

Parameters
[in,out]rdataPointer for returned data (uint32_t).
Returns
0 if success, !=0 if error

◆ spi_flash_stream_put()

int spi_flash_stream_put ( uint32_t wdata)

Write stream word to SPI flash.

Parameters
wdataSPI flash write data.
Returns
0 if success, !=0 if error