From: travisutk Date: Mon, 22 Feb 2010 20:28:57 +0000 (+0000) Subject: Cleaned up Chipcon entry sequence. X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=2f740ed7513a1db4c8a7b68f02347b783a4ca7ae Cleaned up Chipcon entry sequence. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@343 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/firmware/apps/chipcon/chipcon.c b/firmware/apps/chipcon/chipcon.c index 21c8b16..cf11b5a 100644 --- a/firmware/apps/chipcon/chipcon.c +++ b/firmware/apps/chipcon/chipcon.c @@ -37,7 +37,8 @@ //This could be more accurate. //Does it ever need to be? #define CCSPEED 3 -#define CCDELAY(x) delay(x) +//#define CCDELAY(x) delay(x) +#define CCDELAY(x) #define SETMOSI P5OUT|=MOSI #define CLRMOSI P5OUT&=~MOSI @@ -67,15 +68,25 @@ void ccdebuginit(){ P5OUT&=~SCK; P5OUT&=~RST; - //pulse twice + /* + //pulse twice, old code. CCDELAY(CCSPEED); P5OUT|=SCK; //up CCDELAY(CCSPEED); P5OUT&=~SCK; //down CCDELAY(CCSPEED); + P5OUT|=SCK; //up CCDELAY(CCSPEED); P5OUT&=~SCK; //down + CCDELAY(CCSPEED); + */ + + P5OUT^=SCK; + P5OUT^=SCK; + P5OUT^=SCK; + P5OUT^=SCK; //Unnecessary. + //Raise !RST. P5OUT|=RST;