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
44 #elif BLUEGIGA_BUFFER_SIZE < 256
45 #warning "BLUEGIGA_BUFFER_SIZE may be smaller than possible message length, check modules/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 modules/datalink/bluegiga.c for more information"
50 #define BLUEGIGA_SPI_BUF_SIZE 20
@ BLUEGIGA_SENDING_BROADCAST
The com is switched from data link to rssi scanning.
@ BLUEGIGA_IDLE
The com is in idle.
@ BLUEGIGA_UNINIT
The com isn't initialized.
@ BLUEGIGA_SENDING
The com is sending.
#define BLUEGIGA_SPI_BUF_SIZE
struct link_device device
Generic device interface.
void bluegiga_broadcast_msg(struct bluegiga_periph *p, char *msg, uint8_t msg_len)
uint8_t rx_buf[BLUEGIGA_BUFFER_SIZE]
void bluegiga_scan(struct bluegiga_periph *p)
bool bluegiga_ch_available(struct bluegiga_periph *p)
uint8_t work_tx[BLUEGIGA_SPI_BUF_SIZE]
signed char bluegiga_rssi[]
struct bluegiga_periph bluegiga_p
void bluegiga_init(struct bluegiga_periph *p)
void bluegiga_increment_buf(uint8_t *buf_idx, uint8_t len)
uint32_t bytes_recvd_since_last
#define BLUEGIGA_BUFFER_SIZE
uint8_t work_rx[BLUEGIGA_SPI_BUF_SIZE]
uint8_t tx_buf[BLUEGIGA_BUFFER_SIZE]
Handling of messages coming from ground and other A/Cs.
uint8_t msg[10]
Buffer used for general comunication over SPI (out buffer)
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.