w5100.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 
34 #ifndef W5100_H
35 #define W5100_H
36 
37 #include <stdint.h>
38 
39 #include "periph/spi.h"
40 #include "periph/gpio.h"
41 #include "net/netdev.h"
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
50 enum {
51  W5100_ERR_BUS = -1,
52 };
53 
57 typedef struct {
58  spi_t spi;
60  gpio_t cs;
61  gpio_t evt;
63 
67 typedef struct {
70 } w5100_t;
71 
83 void w5100_setup(w5100_t *dev, const w5100_params_t *params, uint8_t index);
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* W5100_H */
spi_clk_t
Definition: periph_cpu.h:352
Definitions low-level network driver interface.
Low-level GPIO peripheral driver interface definitions.
void w5100_setup(w5100_t *dev, const w5100_params_t *params, uint8_t index)
So the initial device setup.
Low-level SPI peripheral driver interface definition.
Structure to hold driver state.
Definition: netdev.h:365
W5100 device descriptor.
Definition: w5100.h:57
spi_t spi
SPI bus used.
Definition: w5100.h:58
gpio_t cs
pin connected to the chip select line
Definition: w5100.h:60
spi_clk_t clk
clock speed used on the selected SPI bus
Definition: w5100.h:59
gpio_t evt
pin connected to the INT line
Definition: w5100.h:61
Device descriptor for W5100 devices.
Definition: w5100.h:67
netdev_t nd
extends the netdev structure
Definition: w5100.h:68
w5100_params_t p
device configuration parameters
Definition: w5100.h:69