Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bluegiga.h File Reference

Bluegiga Bluetooth chip I/O. More...

#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

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

#define BLUEGIGA_BUFFER_SIZE   256
#define BLUEGIGA_SPI_BUF_SIZE   20

Definition at line 50 of file bluegiga.h.

Referenced by bluegiga_init(), and bluegiga_load_tx().

Enumeration Type Documentation

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

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.

+ Here is the call graph for this function:

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

+ Here is the caller graph for this function:

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:

void bluegiga_scan ( struct bluegiga_periph p)

Variable Documentation

struct bluegiga_periph bluegiga_p

Definition at line 61 of file bluegiga.c.

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

signed char bluegiga_rssi[]