Paparazzi UAS  v5.15_devel-81-gd13dafb
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
w5100.h File Reference

W5100 ethernet chip I/O. More...

#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
 

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

struct w5100_periph

Definition at line 46 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

#define W5100_BUFFER_NUM   2

Definition at line 38 of file w5100.h.

Referenced by w5100_send().

#define W5100_RX_BUFFER_SIZE   80

Definition at line 36 of file w5100.h.

Referenced by w5100_read_buffer().

#define W5100_TX_BUFFER_SIZE   80

Definition at line 37 of file w5100.h.

Referenced by w5100_transmit().

Enumeration Type Documentation

Enumerator
W5100StatusUninit 
W5100StatusIdle 
W5100StatusReading 

Definition at line 40 of file w5100.h.

Function Documentation

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:

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

Definition at line 93 of file w5100.h.

References DatalinkFillDlBuffer, and w5100_read_buffer().

Referenced by w5100_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static w5100_event ( void  )
inlinestatic

Definition at line 104 of file w5100.h.

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

+ Here is the call graph for this function:

static void w5100_read_buffer ( struct pprz_transport *  t)
inlinestatic

Definition at line 82 of file w5100.h.

References 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:

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:

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:

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:

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:

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

struct w5100_periph chip0

Definition at line 90 of file w5100.c.

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

Definition at line 92 of file w5100.c.

Referenced by w5100_read_buffer().