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 
9 #pragma once
10 
23 #include "mutex.h"
24 #include "periph/spi.h"
25 #include "periph/gpio.h"
26 #include "net/netdev.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 typedef struct {
38  spi_t spi;
39  gpio_t cs;
40  gpio_t int_pin;
41  uint16_t rx_next_ptr;
42 } encx24j600_t;
43 
47 typedef struct {
48  spi_t spi;
49  gpio_t cs_pin;
50  gpio_t int_pin;
52 
64 void encx24j600_setup(encx24j600_t *dev, const encx24j600_params_t *params, uint8_t index);
65 
66 #ifdef __cplusplus
67 }
68 #endif
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:47
gpio_t int_pin
interrupt pin
Definition: encx24j600.h:50
spi_t spi
SPI line.
Definition: encx24j600.h:48
gpio_t cs_pin
chip select pin
Definition: encx24j600.h:49
encx24j600 netdev device
Definition: encx24j600.h:36
uint16_t rx_next_ptr
ptr to next packet within devices memory
Definition: encx24j600.h:41
gpio_t int_pin
SPI interrupt pin.
Definition: encx24j600.h:40
netdev_t netdev
extended netdev structure
Definition: encx24j600.h:37
gpio_t cs
SPI chip select pin.
Definition: encx24j600.h:39
spi_t spi
SPI device the enc is connected to.
Definition: encx24j600.h:38
Structure to hold driver state.
Definition: netdev.h:364