aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Lab_2B.X/lab2b_c.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lab_2B.X/lab2b_c.c b/Lab_2B.X/lab2b_c.c
index 7992b5b..893c812 100644
--- a/Lab_2B.X/lab2b_c.c
+++ b/Lab_2B.X/lab2b_c.c
@@ -39,6 +39,7 @@ void writeColor(int r, int g, int b) {
int i = 0;
LATA = 0x0000;
wait_100us();
+ //RED
while (i < 8) {
if (r & 1) {
write_1();
@@ -48,6 +49,7 @@ void writeColor(int r, int g, int b) {
r >> 1;
++i;
}
+ //GREEN
while (i > 0) {
if (g & 1) {
write_1();
@@ -57,6 +59,7 @@ void writeColor(int r, int g, int b) {
g >> 1;
--i;
}
+ //BLUE
while (i < 8){
if (b & 1) {
write_1();
@@ -108,4 +111,4 @@ void loop(void) {
writeColor(255, 155, 0);
}
-} \ No newline at end of file
+}