Loading...
Searching...
No Matches
nvram-spi.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Eistec AB
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for more
6 * details.
7 */
8
9#pragma once
10
24
25#include <stdint.h>
26#include "nvram.h"
27#include "periph/spi.h"
28#include "periph/gpio.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
47
60int nvram_spi_init(nvram_t *dev, nvram_spi_params_t *spi_params, size_t size);
61
62#ifdef __cplusplus
63}
64#endif
65
spi_clk_t
Definition periph_cpu.h:348
Low-level GPIO peripheral driver interface definitions.
struct nvram nvram_t
Device descriptor for generic NVRAM devices.
struct nvram_spi_params nvram_spi_params_t
Bus parameters for SPI NVRAM.
int nvram_spi_init(nvram_t *dev, nvram_spi_params_t *spi_params, size_t size)
Initialize an nvram_t structure with SPI settings.
Generic non-volatile RAM driver interface.
Low-level SPI peripheral driver interface definition.
Bus parameters for SPI NVRAM.
Definition nvram-spi.h:37
uint8_t address_count
Number of address bytes following each read/write command.
Definition nvram-spi.h:45
gpio_t cs
Chip select pin.
Definition nvram-spi.h:43
spi_t spi
RIOT SPI device.
Definition nvram-spi.h:39
spi_clk_t clk
SPI clock speed.
Definition nvram-spi.h:41