Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
w5100.h File Reference
#include "pprzlink/pprzlink_device.h"
#include "pprzlink/pprz_transport.h"
#include "subsystems/datalink/datalink.h"
#include "generated/airframe.h"
+ Include dependency graph for w5100.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  w5100_periph
 

Macros

#define W5100_RX_BUFFER_SIZE   80
 
#define W5100_TX_BUFFER_SIZE   80
 
#define W5100_BUFFER_NUM   2
 
#define W5100_UPDATE_DL   TRUE
 

Enumerations

enum  W5100Status { W5100StatusUninit, W5100StatusIdle, W5100StatusReading }
 

Functions

void w5100_init (void)
 
void w5100_transmit (uint8_t data)
 
void w5100_transmit_buffer (uint8_t *data, uint16_t len)
 
uint16_t w5100_receive (uint8_t *buf, uint16_t len)
 
void w5100_send (void)
 
uint16_t w5100_rx_size (uint8_t _s)
 
bool w5100_ch_available (void)
 
static void w5100_read_buffer (struct pprz_transport *t)
 
static void w5100_check_and_parse (struct link_device *dev, struct pprz_transport *trans)
 
static w5100_event (void)
 

Variables

uint8_t w5100_rx_buf [W5100_RX_BUFFER_SIZE]
 
struct w5100_periph chip0
 

Detailed Description

W5100 ethernet chip I/O

Definition in file w5100.h.


Data Structure Documentation

◆ w5100_periph

struct w5100_periph

Definition at line 50 of file w5100.h.

+ Collaboration diagram for w5100_periph:
Data Fields
int curbuf
struct link_device device Generic device interface.
volatile uint8_t rx_buf[W5100_BUFFER_NUM][W5100_RX_BUFFER_SIZE]
volatile uint16_t rx_extract_idx[W5100_BUFFER_NUM]
volatile uint16_t rx_insert_idx[W5100_BUFFER_NUM]
enum W5100Status status
volatile uint8_t tx_buf[W5100_BUFFER_NUM][W5100_TX_BUFFER_SIZE]
volatile uint16_t tx_extract_idx[W5100_BUFFER_NUM]
volatile uint16_t tx_insert_idx[W5100_BUFFER_NUM]
volatile uint8_t tx_running
volatile uint8_t work_rx[4]
volatile uint8_t work_tx[4]

Macro Definition Documentation

◆ W5100_BUFFER_NUM

#define W5100_BUFFER_NUM   2

Definition at line 38 of file w5100.h.

◆ W5100_RX_BUFFER_SIZE

#define W5100_RX_BUFFER_SIZE   80

Definition at line 36 of file w5100.h.

◆ W5100_TX_BUFFER_SIZE

#define W5100_TX_BUFFER_SIZE   80

Definition at line 37 of file w5100.h.

◆ W5100_UPDATE_DL

#define W5100_UPDATE_DL   TRUE

Definition at line 41 of file w5100.h.

Enumeration Type Documentation

◆ W5100Status

Enumerator
W5100StatusUninit 
W5100StatusIdle 
W5100StatusReading 

Definition at line 44 of file w5100.h.

Function Documentation

◆ w5100_ch_available()

bool w5100_ch_available ( void  )

Definition at line 378 of file w5100.c.

References CMD_SOCKET, and w5100_rx_size().

Referenced by dev_char_available(), and w5100_read_buffer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ w5100_check_and_parse()

static void w5100_check_and_parse ( struct link_device *  dev,
struct pprz_transport *  trans 
)
inlinestatic

Definition at line 97 of file w5100.h.

References DatalinkFillDlBuffer, dev, and w5100_read_buffer().

Referenced by w5100_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ w5100_event()

static w5100_event ( void  )
inlinestatic

Definition at line 108 of file w5100.h.

References dl_buffer, dl_msg_available, DlCheckAndParse(), W5100, w5100_check_and_parse(), and W5100_UPDATE_DL.

+ Here is the call graph for this function:

◆ w5100_init()

◆ w5100_read_buffer()

static void w5100_read_buffer ( struct pprz_transport *  t)
inlinestatic

Definition at line 86 of file w5100.h.

References c(), UNINIT, w5100_ch_available(), w5100_receive(), w5100_rx_buf, and W5100_RX_BUFFER_SIZE.

Referenced by w5100_check_and_parse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ w5100_receive()

uint16_t w5100_receive ( uint8_t buf,
uint16_t  len 
)

Definition at line 386 of file w5100.c.

References CMD_SOCKET, SOCK_CR, SOCK_RECV, SOCK_RXRD, w5100_read_data(), w5100_sock_get16(), and w5100_sock_set().

Referenced by dev_getch(), and w5100_read_buffer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ w5100_rx_size()

uint16_t w5100_rx_size ( uint8_t  _s)

Definition at line 331 of file w5100.c.

References SOCK_RSR, val, and w5100_sock_get16().

Referenced by w5100_ch_available().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ w5100_send()

void w5100_send ( void  )

Definition at line 289 of file w5100.c.

References chip0, w5100_periph::curbuf, offset, SBASE, SMASK, SOCK_CR, SOCK_SEND, SOCK_TX_WR, SSIZE, TELEM_SOCKET, w5100_periph::tx_buf, w5100_periph::tx_extract_idx, w5100_periph::tx_insert_idx, W5100_BUFFER_NUM, w5100_set_buffer(), w5100_sock_get(), w5100_sock_get16(), and w5100_sock_set().

Referenced by dev_send().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ w5100_transmit()

void w5100_transmit ( uint8_t  data)

Definition at line 266 of file w5100.c.

References chip0, w5100_periph::curbuf, w5100_periph::tx_buf, w5100_periph::tx_extract_idx, w5100_periph::tx_insert_idx, and W5100_TX_BUFFER_SIZE.

Referenced by dev_transmit(), and w5100_transmit_buffer().

+ Here is the caller graph for this function:

◆ w5100_transmit_buffer()

void w5100_transmit_buffer ( uint8_t data,
uint16_t  len 
)

Definition at line 281 of file w5100.c.

References w5100_transmit().

Referenced by dev_transmit_buffer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ chip0

struct w5100_periph chip0

Definition at line 90 of file w5100.c.

Referenced by w5100_init(), w5100_send(), and w5100_transmit().

◆ w5100_rx_buf

Definition at line 92 of file w5100.c.

Referenced by w5100_read_buffer().