aboutsummaryrefslogtreecommitdiffstats
path: root/Lab_2B.X
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2020-02-09 11:38:35 -0600
committerRossTheRoss <msattr@gmail.com>2020-02-09 11:38:35 -0600
commit8d15625be9753e9898f44fa9a9a131191f48fece (patch)
tree236853778cabd59cde5544693d9418c2de585930 /Lab_2B.X
parentredo? (diff)
downloadee2361-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
Diffstat (limited to 'Lab_2B.X')
-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
+}