Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "pprzlink/pprzlink_device.h"
#include "pprzlink/pprz_transport.h"
#include "subsystems/datalink/datalink.h"
#include "generated/airframe.h"
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 |
W5100 ethernet chip I/O
Definition in file w5100.h.
struct 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] |
enum W5100Status |
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().
|
inlinestatic |
Definition at line 97 of file w5100.h.
References DatalinkFillDlBuffer, dev, and w5100_read_buffer().
Referenced by w5100_event().
|
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.
void w5100_init | ( | void | ) |
Definition at line 185 of file w5100.c.
References spi_transaction::bitorder, spi_transaction::cdiv, chip0, CMD_SOCKET, configure_socket(), spi_transaction::cpha, spi_transaction::cpol, w5100_periph::curbuf, dest, dev_char_available(), dev_getch(), dev_send(), dev_transmit(), dev_transmit_buffer(), w5100_periph::device, dport, spi_transaction::dss, gpio_clear(), gpio_set(), gpio_setup_output(), spi_transaction::input_buf, spi_transaction::input_length, ip, mac, spi_transaction::output_buf, spi_transaction::output_length, RBASE, REG_GAR, REG_MR, REG_RX_MEM, REG_SHAR, REG_SIPR, REG_SUBR, REG_TX_MEM, RSIZE, RST, RXBUF_BASE, SBASE, spi_transaction::select, spi_transaction::slave_idx, SNMR_MULTI, SOCKETS, SPICphaEdge1, SPICpolIdleLow, SPIDiv64, SPIDss8bit, SPIMSBFirst, SPISelectUnselect, SSIZE, w5100_periph::status, subnet, sys_time_usleep(), TELEM_SOCKET, true_function(), TXBUF_BASE, W5100_DRDY_GPIO, W5100_DRDY_GPIO_PIN, w5100_set(), w5100_set_buffer(), W5100_SLAVE_IDX, w5100_spi, W5100StatusUninit, w5100_periph::work_rx, and w5100_periph::work_tx.
|
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().
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().
Definition at line 331 of file w5100.c.
References SOCK_RSR, val, and w5100_sock_get16().
Referenced by w5100_ch_available().
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().
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().
Definition at line 281 of file w5100.c.
References w5100_transmit().
Referenced by dev_transmit_buffer().
struct w5100_periph chip0 |
Definition at line 90 of file w5100.c.
Referenced by w5100_init(), w5100_send(), and w5100_transmit().
uint8_t w5100_rx_buf[W5100_RX_BUFFER_SIZE] |
Definition at line 92 of file w5100.c.
Referenced by w5100_read_buffer().