Question: Fix the broken C code. The program should blink the Green LED every half second, but the Red LED is steadily lit. You may NOT
Fix the broken C code. The program should blink the Green LED every half second, but the Red LED is steadily lit. You may NOT delete or add code, you may only change values being stored in a variable or register (hint there are only 4 errors)

1 #include Kmsp430g2553.h Fix this code You may NOT delete or add code, you may only change values being stored in a variable or register 7 void DELAY 8 unsigned int CLS unsigned int x); 9 unsigned int unsigned int x) 10 11 int main(void) t 12 DTCT DTPW I DTHOLD 13 14 volatile unsigned int m 1; 15 volatile unsigned int s 0; 17 volatile unsigned int p 65535 16 18 P1DIR. 19 20 while(s) 21 CRS (p); 22 23 1OUT DELAY(); 24 25 26 27 28 void DELAY volatile unsigned int i 25 29 volatile unsigned int j 0; 30 volatile unsigned int k 1; 31 32 volatile unsigned int 1 0; 33 34 for i 0; i--) 35 36 37 38 39 CLS 41 42 43 unsigned int CLS unsigned int x)t 44 return (x 1) I (x 15); 45 46 47 unsigned int CRS( unsigned int x)t 48 return (x 1) I (x 15) 49
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
