TVZ2022 / Mbed OS Programskih_zadataka_SEF_Orlovic_Ivan
Revision:
1:d1e0d33bb542
Parent:
0:805e0c86042b
--- a/SegDisplay.cpp	Sun Nov 27 23:59:17 2022 +0000
+++ b/SegDisplay.cpp	Wed Nov 30 22:16:35 2022 +0000
@@ -1,23 +1,23 @@
-// SegDisplay.cpp file for Exercise 7-7 
+
 #include "SegDisplay.h" 
-BusOut Seg1(D2,D3,D4,D5,D6,D7,D8,D9); // A,B,C,D,E,F,G,DP 
+BusOut Seg1(D2,D3,D4,D5,D6,D7,D8,D9); //definiranje sabirnice A,B,C,D,E,F,G,DP 
 
 void SegInit(void) { 
- Seg1=SegConvert(0); // initialise to zero 
+ Seg1=SegConvert(0); // inicijalizacija na 0
 } 
-char SegConvert(char SegValue) { // function 'SegConvert' 
+char SegConvert(char SegValue) { // funkcija 'SegConvert' 
  char SegByte=0x00; 
  switch (SegValue) { //DP G F E D C B A 
- case 0 : SegByte = 0x3F; break; // 0 0 1 1 1 1 1 1 binary 
- case 1 : SegByte = 0x06; break; // 0 0 0 0 0 1 1 0 binary 
- case 2 : SegByte = 0x5B; break; // 0 1 0 1 1 0 1 1 binary 
- case 3 : SegByte = 0x4F; break; // 0 1 0 0 1 1 1 1 binary 
- case 4 : SegByte = 0x66; break; // 0 1 1 0 0 1 1 0 binary 
- case 5 : SegByte = 0x6D; break; // 0 1 1 0 1 1 0 1 binary 
- case 6 : SegByte = 0x7D; break; // 0 1 1 1 1 1 0 1 binary 
- case 7 : SegByte = 0x07; break; // 0 0 0 0 0 1 1 1 binary 
- case 8 : SegByte = 0x7F; break; // 0 1 1 1 1 1 1 1 binary 
- case 9 : SegByte = 0x6F; break; // 0 1 1 0 1 1 1 1 binary 
+ case 0 : SegByte = 0x3F; break; // 0 0 1 1 1 1 1 1 
+ case 1 : SegByte = 0x06; break; // 0 0 0 0 0 1 1 0 
+ case 2 : SegByte = 0x5B; break; // 0 1 0 1 1 0 1 1 
+ case 3 : SegByte = 0x4F; break; // 0 1 0 0 1 1 1 1 
+ case 4 : SegByte = 0x66; break; // 0 1 1 0 0 1 1 0
+ case 5 : SegByte = 0x6D; break; // 0 1 1 0 1 1 0 1 
+ case 6 : SegByte = 0x7D; break; // 0 1 1 1 1 1 0 1 
+ case 7 : SegByte = 0x07; break; // 0 0 0 0 0 1 1 1 
+ case 8 : SegByte = 0x7F; break; // 0 1 1 1 1 1 1 1 
+ case 9 : SegByte = 0x6F; break; // 0 1 1 0 1 1 1 1 
  } 
  return SegByte; 
 } 
\ No newline at end of file