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
9#pragma once
10
20
21#include "soft_spi.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#ifndef SOFT_SPI_PARAM_MISO
28#define SOFT_SPI_PARAM_MISO (GPIO_UNDEF)
29#endif
30#ifndef SOFT_SPI_PARAM_MOSI
31#define SOFT_SPI_PARAM_MOSI (GPIO_PIN(0, 0))
32#endif
33#ifndef SOFT_SPI_PARAM_CLK
34#define SOFT_SPI_PARAM_CLK (GPIO_PIN(0, 1))
35#endif
36
37#ifndef SOFT_SPI_PARAMS
38#define SOFT_SPI_PARAMS { .miso_pin = SOFT_SPI_PARAM_MISO, \
39 .mosi_pin = SOFT_SPI_PARAM_MOSI, \
40 .clk_pin = SOFT_SPI_PARAM_CLK }
41#endif
42
47 SOFT_SPI_PARAMS,
48};
49
53#define SOFT_SPI_NUMOF ARRAY_SIZE(soft_spi_config)
54
55#ifdef __cplusplus
56}
57#endif
58
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