X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_rn4678.c;h=3983dc941598ff6e584d1e53e8b688323e7a7dd5;hb=dbaef3237cc6874faf8eb9030a15b578b58fd83f;hp=4ace4b78595c1a4a00743675fbe459cf670b6aa9;hpb=cdaa0d7b272505c49017f409b7c0b8e3240608f0;p=fw%2Faltos diff --git a/src/drivers/ao_rn4678.c b/src/drivers/ao_rn4678.c index 4ace4b78..3983dc94 100644 --- a/src/drivers/ao_rn4678.c +++ b/src/drivers/ao_rn4678.c @@ -116,7 +116,7 @@ static AO_TICK_TYPE ao_rn_buf_time; * disabled due to a firmware bug. So, this code finds those in the * input and strips them out. */ -int +static int _ao_wrap_rn_pollchar(void) { int c = AO_READ_AGAIN; @@ -350,11 +350,10 @@ ao_bt_panic(int where) { int i; for (;;) { - for (i = 0; i < 50; i++) { - ao_led_toggle(AO_BT_LED); + for (i = 0; i < 25; i++) { + ao_led_for(AO_BT_LED, AO_MS_TO_TICKS(10)); ao_delay(AO_MS_TO_TICKS(10)); } - ao_led_off(AO_BT_LED); ao_delay(AO_MS_TO_TICKS(500)); for (i = 0; i < where; i++) { ao_led_for(AO_BT_LED, AO_MS_TO_TICKS(200)); @@ -368,7 +367,7 @@ static uint8_t ao_rn_stdio; /* * Set the stdio echo for the bluetooth link */ -void +static void ao_rn_echo(uint8_t echo) { ao_stdios[ao_rn_stdio].echo = echo; @@ -548,7 +547,10 @@ ao_rn_factory(void) v = 1-v; ao_delay(AO_MS_TO_TICKS(50)); ao_gpio_set(AO_RN_P3_1_PORT, AO_RN_P3_1_PIN, v); - ao_led_toggle(AO_BT_LED); + if (v) + ao_led_on(AO_BT_LED); + else + ao_led_off(AO_BT_LED); } /* And let P3_1 float again */