Part Number:MSP432P401R
Tool/software: TI C/C++ Compiler
void Delay(uint16_t msec){ uint32_t i=0; uint32_t time=(msec/1000)*(SYSTEM_CLOCK_SPEED/15); for(i=0;i<time;i++); }
This is the delay used in the grlib example for the Kentec touchscreen. I notice that I is not even marked volatile. Shouldn't this get optimized away? Do I need to be careful if I add optimization? Is the compiler smart enough to see the word "delay" and leave it alone? 8^)