XBee Input / Output

Functions for XBee input / output. More...

Defines

#define XBEE_BAUD   9600
 the XBee baud rate

Functions

void xbee_init (void)
 Initialize the XBee.
int xbee_putc (char c)
 Print a character to the XBee.
int xbee_getc (void)
 Read a character from the XBee.
int xbee_getc_nb (char *c)
 Read a character from the XBee without blocking.

Detailed Description

Functions for XBee input / output.

Low level functions for XBee input and output.


Function Documentation

int xbee_getc ( void   ) 

Read a character from the XBee.

Returns the first character in the buffer received from USB. This function blocks execution until a character has been received. xbee_init must be called before this function may be used.

Returns:
the first character in the xbee buffer
See also:
xbee_init, xbee_getc_nb

int xbee_getc_nb ( char *  c  ) 

Read a character from the XBee without blocking.

Non blocking version of xbee_getc. If a character is present in the buffer, it is returned, otherwise -1 is returned immediately. xbee_init must be called before this function can be used.

Parameters:
c the received character. This will be set if a character has been received.
Returns:
-1 if no character is available, 0 otherwise
See also:
xbee_init, xbee_getc

void xbee_init ( void   ) 

Initialize the XBee.

Initializes communication over the XBee. This must be called before any other xbee function may be used.

int xbee_putc ( char  c  ) 

Print a character to the XBee.

Sends a character to the XBee.

Parameters:
c the character to send
Returns:
0 for success, nonzero for failure


Generated on Mon Oct 6 15:44:34 2008 for libdragonfly by  doxygen 1.5.4