45 template<BOARD::pin_t SCE_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
77 static const uint8_t default_font[] PROGMEM = {
175 m_font = font != NULL ? font : default_font;
256 if (x >= WIDTH) x = 0;
257 if (y >= HEIGHT) y = 0;
275 if (c > 128)
return (0);
311 segments = pgm_read_byte(
m_font + c -
' ') | 0x80;
317 segments = pgm_read_byte(
m_font + c -
' ');
344 } __attribute__((packed));
351 void set(uint8_t reg, uint8_t value)
365 } __attribute__((packed));
373 } __attribute__((packed));
376 SRPO<MSBFIRST, SDIN_PIN, SCLK_PIN>
m_srpo;
const uint8_t * m_font
Font in program memory.
uint8_t m_y
Cursor position y.
Digit 1 (encode or segment data).
uint8_t m_x
Cursor position x.
Display Mode (shutdown, normal).
virtual size_t write(uint8_t c)
Digit 6 (encode or segment data).
virtual void cursor_set(uint8_t x, uint8_t y)
Display Test (0..1, on/off).
Digit 7 (encode or segment data).
virtual void display_contrast(uint8_t level)
virtual void display_off()
Scan Limit (0..7, digits 1..8).
Digit 3 (encode or segment data).
Digit 5 (encode or segment data).
Decode Mode (0..255, digit bitset).
static const uint8_t WIDTH
Digit 4 (encode or segment data).
GPIO< SCE_PIN > m_sce
Chip enable pin.
virtual void display_on()
virtual void display_clear()
SRPO< MSBFIRST, SDIN_PIN, SCLK_PIN > m_srpo
Serial output.
Digit 2 (encode or segment data).
MAX72XX(const uint8_t *font=NULL)
Code B decode for digits 7-0.
char m_latest
Latest character code.
virtual void cursor_home()
Intensity (0..15, level).
Digit 0 (encode or segment data).
static const uint8_t HEIGHT
No decode for digits 7-0.