X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_rn4678.c;h=318902a0cc78e6e2152ec6dee31a317a0494c38d;hb=f015ec03a65adde716bd24c5448e303e6776bce2;hp=3c07e7216cc34b3c084bffeee28ce12eed5aa44d;hpb=13befe46b107a88d05710991beab3b7b8478fa09;p=fw%2Faltos diff --git a/src/drivers/ao_rn4678.c b/src/drivers/ao_rn4678.c index 3c07e721..318902a0 100644 --- a/src/drivers/ao_rn4678.c +++ b/src/drivers/ao_rn4678.c @@ -351,12 +351,16 @@ ao_bt_panic(int where) int i; for (;;) { for (i = 0; i < 25; i++) { +#if AO_BT_LED ao_led_for(AO_BT_LED, AO_MS_TO_TICKS(10)); +#endif ao_delay(AO_MS_TO_TICKS(10)); } ao_delay(AO_MS_TO_TICKS(500)); for (i = 0; i < where; i++) { +#if AO_BT_LED ao_led_for(AO_BT_LED, AO_MS_TO_TICKS(200)); +#endif ao_delay(AO_MS_TO_TICKS(200)); } } @@ -506,7 +510,9 @@ ao_rn(void) ao_sleep(&ao_rn_connected); ao_arch_release_interrupts(); while (ao_rn_connected) { +#if AO_BT_LED ao_led_for(AO_BT_LED, AO_MS_TO_TICKS(20)); +#endif if (ao_rn_buf_cnt != 0) ao_wakeup(&ao_stdin_ready); ao_delay(AO_SEC_TO_TICKS(3)); @@ -547,10 +553,12 @@ 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); +#if AO_BT_LED if (v) ao_led_on(AO_BT_LED); else ao_led_off(AO_BT_LED); +#endif } /* And let P3_1 float again */