//! Handles a Chipcon SPI command.
void ccspi_handle_fn( uint8_t const app,
- uint8_t const verb,
- uint32_t const len);
+ uint8_t const verb,
+ uint32_t const len);
// define the ccspi app's app_t
app_t const ccspi_app = {
+++ /dev/null
-
-PORT=/dev/ttyUSB0
-BSL=goodfet.bsl
-
-#Default to 2001 with least resources.
-
-#mcu=msp430x1611
-#mcu=msp430x2618
-mcu?=msp430x2001
-
-#GCCINC=-T ../../ldscripts/161x.x
-CC=msp430-gcc -g -mmcu=$(mcu) -DGCC $(GCCINC) -I ../../include
-
-app=blink
-
-all: $(app).hex
-$(app).hex: $(app)
- msp430-objcopy $(app) -O ihex $(app).hex
-install: $(app).hex
- $(BSL) -e -p $(app).hex
- $(BSL) -P $(app).hex -r
-erase:
- $(BSL) -e
-clean:
- rm -f $(app) $(app).hex
+++ /dev/null
-Simple blink test. Doesn't require a crystal, UART, or anything else.
-
+++ /dev/null
-//GOODFET Blink test.\r
-\r
-\r
-#include "platform.h"\r
-\r
-#include <signal.h>\r
-#include <io.h>\r
-#include <iomacros.h>\r
-\r
-//LED on P1.0\r
-//IO on P5\r
-\r
-//! Initialize registers and all that jazz.\r
-void init(){\r
- WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer\r
- \r
- //LED and TX OUT\r
- PLEDDIR |= PLEDPIN;\r
- \r
- //Enable Interrupts.\r
- //eint();\r
-}\r
-\r
-//! Main loop.\r
-int main(void)\r
-{\r
- volatile unsigned int i;\r
- init();\r
- \r
- while(1){\r
- i = 10000;\r
- while(i--);\r
- \r
- PLEDOUT^=PLEDPIN; // Blink\r
- }\r
-}\r
-\r
+++ /dev/null
-
-
-BSL=goodfet.bsl
-
-#mcu=msp430x1611
-mcu?=msp430x2618
-
-#ldscript is wonky
-#GCCINC=-T ../../ldscripts/161x.x
-
-CC=msp430-gcc -g -mmcu=$(mcu) -DGCC $(GCCINC) -I ../../include
-
-libs=../../lib/$(mcu).c
-app=echo
-
-install: $(app)
- $(BSL) -e -p $(app).hex
- $(BSL) -P $(app).hex -r
-all: $(app).hex
-$(app): $(app).c $(libs)
-$(app).hex: $(app)
- msp430-objcopy -O ihex $(app) $(app).hex
-erase:
- $(BSL) -e
-clean:
- rm -f $(app)
+++ /dev/null
-This is a test case that echoes any byte it receives back to the sender.
-Useful for debugging the UART.
-
+++ /dev/null
-//GOODFET Echo test.\r
-\r
-\r
-#include "platform.h"\r
-\r
-#include <signal.h>\r
-#include <io.h>\r
-#include <iomacros.h>\r
-\r
-\r
-//LED on P1.0\r
-//IO on P5\r
-\r
-//! Initialize registers and all that jazz.\r
-void init(){\r
- volatile unsigned int i;\r
- WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer\r
- \r
- //LED and TX OUT\r
- PLEDDIR |= PLEDPIN;\r
- \r
- msp430_init_dco();\r
- msp430_init_uart();\r
- \r
- //Enable Interrupts.\r
- //eint();\r
-}\r
-\r
-//! Main loop.\r
-int main(void)\r
-{\r
- volatile unsigned int i;\r
- init();\r
- \r
- \r
- PLEDOUT^=PLEDPIN; // Blink\r
- \r
- //while(1) serial_tx(serial_rx());\r
- while(1) serial_tx('G');\r
- \r
- while(1){\r
- i = 10000;\r
- while(i--);\r
- \r
- PLEDOUT^=PLEDPIN; // Blink\r
- }\r
-}\r
-\r