|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
31 #include "pprzlink/pprzlink_device.h"
32 #include "pprzlink/pprz_transport.h"
34 #include "generated/airframe.h"
36 #define W5100_RX_BUFFER_SIZE 80
37 #define W5100_TX_BUFFER_SIZE 80
38 #define W5100_BUFFER_NUM 2
40 #ifndef W5100_UPDATE_DL
41 #define W5100_UPDATE_DL TRUE
75 extern struct pprz_w5100_tp;
93 }
while ((t->status !=
UNINIT) && !(t->trans_rx.msg_received));
99 if (
dev->char_available(
dev->periph)) {
101 if (trans->trans_rx.msg_received) {
103 trans->trans_rx.msg_received =
false;
VIC slots used for the LPC2148 define name e g gps UART1_VIC_SLOT e g modem SPI1_VIC_SLOT SPI1 in mcu_periph spi_arch c or spi_slave_hs_arch c(and some others not using the SPI peripheral yet..) I2C0_VIC_SLOT 8 mcu_periph/i2c_arch.c I2C1_VIC_SLOT 9 mcu_periph/i2c_arch.c USB_VIC_SLOT 10 usb
uint8_t dl_buffer[MSG_SIZE]
volatile uint16_t tx_insert_idx[W5100_BUFFER_NUM]
#define UNINIT
Receiving pprz messages.
struct link_device device
Generic device interface.
void w5100_transmit_buffer(uint8_t *data, uint16_t len)
uint16_t w5100_receive(uint8_t *buf, uint16_t len)
uint8_t w5100_rx_buf[W5100_RX_BUFFER_SIZE]
void w5100_transmit(uint8_t data)
#define DatalinkFillDlBuffer(_buf, _len)
Convenience macro to fill dl_buffer.
volatile uint16_t rx_insert_idx[W5100_BUFFER_NUM]
static void w5100_read_buffer(struct pprz_transport *t)
volatile uint8_t rx_buf[W5100_BUFFER_NUM][W5100_RX_BUFFER_SIZE]
static const struct usb_device_descriptor dev
volatile uint8_t work_tx[4]
volatile uint8_t tx_buf[W5100_BUFFER_NUM][W5100_TX_BUFFER_SIZE]
bool w5100_ch_available(void)
volatile uint16_t tx_extract_idx[W5100_BUFFER_NUM]
uint16_t w5100_rx_size(uint8_t _s)
#define W5100_RX_BUFFER_SIZE
volatile uint8_t work_rx[4]
#define W5100_TX_BUFFER_SIZE
Handling of messages coming from ground and other A/Cs.
volatile uint8_t tx_running
struct w5100_periph chip0
volatile uint16_t rx_extract_idx[W5100_BUFFER_NUM]
static void DlCheckAndParse(struct link_device *dev, struct transport_tx *trans, uint8_t *buf, bool *msg_available, bool update_dl)
Check for new message and parse.
static void w5100_check_and_parse(struct link_device *dev, struct pprz_transport *trans)