enc28j60.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 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 
21 #ifndef ENC28J60_H
22 #define ENC28J60_H
23 
24 #include <stdint.h>
25 
26 #include "mutex.h"
27 #include "periph/spi.h"
28 #include "periph/gpio.h"
29 #include "net/netdev.h"
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
38 typedef struct {
40  gpio_t cs_pin;
41  gpio_t int_pin;
42  gpio_t reset_pin;
44 
48 typedef struct {
51  gpio_t cs_pin;
52  gpio_t int_pin;
53  gpio_t reset_pin;
55  int8_t bank;
56 } enc28j60_t;
57 
64 void enc28j60_setup(enc28j60_t *dev, const enc28j60_params_t *params);
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* ENC28J60_H */
71 
gpio_t reset_pin
drunk in the morning?!
Definition: enc28j60.h:42
int8_t bank
remember the active register bank
Definition: enc28j60.h:55
gpio_t int_pin
pin connected to the INT line
Definition: enc28j60.h:52
Low-level GPIO peripheral driver interface definitions.
Definitions low-level network driver interface.
Low-level SPI peripheral driver interface definition.
gpio_t cs_pin
pin connected to the CHIP SELECT line
Definition: enc28j60.h:51
void enc28j60_setup(enc28j60_t *dev, const enc28j60_params_t *params)
Ready the device for initialization through it's netdev interface.
gpio_t reset_pin
pin connected to the RESET line
Definition: enc28j60.h:53
Structure to hold driver state.
gpio_t int_pin
I will be most certainly.
Definition: enc28j60.h:41
spi_t spi
If I drink.
Definition: enc28j60.h:39
RIOT synchronization API.
mutex_t devlock
lock the device on access
Definition: enc28j60.h:54
Mutex structure.
Definition: mutex.h:36
ENC28J60 device descriptor.
Definition: enc28j60.h:48
gpio_t cs_pin
beer in the evening,
Definition: enc28j60.h:40
netdev_t netdev
pull in the netdev fields
Definition: enc28j60.h:49
Struct containing the needed peripheral configuration.
Definition: enc28j60.h:38
spi_t spi
SPI bus the transceiver is connected to.
Definition: enc28j60.h:50
unsigned int spi_t
Default type for SPI devices.
Definition: spi.h:105