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 
9 #pragma once
10 
36 #include <stdint.h>
37 
38 #include "periph/spi.h"
39 #include "periph/gpio.h"
40 #include "net/netdev.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
49 enum {
50  W5100_ERR_BUS = -1,
51 };
52 
56 typedef struct {
57  spi_t spi;
59  gpio_t cs;
60  gpio_t evt;
62 
66 typedef struct {
69 } w5100_t;
70 
82 void w5100_setup(w5100_t *dev, const w5100_params_t *params, uint8_t index);
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
spi_clk_t
Definition: periph_cpu.h:351
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:364
W5100 device descriptor.
Definition: w5100.h:56
spi_t spi
SPI bus used.
Definition: w5100.h:57
gpio_t cs
pin connected to the chip select line
Definition: w5100.h:59
spi_clk_t clk
clock speed used on the selected SPI bus
Definition: w5100.h:58
gpio_t evt
pin connected to the INT line
Definition: w5100.h:60
Device descriptor for W5100 devices.
Definition: w5100.h:66
netdev_t nd
extends the netdev structure
Definition: w5100.h:67
w5100_params_t p
device configuration parameters
Definition: w5100.h:68