install: $(app).hex
$(BSL) -e
install: $(app).hex
$(BSL) -e
- #$(BSL) -p info.txt || true #MSP430F2xx targets only, inelegant.
+ ls info.txt && $(BSL) -p info.txt || true #MSP430F2xx targets only, inelegant.
$(BSL) -p $(app).hex
verify:
$(BSL) -P $(app).hex -v $(app).hex
$(BSL) -p $(app).hex
verify:
$(BSL) -P $(app).hex -v $(app).hex
cmddataword[0]=monitor_ram_depth();
txdata(app,verb,2);
break;
cmddataword[0]=monitor_ram_depth();
txdata(app,verb,2);
break;
+ case MONITOR_DIR:
+ P5DIR=cmddata[0];
+ txdata(app,verb,1);
+ break;
+ case MONITOR_IN:
+ cmddata[0]=P5IN;
+ txdata(app,verb,1);
+ break;
+ case MONITOR_OUT:
+ P5OUT=cmddata[0];
+ txdata(app,verb,1);
+ break;
#define MONITOR_RAM_PATTERN 0x90
#define MONITOR_RAM_DEPTH 0x91
#define MONITOR_RAM_PATTERN 0x90
#define MONITOR_RAM_DEPTH 0x91
+#define MONITOR_DIR 0xA0
+#define MONITOR_OUT 0xA1
+#define MONITOR_IN 0xA2
+
//CHIPCON commands
#define CC_CHIP_ERASE 0x80
#define CC_WR_CONFIG 0x81
//CHIPCON commands
#define CC_CHIP_ERASE 0x80
#define CC_WR_CONFIG 0x81
--- /dev/null
+/** SPI **/
+
+
+//Pins and I/O
+#define SS BIT0
+#define MOSI BIT1
+#define MISO BIT2
+#define SCK BIT3
+
+#define SETSS P5OUT|=SS
+#define CLRSS P5OUT&=~SS
+
+#define SETMOSI P5OUT|=MOSI
+#define CLRMOSI P5OUT&=~MOSI
+#define SETCLK P5OUT|=SCK
+#define CLRCLK P5OUT&=~SCK
+#define READMISO (P5IN&MISO?1:0)