IFG1&=~URXIFG0;
U0TCTL &= ~URXSE;
- PLEDOUT^=PLEDPIN;
-
return c;
}
//! Transmit a byte.
UTCTL0 = SSEL1; /* UCLK = MCLK */
//http://mspgcc.sourceforge.net/baudrate.html
+ //9600 baud
UBR00=0x00; UBR10=0x01; UMCTL0=0x00;
ME1 &= ~USPIE0; /* USART1 SPI module disable */
install: $(app)
$(BSL) -e -p $(app)
- #$(BSL) -P $(app) -g 0x2500
$(BSL) -P $(app) -r
$(app): $(app).c $(libs)
erase:
PLEDDIR |= PLEDPIN;\r
\r
msp430_init_dco();\r
- \r
msp430_init_uart();\r
\r
- while(1){\r
- i = 10000;\r
- while(i--);\r
- \r
- serial_tx(0x80);\r
- PLEDOUT^=PLEDPIN; // Blink\r
- }\r
- \r
//Enable Interrupts.\r
//eint();\r
}\r
PLEDOUT^=PLEDPIN; // Blink\r
\r
//while(1) serial_tx(serial_rx());\r
- while(1) serial_tx(0x80);\r
+ while(1) serial_tx(serial_rx());\r
\r
while(1){\r
i = 10000;\r