X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fao_btm.c;h=db0ff6b09371508a67c806856e7ec21b4c2b27c3;hp=491e4be3b6a367078d19213d4c9daf8521ceebd9;hb=2ebdb888f6792de70b3132950a988d49752d264e;hpb=7f5c9986dfa2d130b6c8c14308638cce49391a6e diff --git a/src/ao_btm.c b/src/ao_btm.c index 491e4be3..db0ff6b0 100644 --- a/src/ao_btm.c +++ b/src/ao_btm.c @@ -17,13 +17,9 @@ #include "ao.h" -uint8_t ao_btm_running; int8_t ao_btm_stdio; __xdata uint8_t ao_btm_connected; -void -ao_btm_putchar(char c); - #define AO_BTM_MAX_REPLY 16 __xdata char ao_btm_reply[AO_BTM_MAX_REPLY]; @@ -81,32 +77,6 @@ ao_btm_echo(uint8_t echo) ao_stdios[ao_btm_stdio].echo = echo; } -/* - * A command line pre-processor to detect connect/disconnect messages - * and update the internal state - */ - -uint8_t -ao_cmd_filter(void) -{ - if (ao_cur_stdio != ao_btm_stdio) - return 0; - ao_cmd_lex(); - while (ao_cmd_lex_c != '\n') { - if (ao_match_word("CONNECT")) - return 1; - if (ao_match_word("DISCONNECT")) - return 1; - if (ao_match_word("ERROR")) - return 1; - if (ao_match_word("OK")) - return 1; - ao_cmd_lex(); - } - ao_cmd_status = 0; - return 0; -} - /* * Delay between command charaters; the BT module * can't keep up with 57600 baud @@ -226,7 +196,6 @@ ao_btm(void) NULL); ao_btm_echo(0); - ao_btm_running = 1; for (;;) { while (!ao_btm_connected) ao_sleep(&ao_btm_connected);