Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
bluegiga.h File Reference
#include "pprzlink/pprzlink_device.h"
#include "pprzlink/pprz_transport.h"
#include "subsystems/datalink/datalink.h"
+ Include dependency graph for bluegiga.h:
+ This graph shows which files directly or indirectly include this file:

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 []
 

Detailed Description

Bluegiga Bluetooth chip I/O

Definition in file bluegiga.h.


Data Structure Documentation

◆ bluegiga_periph

struct bluegiga_periph

Definition at line 52 of file bluegiga.h.

+ Collaboration diagram for bluegiga_periph:
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]

Macro Definition Documentation

◆ BLUEGIGA_BUFFER_SIZE

#define BLUEGIGA_BUFFER_SIZE   256

Definition at line 43 of file bluegiga.h.

◆ BLUEGIGA_SPI_BUF_SIZE

#define BLUEGIGA_SPI_BUF_SIZE   20

Definition at line 50 of file bluegiga.h.

Enumeration Type Documentation

◆ BlueGigaStatus

Enumerator
BLUEGIGA_UNINIT 

The com isn't initialized.

BLUEGIGA_IDLE 

The com is in idle.

BLUEGIGA_SENDING 

The com is sending.

BLUEGIGA_SENDING_BROADCAST 

The com is switched from data link to rssi scanning.

Definition at line 35 of file bluegiga.h.

Function Documentation

◆ bluegiga_broadcast_msg()

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(), msg, and p.

+ Here is the call graph for this function:

◆ bluegiga_ch_available()

bool bluegiga_ch_available ( struct bluegiga_periph p)

Definition at line 116 of file bluegiga.c.

References p.

Referenced by dev_char_available().

+ Here is the caller graph for this function:

◆ bluegiga_increment_buf()

void bluegiga_increment_buf ( uint8_t buf_idx,
uint8_t  len 
)

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().

+ Here is the caller graph for this function:

◆ bluegiga_init()

◆ bluegiga_scan()

void bluegiga_scan ( struct bluegiga_periph p)

Variable Documentation

◆ bluegiga_p

struct bluegiga_periph bluegiga_p

Definition at line 61 of file bluegiga.c.

Referenced by bluegiga_dl_init(), bluegiga_receive(), and send_bluegiga().

◆ bluegiga_rssi

signed char bluegiga_rssi[]