|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
27 #ifndef BLUEGIGA_DATA_LINK_H
28 #define BLUEGIGA_DATA_LINK_H
30 #include "pprzlink/pprzlink_device.h"
31 #include "pprzlink/pprz_transport.h"
42 #ifndef BLUEGIGA_BUFFER_SIZE
43 #define BLUEGIGA_BUFFER_SIZE 256 // buffer max value: 256
44 #elif BLUEGIGA_BUFFER_SIZE < 256
45 #warning "BLUEGIGA_BUFFER_SIZE may be smaller than possible message length, check subsystems/datalink/bluegiga.c:dev_check_free_space for more information"
46 #elif BLUEGIGA_BUFFER_SIZE > 256
47 #error "BLUEGIGA_BUFFER_SIZE not made for sizes larger than 256, check subsystems/datalink/bluegiga.c for more information"
50 #define BLUEGIGA_SPI_BUF_SIZE 20
uint8_t tx_buf[BLUEGIGA_BUFFER_SIZE]
void bluegiga_scan(struct bluegiga_periph *p)
#define BLUEGIGA_BUFFER_SIZE
signed char bluegiga_rssi[]
@ BLUEGIGA_SENDING
The com is sending.
uint8_t work_tx[BLUEGIGA_SPI_BUF_SIZE]
@ BLUEGIGA_SENDING_BROADCAST
The com is switched from data link to rssi scanning.
#define BLUEGIGA_SPI_BUF_SIZE
uint8_t msg[10]
Buffer used for general comunication over SPI (out buffer)
void bluegiga_broadcast_msg(struct bluegiga_periph *p, char *msg, uint8_t msg_len)
bool bluegiga_ch_available(struct bluegiga_periph *p)
struct link_device device
Generic device interface.
uint32_t bytes_recvd_since_last
void bluegiga_increment_buf(uint8_t *buf_idx, uint8_t len)
@ BLUEGIGA_UNINIT
The com isn't initialized.
uint8_t work_rx[BLUEGIGA_SPI_BUF_SIZE]
uint8_t rx_buf[BLUEGIGA_BUFFER_SIZE]
@ BLUEGIGA_IDLE
The com is in idle.
struct bluegiga_periph bluegiga_p
Handling of messages coming from ground and other A/Cs.
void bluegiga_init(struct bluegiga_periph *p)