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. |
Low level functions for XBee input and output.
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.
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.
c | the received character. This will be set if a character has been received. |
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.
c | the character to send |