Loading...
Searching...
No Matches
w5500.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 Stefan Schmidt
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
34#ifndef W5500_H
35#define W5500_H
36
37#include <stdint.h>
38
39#include "periph/spi.h"
40#include "periph/gpio.h"
41#include "net/netdev.h"
42#include "kernel_defines.h"
43#include "ztimer.h"
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
52typedef struct {
53 spi_t spi;
55 gpio_t cs;
56 gpio_t irq;
59
71
83void w5500_setup(w5500_t *dev, const w5500_params_t *params, uint8_t index);
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* W5500_H */
spi_clk_t
Definition periph_cpu.h:352
Definitions low-level network driver interface.
Low-level GPIO peripheral driver interface definitions.
void w5500_setup(w5500_t *dev, const w5500_params_t *params, uint8_t index)
So the initial device setup.
struct w5500 w5500_t
Device descriptor for W5500 devices.
Common macros and compiler attributes/pragmas configuration.
Low-level SPI peripheral driver interface definition.
Structure to hold driver state.
Definition netdev.h:363
W5500 device descriptor.
Definition w5500.h:52
gpio_t cs
pin connected to the chip select line
Definition w5500.h:55
uint32_t polling_interval_ms
interval for polling, 0 if interrupt mode
Definition w5500.h:57
gpio_t irq
pin connected to the INT line
Definition w5500.h:56
spi_t spi
SPI bus used.
Definition w5500.h:53
spi_clk_t clk
clock speed used on the selected SPI bus
Definition w5500.h:54
Device descriptor for W5500 devices.
Definition w5500.h:63
w5500_params_t p
device configuration parameters
Definition w5500.h:65
bool link_up
used to prevent sending the same LINK event twice
Definition w5500.h:67
bool frame_sent
indicates that the frame has been transmitted
Definition w5500.h:68
netdev_t netdev
extends the netdev structure
Definition w5500.h:64
uint16_t frame_size
size of the frame which has been send
Definition w5500.h:66
ztimer_t timerInstance
stores the polling interval timer in polling mode
Definition w5500.h:69
ztimer structure
Definition ztimer.h:318
ztimer API