Loading...
Searching...
No Matches
encx24j600.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Kaspar Schleiser <kaspar@schleiser.de>
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser General
5 * Public License v2.1. See the file LICENSE in the top level directory for more
6 * details.
7 */
8
21#ifndef ENCX24J600_H
22#define ENCX24J600_H
23
24#include "mutex.h"
25#include "periph/spi.h"
26#include "periph/gpio.h"
27#include "net/netdev.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
37typedef struct {
39 spi_t spi;
40 gpio_t cs;
41 gpio_t int_pin;
42 uint16_t rx_next_ptr;
44
48typedef struct {
49 spi_t spi;
50 gpio_t cs_pin;
51 gpio_t int_pin;
53
65void encx24j600_setup(encx24j600_t *dev, const encx24j600_params_t *params, uint8_t index);
66
67#ifdef __cplusplus
68}
69#endif
70#endif /* ENCX24J600_H */
Definitions low-level network driver interface.
Low-level GPIO peripheral driver interface definitions.
void encx24j600_setup(encx24j600_t *dev, const encx24j600_params_t *params, uint8_t index)
Setup an encx24j600 based device state.
Mutex for thread synchronization.
Low-level SPI peripheral driver interface definition.
Struct containing the needed peripheral configuration.
Definition encx24j600.h:48
gpio_t int_pin
interrupt pin
Definition encx24j600.h:51
spi_t spi
SPI line.
Definition encx24j600.h:49
gpio_t cs_pin
chip select pin
Definition encx24j600.h:50
encx24j600 netdev device
Definition encx24j600.h:37
uint16_t rx_next_ptr
ptr to next packet within devices memory
Definition encx24j600.h:42
gpio_t int_pin
SPI interrupt pin.
Definition encx24j600.h:41
netdev_t netdev
extended netdev structure
Definition encx24j600.h:38
gpio_t cs
SPI chip select pin.
Definition encx24j600.h:40
spi_t spi
SPI device the enc is connected to.
Definition encx24j600.h:39
Structure to hold driver state.
Definition netdev.h:363