mirror of
https://github.com/egzumer/uv-k5-firmware-custom
synced 2024-11-22 01:32:43 +00:00
Small font complete
This commit is contained in:
parent
6975911352
commit
e5c7c81276
@ -9,12 +9,12 @@ A cool achievement
|
||||
# User customization
|
||||
|
||||
You can customize the firmware by enabling/disabling various compile options.
|
||||
You'll find the options at the top of "makefile" ('0' = disable, '1' = enable) ..
|
||||
You'll find the options at the top of "Makefile" ('0' = disable, '1' = enable) ..
|
||||
|
||||
```
|
||||
ENABLE_SWD := 0 only needed if using CPU's SWD port (debugging/programming)
|
||||
ENABLE_OVERLAY := 1 cpu FLASH stuff
|
||||
ENABLE_UART := 1 without this you can't configure the radio via PC
|
||||
ENABLE_UART := 1 without this you can't configure radio via PC
|
||||
ENABLE_AIRCOPY := 0 easier to just enter frequency
|
||||
ENABLE_FMRADIO := 0 WBFM VHF band 2 RX
|
||||
ENABLE_NOAA := 0 Everything NOAA
|
||||
@ -27,7 +27,7 @@ ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though fronte
|
||||
ENABLE_TX_WHEN_AM := 0 allow TX (always FM) when RX is set to AM
|
||||
ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1 standard CTCSS tail phase shift rather than QS's own 55Hz tone method
|
||||
ENABLE_MAIN_KEY_HOLD := 1 initial F-key press not needed, instead hold down keys 0-9
|
||||
ENABLE_BOOT_BEEPS := 1 give user audio feedback on the volume knob position at boot-up
|
||||
ENABLE_BOOT_BEEPS := 1 give user audio feedback on volume knob position at boot-up
|
||||
ENABLE_COMPANDER := 1 compander option - setting not yet saved
|
||||
#ENABLE_SINGLE_VFO_CHAN := 1 not yet implemented - single VFO on display when possible
|
||||
#ENABLE_BAND_SCOPE := 1 not yet implemented - spectrum/pan-adapter
|
||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
406
font.c
406
font.c
@ -164,314 +164,102 @@ const uint8_t gFontSmallDigits[11][7] =
|
||||
{0x00, 0x46, 0x49, 0x49, 0x49, 0x29, 0x1E},
|
||||
{0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00}
|
||||
};
|
||||
/*
|
||||
const uint8_t gFont5x8[95][5] =
|
||||
|
||||
const uint8_t gFontSmall[95][7] =
|
||||
{
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x5F, 0x00, 0x00},
|
||||
{0x00, 0x07, 0x00, 0x07, 0x00},
|
||||
{0x14, 0x7F, 0x14, 0x7F, 0x14},
|
||||
{0x24, 0x2A, 0x7F, 0x2A, 0x12},
|
||||
{0x23, 0x13, 0x08, 0x64, 0x62},
|
||||
{0x36, 0x49, 0x56, 0x20, 0x50},
|
||||
{0x00, 0x08, 0x07, 0x03, 0x00},
|
||||
{0x00, 0x1C, 0x22, 0x41, 0x00},
|
||||
{0x00, 0x41, 0x22, 0x1C, 0x00},
|
||||
{0x2A, 0x1C, 0x7F, 0x1C, 0x2A},
|
||||
{0x08, 0x08, 0x3E, 0x08, 0x08},
|
||||
{0x00, 0x80, 0x70, 0x30, 0x00},
|
||||
{0x08, 0x08, 0x08, 0x08, 0x08},
|
||||
{0x00, 0x00, 0x60, 0x60, 0x00},
|
||||
{0x20, 0x10, 0x08, 0x04, 0x02},
|
||||
|
||||
{0x3E, 0x41, 0x41, 0x41, 0x3E},
|
||||
{0x00, 0x42, 0x7F, 0x40, 0x00},
|
||||
{0x72, 0x49, 0x49, 0x49, 0x46},
|
||||
{0x21, 0x41, 0x49, 0x4D, 0x33},
|
||||
{0x18, 0x14, 0x12, 0x7F, 0x10},
|
||||
{0x27, 0x45, 0x45, 0x45, 0x39},
|
||||
{0x3C, 0x4A, 0x49, 0x49, 0x31},
|
||||
{0x41, 0x21, 0x11, 0x09, 0x07},
|
||||
{0x36, 0x49, 0x49, 0x49, 0x36},
|
||||
{0x46, 0x49, 0x49, 0x29, 0x1E},
|
||||
{0x00, 0x00, 0x14, 0x00, 0x00},
|
||||
{0x00, 0x40, 0x34, 0x00, 0x00},
|
||||
{0x00, 0x08, 0x14, 0x22, 0x41},
|
||||
{0x14, 0x14, 0x14, 0x14, 0x14},
|
||||
{0x00, 0x41, 0x22, 0x14, 0x08},
|
||||
{0x02, 0x01, 0x59, 0x09, 0x06},
|
||||
|
||||
{0x3E, 0x41, 0x5D, 0x59, 0x4E},
|
||||
{0x7C, 0x12, 0x11, 0x12, 0x7C},
|
||||
{0x7F, 0x49, 0x49, 0x49, 0x36},
|
||||
{0x3E, 0x41, 0x41, 0x41, 0x22},
|
||||
{0x7F, 0x41, 0x41, 0x41, 0x3E},
|
||||
{0x7F, 0x49, 0x49, 0x49, 0x41},
|
||||
{0x7F, 0x09, 0x09, 0x09, 0x01},
|
||||
{0x3E, 0x41, 0x41, 0x51, 0x73},
|
||||
{0x7F, 0x08, 0x08, 0x08, 0x7F},
|
||||
{0x00, 0x41, 0x7F, 0x41, 0x00},
|
||||
{0x20, 0x40, 0x41, 0x3F, 0x01},
|
||||
{0x7F, 0x08, 0x14, 0x22, 0x41},
|
||||
{0x7F, 0x40, 0x40, 0x40, 0x40},
|
||||
{0x7F, 0x02, 0x1C, 0x02, 0x7F},
|
||||
{0x7F, 0x04, 0x08, 0x10, 0x7F},
|
||||
{0x3E, 0x41, 0x41, 0x41, 0x3E},
|
||||
|
||||
{0x7F, 0x09, 0x09, 0x09, 0x06},
|
||||
{0x3E, 0x41, 0x51, 0x21, 0x5E},
|
||||
{0x7F, 0x09, 0x19, 0x29, 0x46},
|
||||
{0x26, 0x49, 0x49, 0x49, 0x32},
|
||||
{0x03, 0x01, 0x7F, 0x01, 0x03},
|
||||
{0x3F, 0x40, 0x40, 0x40, 0x3F},
|
||||
{0x1F, 0x20, 0x40, 0x20, 0x1F},
|
||||
{0x3F, 0x40, 0x38, 0x40, 0x3F},
|
||||
{0x63, 0x14, 0x08, 0x14, 0x63},
|
||||
{0x03, 0x04, 0x78, 0x04, 0x03},
|
||||
{0x61, 0x59, 0x49, 0x4D, 0x43},
|
||||
{0x00, 0x7F, 0x41, 0x41, 0x41},
|
||||
{0x02, 0x04, 0x08, 0x10, 0x20},
|
||||
{0x00, 0x41, 0x41, 0x41, 0x7F},
|
||||
{0x04, 0x02, 0x01, 0x02, 0x04},
|
||||
{0x40, 0x40, 0x40, 0x40, 0x40},
|
||||
|
||||
{0x00, 0x03, 0x07, 0x08, 0x00},
|
||||
{0x20, 0x54, 0x54, 0x78, 0x40},
|
||||
{0x7F, 0x28, 0x44, 0x44, 0x38},
|
||||
{0x38, 0x44, 0x44, 0x44, 0x28},
|
||||
{0x38, 0x44, 0x44, 0x28, 0x7F},
|
||||
{0x38, 0x54, 0x54, 0x54, 0x18},
|
||||
{0x00, 0x08, 0x7E, 0x09, 0x02},
|
||||
{0x18, 0xA4, 0xA4, 0x9C, 0x78},
|
||||
{0x7F, 0x08, 0x04, 0x04, 0x78},
|
||||
{0x00, 0x44, 0x7D, 0x40, 0x00},
|
||||
{0x20, 0x40, 0x40, 0x3D, 0x00},
|
||||
{0x7F, 0x10, 0x28, 0x44, 0x00},
|
||||
{0x00, 0x41, 0x7F, 0x40, 0x00},
|
||||
{0x7C, 0x04, 0x78, 0x04, 0x78},
|
||||
{0x7C, 0x08, 0x04, 0x04, 0x78},
|
||||
{0x38, 0x44, 0x44, 0x44, 0x38},
|
||||
|
||||
{0xFC, 0x18, 0x24, 0x24, 0x18},
|
||||
{0x18, 0x24, 0x24, 0x18, 0xFC},
|
||||
{0x7C, 0x08, 0x04, 0x04, 0x08},
|
||||
{0x48, 0x54, 0x54, 0x54, 0x24},
|
||||
{0x04, 0x04, 0x3F, 0x44, 0x24},
|
||||
{0x3C, 0x40, 0x40, 0x20, 0x7C},
|
||||
{0x1C, 0x20, 0x40, 0x20, 0x1C},
|
||||
{0x3C, 0x40, 0x30, 0x40, 0x3C},
|
||||
{0x44, 0x28, 0x10, 0x28, 0x44},
|
||||
{0x4C, 0x90, 0x90, 0x90, 0x7C},
|
||||
{0x44, 0x64, 0x54, 0x4C, 0x44},
|
||||
{0x00, 0x08, 0x36, 0x41, 0x00},
|
||||
{0x00, 0x00, 0x77, 0x00, 0x00},
|
||||
{0x00, 0x41, 0x36, 0x08, 0x00},
|
||||
{0x02, 0x01, 0x02, 0x04, 0x02}
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00},
|
||||
{0x00, 0x14, 0x3E, 0x14, 0x3E, 0x14, 0x00},
|
||||
{0x00, 0x26, 0x49, 0x7F, 0x49, 0x32, 0x00},
|
||||
{0x00, 0x63, 0x13, 0x08, 0x04, 0x62, 0x61},
|
||||
{0x00, 0x30, 0x4B, 0x4D, 0x55, 0x22, 0x50},
|
||||
{0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x2A, 0x1C, 0x1C, 0x2A, 0x00},
|
||||
{0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00},
|
||||
{0x00, 0x00, 0x40, 0x60, 0x20, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00},
|
||||
{0x00, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02},
|
||||
{0x00, 0x3E, 0x41, 0x41, 0x41, 0x41, 0x3E},
|
||||
{0x00, 0x00, 0x40, 0x42, 0x7F, 0x40, 0x40},
|
||||
{0x00, 0x62, 0x51, 0x51, 0x49, 0x49, 0x46},
|
||||
{0x00, 0x22, 0x41, 0x49, 0x49, 0x49, 0x36},
|
||||
{0x00, 0x18, 0x14, 0x12, 0x11, 0x7F, 0x10},
|
||||
{0x00, 0x27, 0x45, 0x45, 0x45, 0x45, 0x39},
|
||||
{0x00, 0x3E, 0x49, 0x49, 0x49, 0x49, 0x32},
|
||||
{0x00, 0x01, 0x01, 0x71, 0x09, 0x05, 0x03},
|
||||
{0x00, 0x36, 0x49, 0x49, 0x49, 0x49, 0x36},
|
||||
{0x00, 0x26, 0x49, 0x49, 0x49, 0x49, 0x3E},
|
||||
{0x00, 0x00, 0x00, 0x6C, 0x6C, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x40, 0x6C, 0x2C, 0x00, 0x00},
|
||||
{0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x00},
|
||||
{0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00},
|
||||
{0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00},
|
||||
{0x00, 0x02, 0x01, 0x51, 0x09, 0x06, 0x00},
|
||||
{0x00, 0x30, 0x4A, 0x4A, 0x52, 0x3C, 0x00},
|
||||
{0x00, 0x7E, 0x09, 0x09, 0x09, 0x09, 0x7E},
|
||||
{0x00, 0x7F, 0x49, 0x49, 0x49, 0x49, 0x36},
|
||||
{0x00, 0x3E, 0x41, 0x41, 0x41, 0x41, 0x22},
|
||||
{0x00, 0x7F, 0x41, 0x41, 0x41, 0x41, 0x3E},
|
||||
{0x00, 0x7F, 0x49, 0x49, 0x49, 0x49, 0x41},
|
||||
{0x00, 0x7F, 0x09, 0x09, 0x09, 0x09, 0x01},
|
||||
{0x00, 0x3E, 0x41, 0x49, 0x49, 0x49, 0x3A},
|
||||
{0x00, 0x7F, 0x08, 0x08, 0x08, 0x08, 0x7F},
|
||||
{0x00, 0x41, 0x41, 0x7F, 0x41, 0x41, 0x00},
|
||||
{0x00, 0x20, 0x41, 0x41, 0x3F, 0x01, 0x01},
|
||||
{0x00, 0x7F, 0x08, 0x0C, 0x12, 0x21, 0x40},
|
||||
{0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x40},
|
||||
{0x00, 0x7F, 0x02, 0x04, 0x04, 0x02, 0x7F},
|
||||
{0x00, 0x7F, 0x02, 0x04, 0x08, 0x10, 0x7F},
|
||||
{0x00, 0x3E, 0x41, 0x41, 0x41, 0x41, 0x3E},
|
||||
{0x00, 0x7F, 0x09, 0x09, 0x09, 0x09, 0x06},
|
||||
{0x00, 0x3E, 0x41, 0x51, 0x61, 0x41, 0x3E},
|
||||
{0x00, 0x7F, 0x09, 0x09, 0x19, 0x29, 0x46},
|
||||
{0x00, 0x26, 0x49, 0x49, 0x49, 0x49, 0x32},
|
||||
{0x00, 0x01, 0x01, 0x7F, 0x01, 0x01, 0x00},
|
||||
{0x00, 0x3F, 0x40, 0x40, 0x40, 0x40, 0x3F},
|
||||
{0x00, 0x07, 0x38, 0x40, 0x40, 0x38, 0x07},
|
||||
{0x00, 0x3F, 0x40, 0x30, 0x30, 0x40, 0x3F},
|
||||
{0x00, 0x63, 0x14, 0x08, 0x08, 0x14, 0x63},
|
||||
{0x00, 0x07, 0x08, 0x70, 0x08, 0x07, 0x00},
|
||||
{0x00, 0x61, 0x51, 0x49, 0x45, 0x43, 0x41},
|
||||
{0x00, 0x00, 0x7F, 0x41, 0x41, 0x00, 0x00},
|
||||
{0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x60},
|
||||
{0x00, 0x00, 0x00, 0x41, 0x41, 0x7F, 0x00},
|
||||
{0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x00},
|
||||
{0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40},
|
||||
{0x00, 0x00, 0x03, 0x07, 0x06, 0x00, 0x00},
|
||||
{0x00, 0x20, 0x54, 0x54, 0x54, 0x78, 0x00},
|
||||
{0x00, 0x7F, 0x44, 0x44, 0x44, 0x38, 0x00},
|
||||
{0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00},
|
||||
{0x00, 0x38, 0x44, 0x44, 0x44, 0x7F, 0x00},
|
||||
{0x00, 0x38, 0x54, 0x54, 0x54, 0x48, 0x00},
|
||||
{0x00, 0x7C, 0x0A, 0x0A, 0x0A, 0x02, 0x00},
|
||||
{0x00, 0x58, 0x54, 0x54, 0x54, 0x3C, 0x00},
|
||||
{0x00, 0x7F, 0x04, 0x04, 0x04, 0x78, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x7A, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x3F, 0x40, 0x00, 0x00},
|
||||
{0x00, 0x7C, 0x08, 0x10, 0x10, 0x08, 0x7C},
|
||||
{0x00, 0x7C, 0x04, 0x04, 0x04, 0x78, 0x00},
|
||||
{0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00},
|
||||
{0x00, 0x7C, 0x14, 0x14, 0x14, 0x08, 0x00},
|
||||
{0x00, 0x08, 0x14, 0x14, 0x14, 0x7C, 0x40},
|
||||
{0x00, 0x7C, 0x04, 0x04, 0x04, 0x08, 0x00},
|
||||
{0x00, 0x08, 0x54, 0x54, 0x54, 0x20, 0x00},
|
||||
{0x00, 0x3F, 0x44, 0x44, 0x44, 0x40, 0x00},
|
||||
{0x00, 0x3C, 0x40, 0x40, 0x40, 0x3C, 0x00},
|
||||
{0x00, 0x0C, 0x30, 0x40, 0x30, 0x0C, 0x00},
|
||||
{0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00},
|
||||
{0x00, 0x44, 0x28, 0x10, 0x28, 0x44, 0x00},
|
||||
{0x00, 0x0C, 0x50, 0x50, 0x50, 0x3C, 0x00},
|
||||
{0x00, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00},
|
||||
{0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x7F, 0x00, 0x00, 0x00},
|
||||
{0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00},
|
||||
{0x00, 0x04, 0x02, 0x04, 0x08, 0x04, 0x00}
|
||||
};
|
||||
*/
|
||||
/*
|
||||
// ASCII 5x7 font
|
||||
const uint8_t gFont5x7[96][5] =
|
||||
{
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00}, // ' '
|
||||
{0x00, 0x00, 0x5F, 0x00, 0x00},
|
||||
{0x00, 0x07, 0x00, 0x07, 0x00},
|
||||
{0x14, 0x7F, 0x14, 0x7F, 0x14},
|
||||
{0x24, 0x2A, 0x7F, 0x2A, 0x12},
|
||||
{0x23, 0x13, 0x08, 0x64, 0x62},
|
||||
{0x36, 0x49, 0x56, 0x20, 0x50},
|
||||
{0x00, 0x08, 0x07, 0x03, 0x00},
|
||||
{0x00, 0x1C, 0x22, 0x41, 0x00},
|
||||
{0x00, 0x41, 0x22, 0x1C, 0x00},
|
||||
{0x2A, 0x1C, 0x7F, 0x1C, 0x2A},
|
||||
{0x08, 0x08, 0x3E, 0x08, 0x08},
|
||||
{0x00, 0x80, 0x70, 0x30, 0x00},
|
||||
{0x08, 0x08, 0x08, 0x08, 0x08},
|
||||
{0x00, 0x00, 0x60, 0x60, 0x00},
|
||||
{0x20, 0x10, 0x08, 0x04, 0x02},
|
||||
|
||||
{0x3E, 0x41, 0x41, 0x41, 0x3E}, // '0'
|
||||
{0x00, 0x42, 0x7F, 0x40, 0x00},
|
||||
{0x72, 0x49, 0x49, 0x49, 0x46},
|
||||
{0x21, 0x41, 0x49, 0x4D, 0x33},
|
||||
{0x18, 0x14, 0x12, 0x7F, 0x10},
|
||||
{0x27, 0x45, 0x45, 0x45, 0x39},
|
||||
{0x3C, 0x4A, 0x49, 0x49, 0x31},
|
||||
{0x41, 0x21, 0x11, 0x09, 0x07},
|
||||
{0x36, 0x49, 0x49, 0x49, 0x36},
|
||||
{0x46, 0x49, 0x49, 0x29, 0x1E},
|
||||
{0x00, 0x00, 0x14, 0x00, 0x00},
|
||||
{0x00, 0x40, 0x34, 0x00, 0x00},
|
||||
{0x00, 0x08, 0x14, 0x22, 0x41},
|
||||
{0x14, 0x14, 0x14, 0x14, 0x14},
|
||||
{0x00, 0x41, 0x22, 0x14, 0x08},
|
||||
{0x02, 0x01, 0x59, 0x09, 0x06},
|
||||
|
||||
{0x3E, 0x41, 0x5D, 0x59, 0x4E}, // '@'
|
||||
{0x7C, 0x12, 0x11, 0x12, 0x7C}, // 'A'
|
||||
{0x7F, 0x49, 0x49, 0x49, 0x36},
|
||||
{0x3E, 0x41, 0x41, 0x41, 0x22},
|
||||
{0x7F, 0x41, 0x41, 0x41, 0x3E},
|
||||
{0x7F, 0x49, 0x49, 0x49, 0x41},
|
||||
{0x7F, 0x09, 0x09, 0x09, 0x01},
|
||||
{0x3E, 0x41, 0x41, 0x51, 0x73},
|
||||
{0x7F, 0x08, 0x08, 0x08, 0x7F},
|
||||
{0x00, 0x41, 0x7F, 0x41, 0x00},
|
||||
{0x20, 0x40, 0x41, 0x3F, 0x01},
|
||||
{0x7F, 0x08, 0x14, 0x22, 0x41},
|
||||
{0x7F, 0x40, 0x40, 0x40, 0x40},
|
||||
{0x7F, 0x02, 0x1C, 0x02, 0x7F},
|
||||
{0x7F, 0x04, 0x08, 0x10, 0x7F},
|
||||
{0x3E, 0x41, 0x41, 0x41, 0x3E},
|
||||
|
||||
{0x7F, 0x09, 0x09, 0x09, 0x06},
|
||||
{0x3E, 0x41, 0x51, 0x21, 0x5E},
|
||||
{0x7F, 0x09, 0x19, 0x29, 0x46},
|
||||
{0x26, 0x49, 0x49, 0x49, 0x32},
|
||||
{0x03, 0x01, 0x7F, 0x01, 0x03},
|
||||
{0x3F, 0x40, 0x40, 0x40, 0x3F},
|
||||
{0x1F, 0x20, 0x40, 0x20, 0x1F},
|
||||
{0x3F, 0x40, 0x38, 0x40, 0x3F},
|
||||
{0x63, 0x14, 0x08, 0x14, 0x63},
|
||||
{0x03, 0x04, 0x78, 0x04, 0x03},
|
||||
{0x61, 0x59, 0x49, 0x4D, 0x43},
|
||||
{0x00, 0x7F, 0x41, 0x41, 0x41},
|
||||
{0x02, 0x04, 0x08, 0x10, 0x20},
|
||||
{0x00, 0x41, 0x41, 0x41, 0x7F},
|
||||
{0x04, 0x02, 0x01, 0x02, 0x04},
|
||||
{0x40, 0x40, 0x40, 0x40, 0x40},
|
||||
|
||||
{0x00, 0x03, 0x07, 0x08, 0x00},
|
||||
{0x20, 0x54, 0x54, 0x78, 0x40},
|
||||
{0x7F, 0x28, 0x44, 0x44, 0x38},
|
||||
{0x38, 0x44, 0x44, 0x44, 0x28},
|
||||
{0x38, 0x44, 0x44, 0x28, 0x7F},
|
||||
{0x38, 0x54, 0x54, 0x54, 0x18},
|
||||
{0x00, 0x08, 0x7E, 0x09, 0x02},
|
||||
{0x18, 0xA4, 0xA4, 0x9C, 0x78},
|
||||
{0x7F, 0x08, 0x04, 0x04, 0x78},
|
||||
{0x00, 0x44, 0x7D, 0x40, 0x00},
|
||||
{0x20, 0x40, 0x40, 0x3D, 0x00},
|
||||
{0x7F, 0x10, 0x28, 0x44, 0x00},
|
||||
{0x00, 0x41, 0x7F, 0x40, 0x00},
|
||||
{0x7C, 0x04, 0x78, 0x04, 0x78},
|
||||
{0x7C, 0x08, 0x04, 0x04, 0x78},
|
||||
{0x38, 0x44, 0x44, 0x44, 0x38},
|
||||
|
||||
{0xFC, 0x18, 0x24, 0x24, 0x18},
|
||||
{0x18, 0x24, 0x24, 0x18, 0xFC},
|
||||
{0x7C, 0x08, 0x04, 0x04, 0x08},
|
||||
{0x48, 0x54, 0x54, 0x54, 0x24},
|
||||
{0x04, 0x04, 0x3F, 0x44, 0x24},
|
||||
{0x3C, 0x40, 0x40, 0x20, 0x7C},
|
||||
{0x1C, 0x20, 0x40, 0x20, 0x1C},
|
||||
{0x3C, 0x40, 0x30, 0x40, 0x3C},
|
||||
{0x44, 0x28, 0x10, 0x28, 0x44},
|
||||
{0x4C, 0x90, 0x90, 0x90, 0x7C},
|
||||
{0x44, 0x64, 0x54, 0x4C, 0x44},
|
||||
{0x00, 0x08, 0x36, 0x41, 0x00},
|
||||
{0x00, 0x00, 0x77, 0x00, 0x00},
|
||||
{0x00, 0x41, 0x36, 0x08, 0x00},
|
||||
{0x02, 0x01, 0x02, 0x04, 0x02},
|
||||
{0x3C, 0x26, 0x23, 0x26, 0x3C}
|
||||
};
|
||||
*/
|
||||
const uint8_t gFont5x7[96][5] =
|
||||
{
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00}, // (space)
|
||||
{0x00, 0x00, 0x5F, 0x00, 0x00}, // !
|
||||
{0x00, 0x07, 0x00, 0x07, 0x00}, // "
|
||||
{0x14, 0x7F, 0x14, 0x7F, 0x14}, // #
|
||||
{0x24, 0x2A, 0x7F, 0x2A, 0x12}, // $
|
||||
{0x23, 0x13, 0x08, 0x64, 0x62}, // %
|
||||
{0x36, 0x49, 0x55, 0x22, 0x50}, // &
|
||||
{0x00, 0x05, 0x03, 0x00, 0x00}, // '
|
||||
{0x00, 0x1C, 0x22, 0x41, 0x00}, // (
|
||||
{0x00, 0x41, 0x22, 0x1C, 0x00}, // )
|
||||
{0x08, 0x2A, 0x1C, 0x2A, 0x08}, // *
|
||||
{0x08, 0x08, 0x3E, 0x08, 0x08}, // +
|
||||
{0x00, 0x50, 0x30, 0x00, 0x00}, // ,
|
||||
{0x08, 0x08, 0x08, 0x08, 0x08}, // -
|
||||
{0x00, 0x60, 0x60, 0x00, 0x00}, // .
|
||||
{0x20, 0x10, 0x08, 0x04, 0x02}, // /
|
||||
{0x3E, 0x51, 0x49, 0x45, 0x3E}, // 0
|
||||
{0x00, 0x42, 0x7F, 0x40, 0x00}, // 1
|
||||
{0x42, 0x61, 0x51, 0x49, 0x46}, // 2
|
||||
{0x21, 0x41, 0x45, 0x4B, 0x31}, // 3
|
||||
{0x18, 0x14, 0x12, 0x7F, 0x10}, // 4
|
||||
{0x27, 0x45, 0x45, 0x45, 0x39}, // 5
|
||||
{0x3C, 0x4A, 0x49, 0x49, 0x30}, // 6
|
||||
{0x01, 0x71, 0x09, 0x05, 0x03}, // 7
|
||||
{0x36, 0x49, 0x49, 0x49, 0x36}, // 8
|
||||
{0x06, 0x49, 0x49, 0x29, 0x1E}, // 9
|
||||
{0x00, 0x36, 0x36, 0x00, 0x00}, // :
|
||||
{0x00, 0x56, 0x36, 0x00, 0x00}, // ;
|
||||
{0x00, 0x08, 0x14, 0x22, 0x41}, // <
|
||||
{0x14, 0x14, 0x14, 0x14, 0x14}, // =
|
||||
{0x41, 0x22, 0x14, 0x08, 0x00}, // >
|
||||
{0x02, 0x01, 0x51, 0x09, 0x06}, // ?
|
||||
{0x32, 0x49, 0x79, 0x41, 0x3E}, // @
|
||||
{0x7E, 0x11, 0x11, 0x11, 0x7E}, // A
|
||||
{0x7F, 0x49, 0x49, 0x49, 0x36}, // B
|
||||
{0x3E, 0x41, 0x41, 0x41, 0x22}, // C
|
||||
{0x7F, 0x41, 0x41, 0x22, 0x1C}, // D
|
||||
{0x7F, 0x49, 0x49, 0x49, 0x41}, // E
|
||||
{0x7F, 0x09, 0x09, 0x01, 0x01}, // F
|
||||
{0x3E, 0x41, 0x41, 0x51, 0x32}, // G
|
||||
{0x7F, 0x08, 0x08, 0x08, 0x7F}, // H
|
||||
{0x00, 0x41, 0x7F, 0x41, 0x00}, // I
|
||||
{0x20, 0x40, 0x41, 0x3F, 0x01}, // J
|
||||
{0x7F, 0x08, 0x14, 0x22, 0x41}, // K
|
||||
{0x7F, 0x40, 0x40, 0x40, 0x40}, // L
|
||||
{0x7F, 0x02, 0x04, 0x02, 0x7F}, // M
|
||||
{0x7F, 0x04, 0x08, 0x10, 0x7F}, // N
|
||||
{0x3E, 0x41, 0x41, 0x41, 0x3E}, // O
|
||||
{0x7F, 0x09, 0x09, 0x09, 0x06}, // P
|
||||
{0x3E, 0x41, 0x51, 0x21, 0x5E}, // Q
|
||||
{0x7F, 0x09, 0x19, 0x29, 0x46}, // R
|
||||
{0x46, 0x49, 0x49, 0x49, 0x31}, // S
|
||||
{0x01, 0x01, 0x7F, 0x01, 0x01}, // T
|
||||
{0x3F, 0x40, 0x40, 0x40, 0x3F}, // U
|
||||
{0x1F, 0x20, 0x40, 0x20, 0x1F}, // V
|
||||
{0x7F, 0x20, 0x18, 0x20, 0x7F}, // W
|
||||
{0x63, 0x14, 0x08, 0x14, 0x63}, // X
|
||||
{0x03, 0x04, 0x78, 0x04, 0x03}, // Y
|
||||
{0x61, 0x51, 0x49, 0x45, 0x43}, // Z
|
||||
{0x00, 0x00, 0x7F, 0x41, 0x41}, // [
|
||||
{0x02, 0x04, 0x08, 0x10, 0x20}, // "\"
|
||||
{0x41, 0x41, 0x7F, 0x00, 0x00}, // ]
|
||||
{0x04, 0x02, 0x01, 0x02, 0x04}, // ^
|
||||
{0x40, 0x40, 0x40, 0x40, 0x40}, // _
|
||||
{0x00, 0x01, 0x02, 0x04, 0x00}, // `
|
||||
{0x20, 0x54, 0x54, 0x54, 0x78}, // a
|
||||
{0x7F, 0x48, 0x44, 0x44, 0x38}, // b
|
||||
{0x38, 0x44, 0x44, 0x44, 0x20}, // c
|
||||
{0x38, 0x44, 0x44, 0x48, 0x7F}, // d
|
||||
{0x38, 0x54, 0x54, 0x54, 0x18}, // e
|
||||
{0x08, 0x7E, 0x09, 0x01, 0x02}, // f
|
||||
{0x08, 0x14, 0x54, 0x54, 0x3C}, // g
|
||||
{0x7F, 0x08, 0x04, 0x04, 0x78}, // h
|
||||
{0x00, 0x44, 0x7D, 0x40, 0x00}, // i
|
||||
{0x20, 0x40, 0x44, 0x3D, 0x00}, // j
|
||||
{0x00, 0x7F, 0x10, 0x28, 0x44}, // k
|
||||
{0x00, 0x41, 0x7F, 0x40, 0x00}, // l
|
||||
{0x7C, 0x04, 0x18, 0x04, 0x78}, // m
|
||||
{0x7C, 0x08, 0x04, 0x04, 0x78}, // n
|
||||
{0x38, 0x44, 0x44, 0x44, 0x38}, // o
|
||||
{0x7C, 0x14, 0x14, 0x14, 0x08}, // p
|
||||
{0x08, 0x14, 0x14, 0x18, 0x7C}, // q
|
||||
{0x7C, 0x08, 0x04, 0x04, 0x08}, // r
|
||||
{0x48, 0x54, 0x54, 0x54, 0x20}, // s
|
||||
{0x04, 0x3F, 0x44, 0x40, 0x20}, // t
|
||||
{0x3C, 0x40, 0x40, 0x20, 0x7C}, // u
|
||||
{0x1C, 0x20, 0x40, 0x20, 0x1C}, // v
|
||||
{0x3C, 0x40, 0x30, 0x40, 0x3C}, // w
|
||||
{0x44, 0x28, 0x10, 0x28, 0x44}, // x
|
||||
{0x0C, 0x50, 0x50, 0x50, 0x3C}, // y
|
||||
{0x44, 0x64, 0x54, 0x4C, 0x44}, // z
|
||||
{0x00, 0x08, 0x36, 0x41, 0x00}, // {
|
||||
{0x00, 0x00, 0x7F, 0x00, 0x00}, // |
|
||||
{0x00, 0x41, 0x36, 0x08, 0x00}, // }
|
||||
{0x08, 0x08, 0x2A, 0x1C, 0x08}, // ->
|
||||
{0x08, 0x1C, 0x2A, 0x08, 0x08} // <-
|
||||
};
|
4
font.h
4
font.h
@ -23,9 +23,7 @@
|
||||
extern const uint8_t gFontBig[95][15];
|
||||
extern const uint8_t gFontBigDigits[11][26];
|
||||
extern const uint8_t gFontSmallDigits[11][7];
|
||||
|
||||
extern const uint8_t gFont5x8[95][5];
|
||||
extern const uint8_t gFont5x7[96][5];
|
||||
extern const uint8_t gFontSmall[95][7];
|
||||
|
||||
#endif
|
||||
|
||||
|
50
ui/helper.c
50
ui/helper.c
@ -90,52 +90,18 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_
|
||||
if (End > Start)
|
||||
Start += (((End - Start) - (Length * 8)) + 1) / 2;
|
||||
|
||||
#if 1
|
||||
{ // 5x7 font
|
||||
const unsigned int char_width = ARRAY_SIZE(gFont5x7[0]);
|
||||
const unsigned int char_spacing = char_width + 1;
|
||||
uint8_t *pFb = gFrameBuffer[Line] + Start;
|
||||
for (i = 0; i < Length; i++)
|
||||
{
|
||||
if (pString[i] >= 32)
|
||||
{
|
||||
const unsigned int Index = ((unsigned int)pString[i] - 32);
|
||||
if (Index < ARRAY_SIZE(gFont5x7))
|
||||
memcpy(pFb + (i * char_spacing), &gFont5x7[Index], char_width);
|
||||
}
|
||||
}
|
||||
}
|
||||
#elif 1
|
||||
{ // 5x8 font - this one
|
||||
const unsigned int char_width = ARRAY_SIZE(gFont5x8[0]);
|
||||
const unsigned int char_spacing = char_width + 1;
|
||||
uint8_t *pFb = gFrameBuffer[Line] + Start;
|
||||
for (i = 0; i < Length; i++)
|
||||
{
|
||||
if (pString[i] >= 32)
|
||||
{
|
||||
const unsigned int Index = (unsigned int)pString[i] - 32;
|
||||
if (Index < ARRAY_SIZE(gFont5x8))
|
||||
memcpy(pFb + (i * char_spacing), &gFont5x8[Index], char_width);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
const unsigned int char_width = ARRAY_SIZE(gFontSmall[0]);
|
||||
const unsigned int char_spacing = char_width + 0;
|
||||
uint8_t *pFb = gFrameBuffer[Line] + Start;
|
||||
for (i = 0; i < Length; i++)
|
||||
{
|
||||
const unsigned int char_width = ARRAY_SIZE(gFont6x8[0]);
|
||||
const unsigned int char_spacing = char_width + 1;
|
||||
uint8_t *pFb = gFrameBuffer[Line] + Start;
|
||||
for (i = 0; i < Length; i++)
|
||||
if (pString[i] >= 32)
|
||||
{
|
||||
if (pString[i] >= 32)
|
||||
{
|
||||
const unsigned int Index = (unsigned int)pString[i] - 32;
|
||||
if (Index < ARRAY_SIZE(gFont6x8))
|
||||
memcpy(pFb + (i * char_spacing), &gFont6x8[Index], char_width);
|
||||
}
|
||||
const unsigned int Index = (unsigned int)pString[i] - 32;
|
||||
if (Index < ARRAY_SIZE(gFontSmall))
|
||||
memcpy(pFb + (i * char_spacing), &gFontSmall[Index], char_width);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void UI_DisplayFrequency(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero, bool bFlag)
|
||||
|
@ -331,13 +331,8 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
|
||||
// show the channel frequency below the channel number/name
|
||||
#if 1
|
||||
NUMBER_ToDigits(frequency_Hz, String); // 8 digits
|
||||
UI_DisplayFrequencySmall(String, 31 + 8, Line + 1, false);
|
||||
#else
|
||||
sprintf(String, "%03u.%05u", frequency_Hz / 100000, frequency_Hz % 100000);
|
||||
UI_PrintStringSmall(String, 31 + 8, 0, Line + 1);
|
||||
#endif
|
||||
sprintf(String, "%03u.%05u", frequency_Hz / 100000, frequency_Hz % 100000);
|
||||
UI_PrintStringSmall(String, 31 + 8, 0, Line + 1);
|
||||
|
||||
break;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user