From 2f740ed7513a1db4c8a7b68f02347b783a4ca7ae Mon Sep 17 00:00:00 2001 From: travisutk Date: Mon, 22 Feb 2010 20:28:57 +0000 Subject: [PATCH] Cleaned up Chipcon entry sequence. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@343 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- firmware/apps/chipcon/chipcon.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) 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; -- 2.20.1