diff options
author | RossTheRoss <msattr@gmail.com> | 2020-02-12 13:25:44 -0600 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2020-02-12 13:25:44 -0600 |
commit | 5264bd66223c5e384e627f2501b9d8518c2df1a3 (patch) | |
tree | c3717bba6844b586cda5d5e4487102c616b13482 /Lab_2B.X/lab2b_c.c | |
parent | Fix writeColor (diff) | |
download | ee2361-5264bd66223c5e384e627f2501b9d8518c2df1a3.tar ee2361-5264bd66223c5e384e627f2501b9d8518c2df1a3.tar.gz ee2361-5264bd66223c5e384e627f2501b9d8518c2df1a3.tar.bz2 ee2361-5264bd66223c5e384e627f2501b9d8518c2df1a3.tar.lz ee2361-5264bd66223c5e384e627f2501b9d8518c2df1a3.tar.xz ee2361-5264bd66223c5e384e627f2501b9d8518c2df1a3.tar.zst ee2361-5264bd66223c5e384e627f2501b9d8518c2df1a3.zip |
e
Diffstat (limited to 'Lab_2B.X/lab2b_c.c')
-rw-r--r-- | Lab_2B.X/lab2b_c.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lab_2B.X/lab2b_c.c b/Lab_2B.X/lab2b_c.c index b33d126..f7150c9 100644 --- a/Lab_2B.X/lab2b_c.c +++ b/Lab_2B.X/lab2b_c.c @@ -16,7 +16,7 @@ #pragma config FCKSM = CSECME // Clock Switching and Monitor (Clock switching is enabled,
// Fail-Safe Clock Monitor is enabled)
#pragma config FNOSC = FRCPLL // Oscillator Select (Fast RC Oscillator with PLL module (FRCPLL))
-#define PERIOD 20
+#define PERIOD 30
//DEFINTIONS
void writeColor(int r, int g, int b);
@@ -113,10 +113,9 @@ void writeColor(int r, int g, int b) { }
void delay(int delay_in_ms) {
- int i = 0;
- while (i < delay_in_ms) {
+ int i;
+ for (i = 0; i < delay_in_ms; i++) {
wait_1ms();
- i++;
}
}
|