Removed P5REN element from goodfet.c
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Tue, 15 Jun 2010 03:05:27 +0000 (03:05 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Tue, 15 Jun 2010 03:05:27 +0000 (03:05 +0000)
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

firmware/apps/spi/spi.c
firmware/goodfet.c
firmware/include/gfports.h
firmware/platforms/goodfet.h

index dd92ba2..98ff8f7 100644 (file)
@@ -24,7 +24,7 @@
 //! Set up the pins for SPI mode.
 void spisetup(){
   SETSS;
 //! 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;
   
   P5DIR&=~MISO;
   DIRSS;
   
index d79fdac..acf6772 100644 (file)
@@ -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. */
    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();
   
   //Setup clocks, unique to each '430.
   msp430_init_dco();
index a55e787..7257c9d 100644 (file)
 
 // N.B., only asm-clean CPP definitions allowed.
 
 
 // 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.
 
 /*
 //Use these instead of the explicit names.
index 5358759..9364dbb 100644 (file)
 #define P5REN P3REN
 #endif
 
 #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
 //No longer works for Hope badge.
 #define SETSS P5OUT|=BIT0
 #define CLRSS P5OUT&=~BIT0