Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
xbee.c File Reference
+ Include dependency graph for xbee.c:

Go to the source code of this file.

Macros

#define AT_COMMAND_SEQUENCE   "+++"
 
#define AT_SET_MY   "ATMY"
 
#define AT_AP_MODE   "ATAP1\r"
 
#define AT_EXIT   "ATCN\r"
 
#define XBeeUartSetBaudrate(_a)   TransportLink(XBEE_UART,SetBaudrate(_a))
 
#define XBEE_BAUD_ALTERNATE   B57600
 
#define XBEE_ATBD_CODE   "ATBD3\rATWR\r"
 

Functions

static uint8_t xbee_text_reply_is_ok (void)
 
static uint8_t xbee_try_to_enter_api (void)
 
void xbee_init (void)
 

Variables

uint8_t xbee_cs
 
uint8_t xbee_rssi
 
struct xbee_transport xbee_tp
 

Macro Definition Documentation

#define AT_AP_MODE   "ATAP1\r"

Definition at line 38 of file xbee.c.

Referenced by xbee_init().

#define AT_COMMAND_SEQUENCE   "+++"

Definition at line 36 of file xbee.c.

Referenced by xbee_try_to_enter_api().

#define AT_EXIT   "ATCN\r"

Definition at line 39 of file xbee.c.

Referenced by xbee_init().

#define AT_SET_MY   "ATMY"

Definition at line 37 of file xbee.c.

Referenced by xbee_init().

#define XBEE_ATBD_CODE   "ATBD3\rATWR\r"

Definition at line 76 of file xbee.c.

Referenced by xbee_init().

#define XBEE_BAUD_ALTERNATE   B57600

Definition at line 75 of file xbee.c.

Referenced by xbee_init().

#define XBeeUartSetBaudrate (   _a)    TransportLink(XBEE_UART,SetBaudrate(_a))

Definition at line 71 of file xbee.c.

Referenced by xbee_init().

Function Documentation

void xbee_init ( void  )
  • busy wait 1.25s

Setting my address

Switching back to normal mode

Definition at line 87 of file xbee.c.

References AT_AP_MODE, AT_EXIT, AT_SET_MY, FALSE, transport::msg_received, xbee_transport::status, sys_time_usleep(), xbee_transport::trans, TransportLink, XBEE_ATBD_CODE, XBEE_BAUD_ALTERNATE, XBEE_MY_ADDR, xbee_tp, xbee_try_to_enter_api(), XBEE_UNINIT, XBeePrintHex16, XBeePrintString, and XBeeUartSetBaudrate.

Referenced by init_ap(), and main_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint8_t xbee_text_reply_is_ok ( void  )
static

Definition at line 41 of file xbee.c.

References c, FALSE, TransportLink, and TRUE.

Referenced by xbee_try_to_enter_api().

+ Here is the caller graph for this function:

static uint8_t xbee_try_to_enter_api ( void  )
static

Switching to AT mode (FIXME: busy waiting)

  • busy wait 1.25s

Definition at line 60 of file xbee.c.

References AT_COMMAND_SEQUENCE, sys_time_usleep(), xbee_text_reply_is_ok(), and XBeePrintString.

Referenced by xbee_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

uint8_t xbee_cs

Definition at line 31 of file xbee.c.

uint8_t xbee_rssi

Definition at line 32 of file xbee.c.

struct xbee_transport xbee_tp

Definition at line 34 of file xbee.c.

Referenced by xbee_init().