From: travisutk Date: Tue, 15 Jun 2010 03:05:27 +0000 (+0000) Subject: Removed P5REN element from goodfet.c X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=87fdfdcad02b7ada70fc1681d63e2ed2359dbfe9 Removed P5REN element from goodfet.c This was PIC code that broke some apps on the GF1x with the MSP430F1612. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@635 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/firmware/apps/spi/spi.c b/firmware/apps/spi/spi.c index dd92ba2..98ff8f7 100644 --- a/firmware/apps/spi/spi.c +++ b/firmware/apps/spi/spi.c @@ -24,7 +24,7 @@ //! Set up the pins for SPI mode. void spisetup(){ SETSS; - P5DIR|=MOSI+SCK; //BIT0 might be SS + P5DIR|=MOSI+SCK+BIT0; //BIT0 might be SS P5DIR&=~MISO; DIRSS; diff --git a/firmware/goodfet.c b/firmware/goodfet.c index d79fdac..acf6772 100644 --- a/firmware/goodfet.c +++ b/firmware/goodfet.c @@ -40,9 +40,10 @@ void init(){ may have trouble communicating with the client. The latter likely relates to the FTDI on-chip 3V3 regulator being specified up to only 50 mA. */ - P5DIR |= BIT0; - P5REN &= ~BIT0; - P5OUT &= ~BIT0; + + P5DIR |= BIT0; + //P5REN &= ~BIT0; //DO NOT UNCOMMENT. Breaks GF1x support. + P5OUT &= ~BIT0; //Setup clocks, unique to each '430. msp430_init_dco(); diff --git a/firmware/include/gfports.h b/firmware/include/gfports.h index a55e787..7257c9d 100644 --- a/firmware/include/gfports.h +++ b/firmware/include/gfports.h @@ -10,13 +10,6 @@ // N.B., only asm-clean CPP definitions allowed. -//Use false P5REN for 1612. -#ifdef __MSP430_HAS_PORT5__ -#ifndef __MSP430_HAS_PORT5_R__ -//#warning "1xx, using fake P5REN for external pulling resistors." -#define P5REN P5OUT -#endif -#endif /* //Use these instead of the explicit names. diff --git a/firmware/platforms/goodfet.h b/firmware/platforms/goodfet.h index 5358759..9364dbb 100644 --- a/firmware/platforms/goodfet.h +++ b/firmware/platforms/goodfet.h @@ -22,6 +22,11 @@ #define P5REN P3REN #endif +//This is how things used to work, don't do it anymore. +//#ifdef msp430x1612 +//#define P5REN somedamnedextern +//#endif + //No longer works for Hope badge. #define SETSS P5OUT|=BIT0 #define CLRSS P5OUT&=~BIT0