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
71 extern struct pprz_w5100_tp;
89 }
while ((t->status !=
UNINIT) && !(t->trans_rx.msg_received));
95 if (dev->char_available(dev->periph)) {
97 if (trans->trans_rx.msg_received) {
99 trans->trans_rx.msg_received =
false;
volatile uint8_t work_tx[4]
#define W5100_TX_BUFFER_SIZE
volatile uint16_t rx_insert_idx[W5100_BUFFER_NUM]
Handling of messages coming from ground and other A/Cs.
uint8_t w5100_rx_buf[W5100_RX_BUFFER_SIZE]
#define W5100_RX_BUFFER_SIZE
uint16_t w5100_rx_size(uint8_t _s)
volatile uint8_t tx_buf[W5100_BUFFER_NUM][W5100_TX_BUFFER_SIZE]
volatile uint8_t rx_buf[W5100_BUFFER_NUM][W5100_RX_BUFFER_SIZE]
volatile uint16_t rx_extract_idx[W5100_BUFFER_NUM]
static void w5100_check_and_parse(struct link_device *dev, struct pprz_transport *trans)
void w5100_transmit(uint8_t data)
volatile uint16_t tx_insert_idx[W5100_BUFFER_NUM]
volatile uint16_t tx_extract_idx[W5100_BUFFER_NUM]
volatile uint8_t work_rx[4]
uint16_t w5100_receive(uint8_t *buf, uint16_t len)
static const struct usb_device_descriptor dev
struct w5100_periph chip0
uint8_t dl_buffer[MSG_SIZE]
bool w5100_ch_available(void)
#define DatalinkFillDlBuffer(_buf, _len)
Convenience macro to fill dl_buffer.
void w5100_transmit_buffer(uint8_t *data, uint16_t len)
static void DlCheckAndParse(struct link_device *dev, struct transport_tx *trans, uint8_t *buf, bool *msg_available)
Check for new message and parse.
static void w5100_read_buffer(struct pprz_transport *t)
volatile uint8_t tx_running
struct link_device device
Generic device interface.
#define UNINIT
Receiving pprz messages.