Delay Using Busy Loop
Implement a blocking delay loop using busy-waiting. Used for timing LED toggles in lightweight bare-metal systems without timers.
Constraints
- Argument is number of iterations.
- Use volatile to prevent optimization.
- Pure busy wait with decrementing loop.
- Must compile on ARM or x86.
1void delay(volatile unsigned int n);