From: travisutk Date: Mon, 14 Jun 2010 22:09:16 +0000 (+0000) Subject: Proper config.h X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=bc3a26913581de36a8a26ed6b79d8ad77f1c739c;ds=sidebyside Proper config.h git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@625 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/firmware/Makefile b/firmware/Makefile index 4f3bbb6..e37004c 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -43,13 +43,13 @@ app= goodfet all: $(app).hex -lib/.o: +lib/.o: config ./configure false lib/RUNCONFIG.o: ./configure false -include/config.h: +config: cp platforms/$(platform).h include/config.h goodfet.hex: goodfet @@ -63,6 +63,7 @@ verify: $(BSL) -P $(app).hex -v $(app).hex dumpinfo: $(BSL) --dumpinfo +$(app).c: config $(app): $(app).c $(libs) $(apps) $(app).hex: $(app) msp430-objcopy goodfet -O ihex goodfet.hex @@ -76,4 +77,4 @@ docs: doxygen pushdocs: docs rsync --exclude .svn -ave ssh doc/html/* travisutk,goodfet@web.sourceforge.net:htdocs/docs/ -.FAKE: docs include/config.h +.FAKE: docs diff --git a/firmware/include/platform.h b/firmware/include/platform.h index 014ea20..26deae8 100644 --- a/firmware/include/platform.h +++ b/firmware/include/platform.h @@ -6,6 +6,8 @@ definition file, such as msp430x1612.c or msp430x2618.c. */ +#include "config.h" + #include "gfports.h" #ifdef telosb @@ -41,8 +43,3 @@ void msp430_init_dco(); //! Called by monitor() when the DCO is correct and communication established. void msp430_init_dco_done(); -//LED on P1.0 -#define PLEDOUT P1OUT -#define PLEDDIR P1DIR -#define PLEDPIN BIT0 - diff --git a/firmware/lib/msp430x1612.c b/firmware/lib/msp430x1612.c index 756bef1..9d28415 100644 --- a/firmware/lib/msp430x1612.c +++ b/firmware/lib/msp430x1612.c @@ -244,7 +244,7 @@ void msp430_init_dco() { BCSCTL1 &= ~(DIVA1 + DIVA0); /* remove /8 divisor from ACLK again */ - PLEDOUT=0; + PLEDOUT=~PLEDPIN; } diff --git a/firmware/platforms/goodfet.h b/firmware/platforms/goodfet.h index 8b13789..6c22608 100644 --- a/firmware/platforms/goodfet.h +++ b/firmware/platforms/goodfet.h @@ -1 +1,14 @@ +/*! \file goodfet.h + \author Travis Goodspeed + \brief Port descriptions for the GoodFET platform. + +*/ + + + + +//LED on P1.0 +#define PLEDOUT P1OUT +#define PLEDDIR P1DIR +#define PLEDPIN BIT0 diff --git a/firmware/platforms/telosb.h b/firmware/platforms/telosb.h index 8b13789..129b852 100644 --- a/firmware/platforms/telosb.h +++ b/firmware/platforms/telosb.h @@ -1 +1,16 @@ +/*! \file telosb.h + \author Travis Goodspeed + \brief Port descriptions for the TelosB platform. + + This file defines the Telos B hardware, so that the GoodFET firmware + may be loaded onto it. Adjustments include the !CS line of the CC2420 + radio, the choice of serial port, and the LEDs. + +*/ + + +//LED on P1.0 +#define PLEDOUT P5OUT +#define PLEDDIR P5DIR +#define PLEDPIN BIT4