int main(void) { InitLED(); LCD_Initialize(); RefreshLEDState(true, LED_MAX_BRIGHTNESS); Delay_ms(1000); RefreshLEDState(false, LED_MAX_BRIGHTNESS); while(true) { //LED_PORT->BSRR = LED_PIN; LCDFillScreen(0xFF, 0x00, 0x00); Delay_ms(1000); //LED_PORT->BRR = LED_PIN; LCDFillScreen(0x00, 0xFF, 0x00); Delay_ms(1000); //LED_PORT->BSRR = LED_PIN; LCDFillScreen(0x00, 0x00, 0xFF); Delay_ms(1000); //LED_PORT->BRR = LED_PIN; LCDFillScreen(0xFF, 0xFF, 0xFF); Delay_ms(1000); } }
void draw_info_screen( unsigned int keys ) { int i = 0; unsigned int xoffset = LCD_WIDTH; if( keys & (BTN_GREEN | BTN_RED) ) { current_app_state = DO_HALF_MENU; do_redraw = true; return; } if( do_redraw ) { LCDFillScreen( MENU_BG ); for( i = 0; (i < FULL_MENU_NUM_ITEMS)&&(info_strings[i]!=NULL); i++ ) { xoffset = (LCD_WIDTH - 8 * strlen(info_strings[i])) >> 1; LCDPutStr( info_strings[i], i*LINE_HEIGHT, xoffset, MENU_FONT, MENU_FG, MENU_BG ); } } do_redraw = false; }