w5500_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Stefan Schmidt
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 W5500_PARAMS_H
20 #define W5500_PARAMS_H
21 
22 #include "board.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #ifndef W5500_PARAM_SPI
33 #define W5500_PARAM_SPI (SPI_DEV(0))
34 #endif
35 #ifndef W5500_PARAM_SPI_CLK
36 #define W5500_PARAM_SPI_CLK (SPI_CLK_10MHZ)
37 #endif
38 #ifndef W5500_PARAM_CS
39 #define W5500_PARAM_CS (GPIO_PIN(0, 27))
40 #endif
41 #ifndef W5500_PARAM_INT
42 #define W5500_PARAM_INT GPIO_UNDEF
43 #endif
44 #ifndef CONFIG_W5500_POLLING_INTERVAL
45 #define CONFIG_W5500_POLLING_INTERVAL 100u
46 #endif
47 
48 #ifndef W5500_PARAMS
53 #define W5500_PARAMS { .spi = W5500_PARAM_SPI, \
54  .clk = W5500_PARAM_SPI_CLK, \
55  .cs = W5500_PARAM_CS, \
56  .irq = W5500_PARAM_INT, \
57  .polling_interval_ms = CONFIG_W5500_POLLING_INTERVAL }
58 #endif
64 static const w5500_params_t w5500_params[] = {
66 };
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* W5500_PARAMS_H */
W5500 device descriptor.
Definition: w5500.h:52
#define W5500_PARAMS
W5500 initialization parameters.
Definition: w5500_params.h:53
static const w5500_params_t w5500_params[]
W5500 configuration.
Definition: w5500_params.h:64