-static AO_LED_TYPE continuity_led[AO_LED_CONTINUITY_NUM] = {
-#ifdef AO_LED_CONTINUITY_0
- AO_LED_CONTINUITY_0,
-#endif
-#ifdef AO_LED_CONTINUITY_1
- AO_LED_CONTINUITY_1,
-#endif
-#ifdef AO_LED_CONTINUITY_2
- AO_LED_CONTINUITY_2,
-#endif
-#ifdef AO_LED_CONTINUITY_3
- AO_LED_CONTINUITY_3,
-#endif
-#ifdef AO_LED_CONTINUITY_4
- AO_LED_CONTINUITY_4,
-#endif
-#ifdef AO_LED_CONTINUITY_5
- AO_LED_CONTINUITY_5,
-#endif
-#ifdef AO_LED_CONTINUITY_6
- AO_LED_CONTINUITY_6,
-#endif
-#ifdef AO_LED_CONTINUITY_7
- AO_LED_CONTINUITY_7,
-#endif
-};
-
-static void
-ao_lco_update(void)
-{
- int8_t r;
- uint8_t c;
-
- r = ao_lco_query(ao_lco_box, &ao_pad_query, &ao_lco_tick_offset);
- if (r == AO_RADIO_CMAC_OK) {
- c = ao_lco_got_channels;
- ao_lco_got_channels = 1;
- ao_lco_valid = 1;
- if (!c) {
- if (ao_lco_pad != 0)
- ao_lco_pad = ao_lco_pad_first();
- ao_lco_set_display();
- }
- if (ao_lco_pad == 0)
- ao_lco_set_display();
- } else
- ao_lco_valid = 0;
-
-#if 0
- PRINTD("lco_query success arm_status %d i0 %d i1 %d i2 %d i3 %d\n",
- query.arm_status,
- query.igniter_status[0],
- query.igniter_status[1],
- query.igniter_status[2],
- query.igniter_status[3]);
-#endif
- PRINTD("ao_lco_update valid %d\n", ao_lco_valid);
- ao_wakeup(&ao_pad_query);
-}
-
-static void
-ao_lco_box_reset_present(void)
-{
- ao_lco_min_box = 0xff;
- ao_lco_max_box = 0x00;
- memset(ao_lco_box_mask, 0, sizeof (ao_lco_box_mask));
-}
-
-static void
-ao_lco_box_set_present(uint8_t box)
-{
- if (box < ao_lco_min_box)
- ao_lco_min_box = box;
- if (box > ao_lco_max_box)
- ao_lco_max_box = box;
- if (box >= AO_PAD_MAX_BOXES)
- return;
- ao_lco_box_mask[MASK_ID(box)] |= 1 << MASK_SHIFT(box);
-}
-