sseg: added support for 'O' and 'F'

This commit is contained in:
Thomas Kolb 2024-05-15 22:06:23 +02:00
parent 3e9526a916
commit 02f622996c
2 changed files with 11 additions and 0 deletions

View file

@ -3,6 +3,8 @@
Z: 11011010 0011 1101 0x3C
A: 11101110 0111 0111 0x77
M: 11101100 0111 0110 0x76
O: 11111100 0111 1110 0x7E
F: 10001110 0001 0111 0x47
0: 11111100 0111 1110 0x7E
1: 01100000 0110 0000 0x60

View file

@ -34,9 +34,12 @@ static uint m_sm;
static int m_dma_chan;
// see doc/sseg_codes.txt for construction details
static uint8_t ascii_to_sseg(char c)
{
switch(c) {
case 'o':
case 'O':
case '0':
return 0x7E;
@ -68,12 +71,18 @@ static uint8_t ascii_to_sseg(char c)
case '9':
return 0x7B;
case 'm':
case 'M':
return 0x76;
case 'a':
case 'A':
return 0x77;
case 'f':
case 'F':
return 0x47;
default: // '-'
return 0x01;
}