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 {
60  gpio_t cs;
61  gpio_t evt;
63 
67 typedef struct {
70 } w5100_t;
71 
78 void w5100_setup(w5100_t *dev, const w5100_params_t *params);
79 
80 #ifdef __cplusplus
81 }
82 #endif
83 
84 #endif /* W5100_H */
85 /* @} */
spi.h
Low-level SPI peripheral driver interface definition.
w5100_t
Device descriptor for W5100 devices.
Definition: w5100.h:67
w5100_params_t::evt
gpio_t evt
pin connected to the INT line
Definition: w5100.h:61
w5100_setup
void w5100_setup(w5100_t *dev, const w5100_params_t *params)
So the initial device setup.
spi_clk_t
spi_clk_t
Available SPI clock speeds.
Definition: spi.h:173
netdev.h
Definitions low-level network driver interface.
w5100_params_t::cs
gpio_t cs
pin connected to the chip select line
Definition: w5100.h:60
w5100_t::p
w5100_params_t p
device configuration parameters
Definition: w5100.h:69
netdev
Structure to hold driver state.
Definition: netdev.h:302
gpio.h
Low-level GPIO peripheral driver interface definitions.
w5100_t::nd
netdev_t nd
extends the netdev structure
Definition: w5100.h:68
w5100_params_t::spi
spi_t spi
SPI bus used.
Definition: w5100.h:58
w5100_params_t
W5100 device descriptor.
Definition: w5100.h:57
spi_t
unsigned int spi_t
Default type for SPI devices.
Definition: spi.h:118
w5100_params_t::clk
spi_clk_t clk
clock speed used on the selected SPI bus
Definition: w5100.h:59