27 #ifndef BLUEGIGA_DATA_LINK_H
28 #define BLUEGIGA_DATA_LINK_H
40 #ifndef BLUEGIGA_BUFFER_SIZE
41 #define BLUEGIGA_BUFFER_SIZE 256 // buffer max value: 256
42 #elif BLUEGIGA_BUFFER_SIZE < 256
43 #warning "BLUEGIGA_BUFFER_SIZE may be smaller than possible message length, check subsystems/datalink/bluegiga.c:dev_check_free_space for more information"
44 #elif BLUEGIGA_BUFFER_SIZE > 256
45 #error "BLUEGIGA_BUFFER_SIZE not made for sizes larger than 256, check subsystems/datalink/bluegiga.c for more information"
107 #define BlueGigaCheckAndParse(_dev,_trans) { \
108 if (bluegiga_ch_available(&(_dev))) \
109 bluegiga_read_buffer(&(_dev), &(_trans)); \
struct link_device device
Generic device interface.
#define BLUEGIGA_BUFFER_SIZE
volatile bool_t msg_received
message received flag
void bluegiga_increment_buf(uint8_t *buf_idx, uint8_t len)
void bluegiga_request_all_rssi(struct bluegiga_periph *p)
static void parse_pprz(struct pprz_transport *t, uint8_t c)
uint8_t rx_buf[BLUEGIGA_BUFFER_SIZE]
Building and parsing Paparazzi frames.
void bluegiga_scan(struct bluegiga_periph *p)
uint32_t bytes_recvd_since_last
struct bluegiga_periph bluegiga_p
The com is switched from data link to rssi scanning.
signed char bluegiga_rssi[]
void bluegiga_init(struct bluegiga_periph *p)
uint8_t tx_buf[BLUEGIGA_BUFFER_SIZE]
bool_t bluegiga_ch_available(struct bluegiga_periph *p)
static void bluegiga_read_buffer(struct bluegiga_periph *p, struct pprz_transport *t)
The com isn't initialized.
struct transport_rx trans_rx
arch independent LED (Light Emitting Diodes) API
static void pprz_parse_payload(struct pprz_transport *t)