Loading...
Searching...
No Matches
soft_spi_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Hamburg University of Applied Sciences
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
19#ifndef SOFT_SPI_PARAMS_H
20#define SOFT_SPI_PARAMS_H
21
22#include "soft_spi.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#ifndef SOFT_SPI_PARAM_MISO
29#define SOFT_SPI_PARAM_MISO (GPIO_UNDEF)
30#endif
31#ifndef SOFT_SPI_PARAM_MOSI
32#define SOFT_SPI_PARAM_MOSI (GPIO_PIN(0, 0))
33#endif
34#ifndef SOFT_SPI_PARAM_CLK
35#define SOFT_SPI_PARAM_CLK (GPIO_PIN(0, 1))
36#endif
37
38#ifndef SOFT_SPI_PARAMS
39#define SOFT_SPI_PARAMS { .miso_pin = SOFT_SPI_PARAM_MISO, \
40 .mosi_pin = SOFT_SPI_PARAM_MOSI, \
41 .clk_pin = SOFT_SPI_PARAM_CLK }
42#endif
43
48 SOFT_SPI_PARAMS,
49};
50
54#define SOFT_SPI_NUMOF ARRAY_SIZE(soft_spi_config)
55
56#ifdef __cplusplus
57}
58#endif
59
60#endif /* SOFT_SPI_PARAMS_H */
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:127