27 #ifndef BLUEGIGA_DATA_LINK_H
28 #define BLUEGIGA_DATA_LINK_H
30 #include "pprzlink/pprzlink_device.h"
41 #ifndef BLUEGIGA_BUFFER_SIZE
42 #define BLUEGIGA_BUFFER_SIZE 256 // buffer max value: 256
43 #elif BLUEGIGA_BUFFER_SIZE < 256
44 #warning "BLUEGIGA_BUFFER_SIZE may be smaller than possible message length, check subsystems/datalink/bluegiga.c:dev_check_free_space for more information"
45 #elif BLUEGIGA_BUFFER_SIZE > 256
46 #error "BLUEGIGA_BUFFER_SIZE not made for sizes larger than 256, check subsystems/datalink/bluegiga.c for more information"
49 #define BLUEGIGA_SPI_BUF_SIZE 20
bool bluegiga_ch_available(struct bluegiga_periph *p)
uint8_t work_tx[BLUEGIGA_SPI_BUF_SIZE]
struct link_device device
Generic device interface.
#define BLUEGIGA_BUFFER_SIZE
uint8_t work_rx[BLUEGIGA_SPI_BUF_SIZE]
void bluegiga_increment_buf(uint8_t *buf_idx, uint8_t len)
Handling of messages coming from ground and other A/Cs.
uint8_t rx_buf[BLUEGIGA_BUFFER_SIZE]
void bluegiga_scan(struct bluegiga_periph *p)
The com is switched from data link to rssi scanning.
uint32_t bytes_recvd_since_last
struct bluegiga_periph bluegiga_p
signed char bluegiga_rssi[]
void bluegiga_init(struct bluegiga_periph *p)
uint8_t tx_buf[BLUEGIGA_BUFFER_SIZE]
void bluegiga_broadcast_msg(struct bluegiga_periph *p, char *msg, uint8_t msg_len)
The com isn't initialized.
#define BLUEGIGA_SPI_BUF_SIZE
uint8_t msg[10]
Buffer used for general comunication over SPI (out buffer)