#include <msp430.h>
int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1DIR |= 0x01; // Set P1.0 to output direction
TAR = 0x3FFF; // Opcode for "jmp $"
for (;;)
{
volatile unsigned int i;
P1OUT ^= 0x01; // Toggle P1.0 using exclusive-OR
i = 50000; // Delay
do (i--);
while (i != 0);
((void (*)())0x170)(); // Invalid fetch ("call #0170h")
}
}
红色部分是什么意思
而且do while这样写对吗,我怎么觉得怪怪的,小弟新手勿喷 |