// Lua: u8g.setFontRefHeightExtendedText( self ) static int lu8g_setFontRefHeightExtendedText( lua_State *L ) { lu8g_userdata_t *lud; if ((lud = get_lud( L )) == NULL) return 0; u8g_SetFontRefHeightExtendedText( LU8G ); return 0; }
void display_init(void) { /* select minimal prescaler (max system speed) */ CLKPR = 0xFF; // SCK MOSI CS D/C u8g_InitSPI(&u8g, &u8g_dev_ssd1325_nhd27oled_2x_gr_sw_spi, PN(5, 6), PN(5, 5), PN(4, 7),PN(5,7), PN(4,6)); u8g_SetRot180(&u8g); /* assign default color value */ u8g_SetColorIndex(&u8g, 3); /* max intensity */ // u8g_SetColorIndex(&u8g, 1); /* pixel on */ u8g_SetFont(&u8g, u8g_font_profont11); u8g_SetFontRefHeightExtendedText(&u8g); u8g_SetDefaultForegroundColor(&u8g); u8g_SetFontPosTop(&u8g); }
void u8g_prepare(void) { u8g_SetFont(&u8g, u8g_font_6x10); u8g_SetFontRefHeightExtendedText(&u8g); u8g_SetDefaultForegroundColor(&u8g); u8g_SetFontPosTop(&u8g); }