/* Nokia 5110 (PCD8544) on SPI0: SCK GP18, MOSI GP19, CE GP17, D/C GP20, RST GP21. 84 × 48, 504-byte framebuffer. */ #ifndef SEEDBOX_PCD8544_H #define SEEDBOX_PCD8544_H #define LCD_W 84 #define LCD_H 48 #define LCD_VOP_DEFAULT 66 /* contrast; varies between modules, so it's a setting. 66 suits the bench module. */ void lcd_init(int vop); void lcd_set_vop(int vop); /* 0..127 */ void lcd_clear(void); void lcd_px(int x, int y, int on); void lcd_fill(int x, int y, int w, int h, int on); void lcd_box(int x, int y, int w, int h); /* 1 px outline */ void lcd_text(int x, int y, const char *s); /* 5 × 7 font from app.js, 6 px per character, upper case */ void lcd_text_v(int x, int y, const char *s, int on); /* draws only the glyph pixels, in on (0 = inverse) */ void lcd_flush(void); #endif