Loading...
Searching...
No Matches
soft_spi_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Hamburg University of Applied Sciences
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "soft_spi.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#ifndef SOFT_SPI_PARAM_MISO
25#define SOFT_SPI_PARAM_MISO (GPIO_UNDEF)
26#endif
27#ifndef SOFT_SPI_PARAM_MOSI
28#define SOFT_SPI_PARAM_MOSI (GPIO_PIN(0, 0))
29#endif
30#ifndef SOFT_SPI_PARAM_CLK
31#define SOFT_SPI_PARAM_CLK (GPIO_PIN(0, 1))
32#endif
33
34#ifndef SOFT_SPI_PARAMS
35#define SOFT_SPI_PARAMS { .miso_pin = SOFT_SPI_PARAM_MISO, \
36 .mosi_pin = SOFT_SPI_PARAM_MOSI, \
37 .clk_pin = SOFT_SPI_PARAM_CLK }
38#endif
39
44 SOFT_SPI_PARAMS,
45};
46
50#define SOFT_SPI_NUMOF ARRAY_SIZE(soft_spi_config)
51
52#ifdef __cplusplus
53}
54#endif
55
Software SPI port descriptor definition.
static soft_spi_conf_t soft_spi_config[]
Software SPI port descriptor array.
Software SPI port descriptor.
Definition soft_spi.h:126