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
23#ifndef NVRAM_SPI_H
24#define NVRAM_SPI_H
25
26#include <stdint.h>
27#include "nvram.h"
28#include "periph/spi.h"
29#include "periph/gpio.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
48
61int nvram_spi_init(nvram_t *dev, nvram_spi_params_t *spi_params, size_t size);
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif /* NVRAM_SPI_H */
spi_clk_t
Definition periph_cpu.h:352
Low-level GPIO peripheral driver interface definitions.
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:38
uint8_t address_count
Number of address bytes following each read/write command.
Definition nvram-spi.h:46
gpio_t cs
Chip select pin.
Definition nvram-spi.h:44
spi_t spi
RIOT SPI device.
Definition nvram-spi.h:40
spi_clk_t clk
SPI clock speed.
Definition nvram-spi.h:42
Device descriptor for generic NVRAM devices.
Definition nvram.h:48