Vladimir N. Shilov
9 år sedan
förälder
incheckning
b45ca957b8
1 ändrade filer med
15 tillägg och
14 borttagningar
-
15
14
lib/max7219.h
|
@@ -20,14 +20,14 @@
|
|
|
|
|
|
/* Exported defines ----------------------------------------------------------*/
|
|
|
// соответсвие бит сегментам
|
|
|
-#define SEG_A 5
|
|
|
+#define SEG_A 1
|
|
|
#define SEG_B 3
|
|
|
-#define SEG_C 4
|
|
|
-#define SEG_D 1
|
|
|
-#define SEG_E 0
|
|
|
-#define SEG_F 6
|
|
|
+#define SEG_C 2
|
|
|
+#define SEG_D 5
|
|
|
+#define SEG_E 6
|
|
|
+#define SEG_F 0
|
|
|
#define SEG_G 7
|
|
|
-#define SEG_DP 2
|
|
|
+#define SEG_DP 4
|
|
|
|
|
|
// symbols
|
|
|
// Для BCD
|
|
@@ -68,14 +68,15 @@
|
|
|
|
|
|
/* Exported types ------------------------------------------------------------*/
|
|
|
typedef enum {
|
|
|
- Digit0 = 0x07,
|
|
|
- Digit1 = 0x06,
|
|
|
- Digit2 = 0x04,
|
|
|
- Digit3 = 0x01,
|
|
|
- Digit4 = 0x03,
|
|
|
- Digit5 = 0x02,
|
|
|
- Digit6 = 0x00,
|
|
|
- Digit7 = 0x05,
|
|
|
+ NoOp = 0x00,
|
|
|
+ Digit0 = 0x08,
|
|
|
+ Digit1 = 0x07,
|
|
|
+ Digit2 = 0x05,
|
|
|
+ Digit3 = 0x02,
|
|
|
+ Digit4 = 0x04,
|
|
|
+ Digit5 = 0x03,
|
|
|
+ Digit6 = 0x01,
|
|
|
+ Digit7 = 0x06,
|
|
|
DecodeMode = 0x09,
|
|
|
Intensity = 0x0A,
|
|
|
ScanLimit = 0x0B,
|