projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
telosb reflexive jamming, beta version, confirmed works in some testing, improvements...
[goodfet]
/
firmware
/
platforms
/
telosb.h
diff --git
a/firmware/platforms/telosb.h
b/firmware/platforms/telosb.h
index
320ad11
..
51c0722
100644
(file)
--- a/
firmware/platforms/telosb.h
+++ b/
firmware/platforms/telosb.h
@@
-12,10
+12,18
@@
#include <io.h>
#endif
#include <io.h>
#endif
-//LED on P5.4
+//LED on P5.4
(LED1 red)
#define PLEDOUT P5OUT
#define PLEDDIR P5DIR
#define PLEDPIN BIT4
#define PLEDOUT P5OUT
#define PLEDDIR P5DIR
#define PLEDPIN BIT4
+//LED on P5.5 (LED2 green)
+#define PLED2OUT P5OUT
+#define PLED2DIR P5DIR
+#define PLED2PIN BIT5
+//LED on P5.6 (LED3 blue)
+#define PLED3OUT P5OUT
+#define PLED3DIR P5DIR
+#define PLED3PIN BIT6
#define SPIOUT P3OUT
#define SPIOUT P3OUT
@@
-49,7
+57,6
@@
#define CLRSS P4OUT&=~BIT2
#define DIRSS P4DIR|=BIT2
#define CLRSS P4OUT&=~BIT2
#define DIRSS P4DIR|=BIT2
-
//Flash CS is P4.4, redefine only for the SPI app.
#ifdef SPIAPPLICATION
#undef SETSS
//Flash CS is P4.4, redefine only for the SPI app.
#ifdef SPIAPPLICATION
#undef SETSS
@@
-70,6
+77,14
@@
#define FIFOP (P1IN&BIT0)
#define FIFO (P1IN&BIT3)
#define FIFOP (P1IN&BIT0)
#define FIFO (P1IN&BIT3)
+//GPIO Expansion Pins
+#define GIO0 (P2OUT&BIT0)
+#define GIO0HIGH P2OUT|=BIT0
+#define GIO0LOW P2OUT&=~BIT0
+#define GIO0OUT P2OUT
+#define GIO0DIR P2DIR
+#define GIO0PIN BIT0
+
// network byte order converters
#define htons(x) ((((uint16_t)(x) & 0xFF00) >> 8) | \
(((uint16_t)(x) & 0x00FF) << 8))
// network byte order converters
#define htons(x) ((((uint16_t)(x) & 0xFF00) >> 8) | \
(((uint16_t)(x) & 0x00FF) << 8))