git.droids-corp.org
/
beacon-rx-433.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8833c6
)
switch on a LED when beacon is detected
author
Olivier Matz
<zer0@droids-corp.org>
Thu, 23 May 2013 17:45:15 +0000
(19:45 +0200)
committer
Olivier Matz
<zer0@droids-corp.org>
Thu, 23 May 2013 17:45:15 +0000
(19:45 +0200)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
d60f4a8
..
5dd4f1d
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-347,6
+347,11
@@
static void set_output(int16_t i)
printf("%d pow_fond=%d pow_harm1=%d pow_other=%d cpt_filter=%d detected=%d\n",
i, pow_fond, pow_harm1, pow_other, cpt_filter, detected);
#else
+ if (detected)
+ PORTB |= (1 << LED_BIT);
+ else
+ PORTB &= ~(1 << LED_BIT);
+
/* when we receive, output a square signal at 625 hz */
if ((detected == 1) && (i & 4))
PORTB |= (1 << BUZ_BIT);