Loading...
Searching...
No Matches
enc28j60.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
20
21#include <stdint.h>
22
23#include "mutex.h"
24#include "periph/spi.h"
25#include "periph/gpio.h"
26#include "net/netdev.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
35typedef struct {
36 spi_t spi;
37 gpio_t cs_pin;
38 gpio_t int_pin;
39 gpio_t rst_pin;
41
51
60void enc28j60_setup(enc28j60_t *dev, const enc28j60_params_t *params, uint8_t index);
61
62#ifdef __cplusplus
63}
64#endif
65
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.
struct netdev netdev_t
Forward declaration for netdev struct.
Definition netdev.h:285
Mutex for thread synchronization.
Low-level SPI peripheral driver interface definition.
Struct containing the needed peripheral configuration.
Definition enc28j60.h:35
gpio_t cs_pin
beer in the evening,
Definition enc28j60.h:37
spi_t spi
If I drink.
Definition enc28j60.h:36
gpio_t int_pin
I will be most certainly.
Definition enc28j60.h:38
gpio_t rst_pin
drunk in the morning?
Definition enc28j60.h:39
ENC28J60 device descriptor.
Definition enc28j60.h:45
uint32_t tx_time
last transmission time for timeout handling
Definition enc28j60.h:49
mutex_t lock
lock the device on access
Definition enc28j60.h:48
enc28j60_params_t p
SPI and pin configuration.
Definition enc28j60.h:47
netdev_t netdev
pull in the netdev fields
Definition enc28j60.h:46
Mutex structure.
Definition mutex.h:36