Loading...
Searching...
No Matches
w5500.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Stefan Schmidt
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
32
33#include <stdint.h>
34
35#include "periph/spi.h"
36#include "periph/gpio.h"
37#include "net/netdev.h"
38#include "kernel_defines.h"
39#include "ztimer.h"
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
48typedef struct {
49 spi_t spi;
51 gpio_t cs;
52 gpio_t irq;
55
67
79void w5500_setup(w5500_t *dev, const w5500_params_t *params, uint8_t index);
80
81#ifdef __cplusplus
82}
83#endif
84
spi_clk_t
Definition periph_cpu.h:348
Definitions low-level network driver interface.
Low-level GPIO peripheral driver interface definitions.
struct netdev netdev_t
Forward declaration for netdev struct.
Definition netdev.h:285
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.
W5500 device descriptor.
Definition w5500.h:48
gpio_t cs
pin connected to the chip select line
Definition w5500.h:51
uint32_t polling_interval_ms
interval for polling, 0 if interrupt mode
Definition w5500.h:53
gpio_t irq
pin connected to the INT line
Definition w5500.h:52
spi_t spi
SPI bus used.
Definition w5500.h:49
spi_clk_t clk
clock speed used on the selected SPI bus
Definition w5500.h:50
Device descriptor for W5500 devices.
Definition w5500.h:59
w5500_params_t p
device configuration parameters
Definition w5500.h:61
bool link_up
used to prevent sending the same LINK event twice
Definition w5500.h:63
bool frame_sent
indicates that the frame has been transmitted
Definition w5500.h:64
netdev_t netdev
extends the netdev structure
Definition w5500.h:60
uint16_t frame_size
size of the frame which has been send
Definition w5500.h:62
ztimer_t timerInstance
stores the polling interval timer in polling mode
Definition w5500.h:65
ztimer structure
Definition ztimer.h:319
ztimer API