nvram-spi.h¶
Device interface for various SPI connected NVRAM.
Tested on:
- Cypress/Ramtron FM25L04B.
-
struct nvram_spi_params
nvram_spi_params_t
¶ Bus parameters for SPI NVRAM.
-
int
nvram_spi_init
(nvram.h::nvram_t
* dev,nvram-spi.h::nvram_spi_params_t
* spi_params,msp430_types.h::size_t
size)¶ Initialize an nvram_t structure with SPI settings.
This will also initialize the CS pin as a GPIO output, without pull resistors.
Parameters
dev: Pointer to NVRAM device descriptor spi_params: Pointer to SPI settings size: Device capacity Return values
- 0 on success
- <0 on errors
-
struct
nvram_spi_params
¶ Bus parameters for SPI NVRAM.
-
spi.h::spi_t
spi
¶ RIOT SPI device.
-
atmega_common/include/periph_cpu_common.h::spi_clk_t
clk
¶ SPI clock speed.
-
gpio.h::gpio_t
cs
¶ Chip select pin.
-
uint8_t
address_count
¶ Number of address bytes following each read/write command.
-