|
@@ -18,11 +18,11 @@
|
|
* {3.3 3.2 3.1 3.0 2.7 2.6 2.5 2.4 2.3 2.2} VL2/B
|
|
* {3.3 3.2 3.1 3.0 2.7 2.6 2.5 2.4 2.3 2.2} VL2/B
|
|
* {2.1 2.0 1.7 1.6 1.5 1.4 1.3 1.2 1.1 1.0} VL1/A
|
|
* {2.1 2.0 1.7 1.6 1.5 1.4 1.3 1.2 1.1 1.0} VL1/A
|
|
*/
|
|
*/
|
|
-static const uint16_t nixieCathodeMap[4][10] = {
|
|
|
|
- {0x8000, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000},
|
|
|
|
- {0x2000, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000},
|
|
|
|
- {0x0800, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400},
|
|
|
|
- {0x0200, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100}
|
|
|
|
|
|
+static const uint16_t nixieCathodeMap[4][11] = {
|
|
|
|
+ {0x8000, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x0000},
|
|
|
|
+ {0x2000, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x0000},
|
|
|
|
+ {0x0800, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0000},
|
|
|
|
+ {0x0200, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0000}
|
|
};
|
|
};
|
|
//static const uint8_t nixieCathodeMask[4][2] = {{0x00, 0x3f}, {0xc0, 0x0f}, {0xf0, 0x03}, {0xc0, 0x00}};
|
|
//static const uint8_t nixieCathodeMask[4][2] = {{0x00, 0x3f}, {0xc0, 0x0f}, {0xf0, 0x03}, {0xc0, 0x00}};
|
|
static uint8_t tubesBuffer[SPI_BUFFER_SIZE] = {0};
|
|
static uint8_t tubesBuffer[SPI_BUFFER_SIZE] = {0};
|
|
@@ -150,10 +150,10 @@ void slideDigits(tube4_t dig) {
|
|
tube4_t buf;
|
|
tube4_t buf;
|
|
const uint8_t pause = 100;;
|
|
const uint8_t pause = 100;;
|
|
|
|
|
|
- buf.s8.tA = 0xf;
|
|
|
|
- buf.s8.tB = 0xf;
|
|
|
|
- buf.s8.tD = 0xf;
|
|
|
|
- buf.s8.tE = 0xf;
|
|
|
|
|
|
+ buf.s8.tA = TUBE_BLANK;
|
|
|
|
+ buf.s8.tB = TUBE_BLANK;
|
|
|
|
+ buf.s8.tD = TUBE_BLANK;
|
|
|
|
+ buf.s8.tE = TUBE_BLANK;
|
|
_show_digits(buf.u32);
|
|
_show_digits(buf.u32);
|
|
tdelay_ms(pause);
|
|
tdelay_ms(pause);
|
|
|
|
|
|
@@ -182,22 +182,22 @@ void slideDigits(tube4_t dig) {
|
|
buf.s8.tA = dig.s8.tB;
|
|
buf.s8.tA = dig.s8.tB;
|
|
buf.s8.tB = dig.s8.tD;
|
|
buf.s8.tB = dig.s8.tD;
|
|
buf.s8.tD = dig.s8.tE;
|
|
buf.s8.tD = dig.s8.tE;
|
|
- buf.s8.tE = 0xf;
|
|
|
|
|
|
+ buf.s8.tE = TUBE_BLANK;
|
|
_show_digits(buf.u32);
|
|
_show_digits(buf.u32);
|
|
tdelay_ms(pause);
|
|
tdelay_ms(pause);
|
|
|
|
|
|
buf.s8.tA = dig.s8.tD;
|
|
buf.s8.tA = dig.s8.tD;
|
|
buf.s8.tB = dig.s8.tE;
|
|
buf.s8.tB = dig.s8.tE;
|
|
- buf.s8.tD = 0xf;
|
|
|
|
|
|
+ buf.s8.tD = TUBE_BLANK;
|
|
_show_digits(buf.u32);
|
|
_show_digits(buf.u32);
|
|
tdelay_ms(pause);
|
|
tdelay_ms(pause);
|
|
|
|
|
|
buf.s8.tA = dig.s8.tE;
|
|
buf.s8.tA = dig.s8.tE;
|
|
- buf.s8.tB = 0xf;
|
|
|
|
|
|
+ buf.s8.tB = TUBE_BLANK;
|
|
_show_digits(buf.u32);
|
|
_show_digits(buf.u32);
|
|
tdelay_ms(pause);
|
|
tdelay_ms(pause);
|
|
|
|
|
|
- buf.s8.tA = 0xf;
|
|
|
|
|
|
+ buf.s8.tA = TUBE_BLANK;
|
|
_show_digits(buf.u32);
|
|
_show_digits(buf.u32);
|
|
tdelay_ms(pause);
|
|
tdelay_ms(pause);
|
|
}
|
|
}
|
|
@@ -218,7 +218,7 @@ static void _show_digits(const uint32_t digits)
|
|
int i;
|
|
int i;
|
|
for (i=0; i<4; i++) {
|
|
for (i=0; i<4; i++) {
|
|
if (dig.ar[i] > 9) {
|
|
if (dig.ar[i] > 9) {
|
|
- if (dig.ar[i] != 0xf) {
|
|
|
|
|
|
+ if (dig.ar[i] != TUBE_BLANK) {
|
|
dig.ar[i] = 0;
|
|
dig.ar[i] = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -240,7 +240,7 @@ static void _show_digits(const uint32_t digits)
|
|
|
|
|
|
/* On/Off tube power */
|
|
/* On/Off tube power */
|
|
for (i=0; i<4; i++) {
|
|
for (i=0; i<4; i++) {
|
|
- if (dig.ar[i] == 0xf) {
|
|
|
|
|
|
+ if (dig.ar[i] == TUBE_BLANK) {
|
|
tube_PowerOff((tube_pos_t)i);
|
|
tube_PowerOff((tube_pos_t)i);
|
|
} else {
|
|
} else {
|
|
tube_PowerOn((tube_pos_t)i);
|
|
tube_PowerOn((tube_pos_t)i);
|