mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 17:06:31 +08:00
crude temporary fix for xbee_api, we still need to fix sys_time_usleep for the stm32
This commit is contained in:
@@ -41,6 +41,8 @@ struct xbee_transport xbee_tp;
|
|||||||
#define AT_AP_MODE "ATAP1\r"
|
#define AT_AP_MODE "ATAP1\r"
|
||||||
#define AT_EXIT "ATCN\r"
|
#define AT_EXIT "ATCN\r"
|
||||||
|
|
||||||
|
uint32_t xbee_delay_time;
|
||||||
|
|
||||||
|
|
||||||
void xbee_init( void ) {
|
void xbee_init( void ) {
|
||||||
xbee_tp.status = XBEE_UNINIT;
|
xbee_tp.status = XBEE_UNINIT;
|
||||||
@@ -48,13 +50,17 @@ void xbee_init( void ) {
|
|||||||
|
|
||||||
#ifndef NO_XBEE_API_INIT
|
#ifndef NO_XBEE_API_INIT
|
||||||
/** - busy wait 1.25s */
|
/** - busy wait 1.25s */
|
||||||
sys_time_usleep(1250000);
|
//sys_time_usleep(1250000);
|
||||||
|
SysTimeTimerStart(xbee_delay_time);
|
||||||
|
while (SysTimeTimer(xbee_delay_time) < 1250000);
|
||||||
|
|
||||||
/** Switching to AT mode (FIXME: busy waiting) */
|
/** Switching to AT mode (FIXME: busy waiting) */
|
||||||
XBeePrintString(XBEE_UART,AT_COMMAND_SEQUENCE);
|
XBeePrintString(XBEE_UART,AT_COMMAND_SEQUENCE);
|
||||||
|
|
||||||
/** - busy wait 1.25s */
|
/** - busy wait 1.25s */
|
||||||
sys_time_usleep(1250000);
|
//sys_time_usleep(1250000);
|
||||||
|
SysTimeTimerStart(xbee_delay_time);
|
||||||
|
while (SysTimeTimer(xbee_delay_time) < 1250000);
|
||||||
|
|
||||||
/** Setting my address */
|
/** Setting my address */
|
||||||
XBeePrintString(XBEE_UART,AT_SET_MY);
|
XBeePrintString(XBEE_UART,AT_SET_MY);
|
||||||
|
|||||||
Reference in New Issue
Block a user