slcd: we can fit these segment mappings into one byte
This commit is contained in:
parent
d43c216664
commit
287f755edb
@ -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
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user