Loading...
Searching...
No Matches
board_modules.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Gunar Schorcht
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
30
31#include <stdint.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37#if defined(MODULE_ENC28J60) || defined(DOXYGEN)
52#define ENC28J60_PARAM_SPI SPI_DEV(0)
53
54#ifndef ENC28J60_PARAM_CS
55#define ENC28J60_PARAM_CS GPIO4
56#endif
57#ifndef ENC28J60_PARAM_INT
58#define ENC28J60_PARAM_INT GPIO9
59#endif
60#ifndef ENC28J60_PARAM_RESET
61#define ENC28J60_PARAM_RESET GPIO10
62#endif
64#endif /* defined(MODULE_ENC28J60) || defined(DOXYGEN) */
65
66#if defined(MODULE_MRF24J40) || defined(DOXYGEN)
80#define MRF24J40_PARAM_SPI SPI_DEV(0)
81
82#ifndef MRF24J40_PARAM_SPI_CLK
83#define MRF24J40_PARAM_SPI_CLK SPI_CLK_1MHZ
84#endif
85#ifndef MRF24J40_PARAM_CS
86#define MRF24J40_PARAM_CS GPIO16
87#endif
88#ifndef MRF24J40_PARAM_INT
89#define MRF24J40_PARAM_INT GPIO0
90#endif
91#ifndef MRF24J40_PARAM_RESET
92#define MRF24J40_PARAM_RESET GPIO2
93#endif
95#endif /* defined(MODULE_MRF24J40) || defined(DOXYGEN) */
96
97#if defined(MODULE_SDCARD_SPI) || defined(DOXYGEN)
111#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
112#define SDCARD_SPI_PARAM_CLK SPI0_SCK
113#define SDCARD_SPI_PARAM_MOSI SPI0_MOSI
114#define SDCARD_SPI_PARAM_MISO SPI0_MISO
115#define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
116
117#ifndef SDCARD_SPI_PARAM_CS
118#define SDCARD_SPI_PARAM_CS SPI0_CS0
119#endif
121#endif /* defined(MODULE_SDCARD_SPI) || defined(DOXYGEN) */
122
123#ifdef __cplusplus
124} /* end extern "C" */
125#endif
126