예제 #1
0
파일: display.c 프로젝트: mtl/tmk_keyboard
void display_draw( bool sleep ) {

    // Turn on the busy LED:
    display_busy( true );

    // Blank the display if requested:
    if ( sleep ) {
        u8g_SleepOn( &u8g );
    }

    // Render the image:
    u8g_FirstPage( &u8g );
    do {
        // Stop if the draw function doesn't want to continue:
        if ( ! ui_draw( &u8g ) ) {
            break;
        }
    } while ( u8g_NextPage( &u8g ) );
    u8g_Delay( 100 );

    // Turn the display back on if blanking was requested:
    if ( sleep ) {
        u8g_SleepOff( &u8g );
    }

    // Turn off the busy LED:
    display_busy( false );
}
예제 #2
0
ICACHE_FLASH_ATTR void drawingSetShow(DrawingState *state, bool isShown) {
    if (isShown)
        u8g_SleepOn(&(state->u8g));
    else
        u8g_SleepOff(&(state->u8g));
    drawingSetInvalid(state);
}
예제 #3
0
파일: u8g.c 프로젝트: rudg/nodemcu-firmware
// Lua: u8g.sleepOn( self )
static int lu8g_sleepOn( lua_State *L )
{
    lu8g_userdata_t *lud;

    if ((lud = get_lud( L )) == NULL)
        return 0;

    u8g_SleepOn( LU8G );

    return 0;
}
예제 #4
0
파일: display.c 프로젝트: mtl/tmk_keyboard
void display_draw_full_screen_bitmap( const u8g_pgm_uint8_t *image ) {

    u8g_SleepOn( &u8g );
    u8g_DrawFullScreenBitmapP( &u8g, (uint8_t *) image );
    u8g_SleepOff( &u8g );
}