diff options
author | RossTheRoss <msattr@gmail.com> | 2020-02-09 11:38:35 -0600 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2020-02-09 11:38:35 -0600 |
commit | 8d15625be9753e9898f44fa9a9a131191f48fece (patch) | |
tree | 236853778cabd59cde5544693d9418c2de585930 | |
parent | redo? (diff) | |
download | ee2361-8d15625be9753e9898f44fa9a9a131191f48fece.tar ee2361-8d15625be9753e9898f44fa9a9a131191f48fece.tar.gz ee2361-8d15625be9753e9898f44fa9a9a131191f48fece.tar.bz2 ee2361-8d15625be9753e9898f44fa9a9a131191f48fece.tar.lz ee2361-8d15625be9753e9898f44fa9a9a131191f48fece.tar.xz ee2361-8d15625be9753e9898f44fa9a9a131191f48fece.tar.zst ee2361-8d15625be9753e9898f44fa9a9a131191f48fece.zip |
HELP
-rw-r--r-- | Lab_2B.X/lab2b_c.c | 5 |
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 +}
|