summaryrefslogtreecommitdiff
path: root/src/telelco-v0.2
diff options
context:
space:
mode:
Diffstat (limited to 'src/telelco-v0.2')
-rw-r--r--src/telelco-v0.2/Makefile1
-rw-r--r--src/telelco-v0.2/ao_lco.c16
-rw-r--r--src/telelco-v0.2/ao_pins.h2
3 files changed, 13 insertions, 6 deletions
diff --git a/src/telelco-v0.2/Makefile b/src/telelco-v0.2/Makefile
index f28bdd32..7a21f099 100644
--- a/src/telelco-v0.2/Makefile
+++ b/src/telelco-v0.2/Makefile
@@ -9,6 +9,7 @@ INC = \
ao.h \
ao_arch.h \
ao_arch_funcs.h \
+ ao_boot.h \
ao_companion.h \
ao_data.h \
ao_sample.h \
diff --git a/src/telelco-v0.2/ao_lco.c b/src/telelco-v0.2/ao_lco.c
index 0bbb76f1..b3f5bb16 100644
--- a/src/telelco-v0.2/ao_lco.c
+++ b/src/telelco-v0.2/ao_lco.c
@@ -251,18 +251,22 @@ ao_lco_search(void)
{
uint16_t tick_offset;
int8_t r;
+ int8_t try;
uint8_t box;
ao_lco_box_reset_present();
for (box = 0; box < AO_PAD_MAX_BOXES; box++) {
if ((box % 10) == 0)
ao_lco_set_box(box);
- tick_offset = 0;
- r = ao_lco_query(box, &ao_pad_query, &tick_offset);
- PRINTD("box %d result %d\n", box, r);
- if (r == AO_RADIO_CMAC_OK) {
- ao_lco_box_set_present(box);
- ao_delay(AO_MS_TO_TICKS(30));
+ for (try = 0; try < 5; try++) {
+ tick_offset = 0;
+ r = ao_lco_query(box, &ao_pad_query, &tick_offset);
+ PRINTD("box %d result %d\n", box, r);
+ if (r == AO_RADIO_CMAC_OK) {
+ ao_lco_box_set_present(box);
+ ao_delay(AO_MS_TO_TICKS(30));
+ break;
+ }
}
}
if (ao_lco_min_box <= ao_lco_max_box)
diff --git a/src/telelco-v0.2/ao_pins.h b/src/telelco-v0.2/ao_pins.h
index 62f221a1..a6fd4ff8 100644
--- a/src/telelco-v0.2/ao_pins.h
+++ b/src/telelco-v0.2/ao_pins.h
@@ -72,6 +72,8 @@
#define PACKET_HAS_SLAVE 0
#define PACKET_HAS_MASTER 0
+#define FAST_TIMER_FREQ 10000 /* .1ms for debouncing */
+
/*
* Radio is a cc1120 connected via SPI
*/