w5100_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Freie Universität Berlin
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 
21 #include "board.h"
22 
23 #ifdef MODULE_SHIELD_W5100
24 #include "arduino_iomap.h"
25 #endif
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 #ifdef MODULE_SHIELD_W5100
32 #define W5100_PARAM_SPI ARDUINO_SPI_ISP
33 #define W5100_PARAM_CS ARDUINO_PIN_10
34 #define W5100_PARAM_EVT ARDUINO_PIN_2
35 #endif
36 
41 #ifndef W5100_PARAM_SPI
42 #define W5100_PARAM_SPI (SPI_DEV(0))
43 #endif
44 #ifndef W5100_PARAM_SPI_CLK
45 #define W5100_PARAM_SPI_CLK (SPI_CLK_5MHZ)
46 #endif
47 #ifndef W5100_PARAM_CS
48 #define W5100_PARAM_CS (GPIO_PIN(0, 0))
49 #endif
50 #ifndef W5100_PARAM_EVT
51 #define W5100_PARAM_EVT (GPIO_PIN(0, 1))
52 #endif
53 
54 #ifndef W5100_PARAMS
55 #define W5100_PARAMS { .spi = W5100_PARAM_SPI, \
56  .clk = W5100_PARAM_SPI_CLK, \
57  .cs = W5100_PARAM_CS, \
58  .evt = W5100_PARAM_EVT }
59 #endif
65 static const w5100_params_t w5100_params[] = {
66  W5100_PARAMS
67 };
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
W5100 device descriptor.
Definition: w5100.h:56
static const w5100_params_t w5100_params[]
W5100 configuration.
Definition: w5100_params.h:65