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
//! 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
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();
// 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.
#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