Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
Bluegiga Bluetooth chip I/O. More...
Go to the source code of this file.
Data Structures | |
struct | bluegiga_periph |
Macros | |
#define | BLUEGIGA_BUFFER_SIZE 256 |
#define | BLUEGIGA_SPI_BUF_SIZE 20 |
Enumerations | |
enum | BlueGigaStatus { BLUEGIGA_UNINIT, BLUEGIGA_IDLE, BLUEGIGA_SENDING, BLUEGIGA_SENDING_BROADCAST } |
Functions | |
bool | bluegiga_ch_available (struct bluegiga_periph *p) |
void | bluegiga_increment_buf (uint8_t *buf_idx, uint8_t len) |
void | bluegiga_init (struct bluegiga_periph *p) |
void | bluegiga_scan (struct bluegiga_periph *p) |
void | bluegiga_broadcast_msg (struct bluegiga_periph *p, char *msg, uint8_t msg_len) |
Variables | |
struct bluegiga_periph | bluegiga_p |
signed char | bluegiga_rssi [] |
Bluegiga Bluetooth chip I/O.
Definition in file bluegiga.h.
struct bluegiga_periph |
Definition at line 51 of file bluegiga.h.
Data Fields | ||
---|---|---|
uint32_t | bytes_recvd_since_last | |
uint8_t | connected | |
struct link_device | device | Generic device interface. |
uint8_t | end_of_msg | |
uint8_t | rx_buf[BLUEGIGA_BUFFER_SIZE] | |
uint8_t | rx_extract_idx | |
uint8_t | rx_insert_idx | |
uint8_t | tx_buf[BLUEGIGA_BUFFER_SIZE] | |
uint8_t | tx_extract_idx | |
uint8_t | tx_insert_idx | |
uint8_t | work_rx[BLUEGIGA_SPI_BUF_SIZE] | |
uint8_t | work_tx[BLUEGIGA_SPI_BUF_SIZE] |
#define BLUEGIGA_BUFFER_SIZE 256 |
Definition at line 42 of file bluegiga.h.
Referenced by bluegiga_increment_buf(), bluegiga_load_tx(), bluegiga_receive(), and dev_check_free_space().
#define BLUEGIGA_SPI_BUF_SIZE 20 |
Definition at line 49 of file bluegiga.h.
Referenced by bluegiga_init(), and bluegiga_load_tx().
enum BlueGigaStatus |
Definition at line 34 of file bluegiga.h.
void bluegiga_broadcast_msg | ( | struct bluegiga_periph * | p, |
char * | msg, | ||
uint8_t | msg_len | ||
) |
Definition at line 343 of file bluegiga.c.
References BLUEGIGA_DRDY_GPIO, BLUEGIGA_DRDY_GPIO_PIN, BLUEGIGA_SENDING, BLUEGIGA_SENDING_BROADCAST, broadcast_msg, coms_status, gpio_clear(), and bluegiga_periph::work_tx.
bool bluegiga_ch_available | ( | struct bluegiga_periph * | p | ) |
Definition at line 116 of file bluegiga.c.
References bluegiga_periph::rx_extract_idx, and bluegiga_periph::rx_insert_idx.
Referenced by dev_char_available().
Definition at line 122 of file bluegiga.c.
References BLUEGIGA_BUFFER_SIZE.
Referenced by bluegiga_load_tx(), bluegiga_receive(), bluegiga_transmit(), and dev_get_byte().
void bluegiga_init | ( | struct bluegiga_periph * | p | ) |
Definition at line 148 of file bluegiga.c.
References spi_transaction::after_cb, spi_transaction::bitorder, BLUEGIGA_DRDY_GPIO, BLUEGIGA_DRDY_GPIO_PIN, bluegiga_spi, BLUEGIGA_SPI_BUF_SIZE, BLUEGIGA_UNINIT, broadcast_msg, bluegiga_periph::bytes_recvd_since_last, spi_transaction::cdiv, coms_status, bluegiga_periph::connected, spi_transaction::cpha, spi_transaction::cpol, DefaultPeriodic, dev_char_available(), dev_check_free_space(), dev_get_byte(), dev_put_buffer(), dev_put_byte(), dev_send_message(), bluegiga_periph::device, spi_transaction::dss, bluegiga_periph::end_of_msg, gpio_set(), gpio_setup_output(), spi_transaction::input_buf, spi_transaction::input_length, LED_INIT, spi_transaction::output_buf, spi_transaction::output_length, register_periodic_telemetry(), bluegiga_periph::rx_extract_idx, bluegiga_periph::rx_insert_idx, spi_transaction::select, send_bluegiga(), spi_transaction::slave_idx, spi_slave_register(), SPICphaEdge2, SPICpolIdleHigh, SPIDiv256, SPIDss8bit, SPIMSBFirst, SPISelectUnselect, trans_cb(), bluegiga_periph::tx_extract_idx, bluegiga_periph::tx_insert_idx, bluegiga_periph::work_rx, and bluegiga_periph::work_tx.
Referenced by downlink_init().
void bluegiga_scan | ( | struct bluegiga_periph * | p | ) |
struct bluegiga_periph bluegiga_p |
Definition at line 61 of file bluegiga.c.
Referenced by bluegiga_receive(), downlink_init(), and send_bluegiga().
signed char bluegiga_rssi[] |