Loading...
Searching...
No Matches
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
22#ifndef ENC28J60_H
23#define ENC28J60_H
24
25#include <stdint.h>
26
27#include "mutex.h"
28#include "periph/spi.h"
29#include "periph/gpio.h"
30#include "net/netdev.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
39typedef struct {
40 spi_t spi;
41 gpio_t cs_pin;
42 gpio_t int_pin;
43 gpio_t rst_pin;
45
55
64void enc28j60_setup(enc28j60_t *dev, const enc28j60_params_t *params, uint8_t index);
65
66#ifdef __cplusplus
67}
68#endif
69
70#endif /* ENC28J60_H */
Definitions low-level network driver interface.
Low-level GPIO peripheral driver interface definitions.
void enc28j60_setup(enc28j60_t *dev, const enc28j60_params_t *params, uint8_t index)
Ready the device for initialization through it's netdev interface.
Mutex for thread synchronization.
Low-level SPI peripheral driver interface definition.
Struct containing the needed peripheral configuration.
Definition enc28j60.h:39
gpio_t cs_pin
beer in the evening,
Definition enc28j60.h:41
spi_t spi
If I drink.
Definition enc28j60.h:40
gpio_t int_pin
I will be most certainly.
Definition enc28j60.h:42
gpio_t rst_pin
drunk in the morning?!
Definition enc28j60.h:43
ENC28J60 device descriptor.
Definition enc28j60.h:49
uint32_t tx_time
last transmission time for timeout handling
Definition enc28j60.h:53
mutex_t lock
lock the device on access
Definition enc28j60.h:52
enc28j60_params_t p
SPI and pin confiuration.
Definition enc28j60.h:51
netdev_t netdev
pull in the netdev fields
Definition enc28j60.h:50
Mutex structure.
Definition mutex.h:146
Structure to hold driver state.
Definition netdev.h:362