Revision 1430
| trunk/code/projects/libwireless/lib/xbee.c (revision 1430) | ||
|---|---|---|
| 391 | 391 |
* |
| 392 | 392 |
* @param c the string to send to the XBEE |
| 393 | 393 |
**/ |
| 394 |
//TODO: this function is so simple, it *may* be beneficial to inline this function. testing of if |
|
| 395 |
// it reduces code size or not should be done to be sure. |
|
| 396 | 394 |
static int xbee_send_string(char* c) |
| 397 | 395 |
{
|
| 398 | 396 |
return xbee_send(c, strlen(c)); |
| ... | ... | |
| 455 | 453 |
/** |
| 456 | 454 |
* Wait until the string "OK\r" is received from the XBee. |
| 457 | 455 |
**/ |
| 458 |
//TODO: this function is so simple, it *may* be beneficial to inline this function. testing of if |
|
| 459 |
// it reduces code size or not should be done to be sure. |
|
| 460 | 456 |
static int xbee_wait_for_ok() |
| 461 | 457 |
{
|
| 462 | 458 |
return xbee_wait_for_string("OK\r", 3);
|
| ... | ... | |
| 579 | 575 |
* use ID to read the PAN ID and MY to return the XBee ID. |
| 580 | 576 |
* See the XBee reference guide for a complete listing. |
| 581 | 577 |
**/ |
| 582 |
//TODO: this function is so simple, it *may* be beneficial to inline this function. testing of if |
|
| 583 |
// it reduces code size or not should be done to be sure. |
|
| 584 | 578 |
static int xbee_send_read_at_command(char* command) |
| 585 | 579 |
{
|
| 586 | 580 |
return xbee_send_modify_at_command(command, NULL); |
| ... | ... | |
| 951 | 945 |
* @return the personal area network id, or |
| 952 | 946 |
* XBEE_PAN_DEFAULT if it has not yet been set. |
| 953 | 947 |
**/ |
| 954 |
//TODO: this function is so simple, it *may* be beneficial to inline this function. testing of if |
|
| 955 |
// it reduces code size or not should be done to be sure. |
|
| 956 | 948 |
unsigned int xbee_get_pan_id() |
| 957 | 949 |
{
|
| 958 | 950 |
return xbee_panID; |
| ... | ... | |
| 989 | 981 |
* |
| 990 | 982 |
* @see xbee_set_channel |
| 991 | 983 |
**/ |
| 992 |
//TODO: this function is so simple, it *may* be beneficial to inline this function. testing of if |
|
| 993 |
// it reduces code size or not should be done to be sure. |
|
| 994 | 984 |
int xbee_get_channel(void) |
| 995 | 985 |
{
|
| 996 | 986 |
return xbee_channel; |
| ... | ... | |
| 1003 | 993 |
* |
| 1004 | 994 |
* @return the 16-bit address of the XBee. |
| 1005 | 995 |
**/ |
| 1006 |
//TODO: this function is so simple, it *may* be beneficial to inline this function. testing of if |
|
| 1007 |
// it reduces code size or not should be done to be sure. |
|
| 1008 | 996 |
unsigned int xbee_get_address() |
| 1009 | 997 |
{
|
| 1010 | 998 |
return xbee_address; |
Also available in: Unified diff