slcd: we can fit these segment mappings into one byte

This commit is contained in:
Joey Castillo 2025-05-20 23:50:09 -04:00
parent d43c216664
commit 287f755edb
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@
#include <stdlib.h>
#include <math.h>
uint32_t IndicatorSegments[8] = {
uint8_t IndicatorSegments[8] = {
SLCD_SEGID(0, 17), // WATCH_INDICATOR_SIGNAL
SLCD_SEGID(0, 16), // WATCH_INDICATOR_BELL
SLCD_SEGID(2, 17), // WATCH_INDICATOR_PM

View File

@ -42,9 +42,9 @@
*/
/// @{
#define SLCD_SEGID(com, seg) (((com) << 16) | (seg))
#define SLCD_COMNUM(segid) (((segid) >> 16) & 0xFF)
#define SLCD_SEGNUM(segid) ((segid)&0xFF)
#define SLCD_SEGID(com, seg) (((com) << 5) | (seg))
#define SLCD_COMNUM(segid) (((segid) >> 5) & 0x07)
#define SLCD_SEGNUM(segid) ((segid) & 0x1F)
/// An enum listing the icons and indicators available on the watch.
typedef enum {