int main(void) { armcmx_init(); setup(); while (1) loop(); }
int main(void) { armcmx_init(); lcd.begin(20, 4); lcd.clear(); lcd.print("Hello there!"); }
int main(void) { armcmx_init(); printf("Hello!\n"); //setup GLCD.Init(); // initialise the library, non inverted writes pixels onto a clear screen if(GLCD.Height >= 64) icon = ArduinoIcon64x64; // the 64 pixel high icon else icon = ArduinoIcon64x32; // the 32 pixel high icon introScreen(); GLCD.ClearScreen(); GLCD.SelectFont(System5x7, BLACK); // font for the default text area GLCD.println("GLCD version "); GLCD.println(" armcmx "); GLCD.DrawRect(8,16,110,32); // rounded rectangle around text area /* srand(23); int x = 0, y = 0; // uint8 d; // uint16 color = 0xff; while (1) { x = rand() % 127; y = rand() % 63; delay_ms(20); GLCD.SetDot(x, y, 1); // x = ++x % 128; // if (x == 0) // y = ++y % 64; } */ while (1) { iter = 0; startMillis = millis(); while( millis() - startMillis < 1000){ // loop for one second GLCD.DrawRect(0, 0, 64, 61, BLACK); // rectangle in left side of screen GLCD.DrawRoundRect(68, 0, 58, 61, 5, BLACK); // rounded rectangle around text area for(int i=0; i < 62; i += 4) GLCD.DrawLine(1,1,63,i, BLACK); // draw lines from upper left down right side of rectangle GLCD.DrawCircle(32,31,30,BLACK); // draw circle centered in the left side of screen GLCD.FillRect(92,40,16,16, WHITE); // clear previous spinner position drawSpinner(loops++,100,48); // draw new spinner position //GLCD.FillRect(24,txtLINE3,14,14, WHITE); // clear text area that will be drawn below GLCD.CursorTo(5,5); // locate curser for printing text GLCD.PrintNumber(++iter); // print current iteration at the current cursor position } // display number of iterations in one second GLCD.ClearScreen(); // clear the screen GLCD.CursorTo(14,2); // positon cursor GLCD.Puts("FPS= "); // print a text string GLCD.PrintNumber(iter); // print a number } }
/** * @brief Main program. * @param None * @retval None */ int main(void) { /*!< At this stage the microcontroller clock setting is already configured to 168 MHz, this is done through SystemInit() function which is called from startup file (startup_stm32f4xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f4xx.c file */ armcmx_init(); printf("Hello.\n"); #ifdef SERIAL_DEBUG DebugComPort_Init(); #endif /*Initialize LCD and Leds */ LCD_LED_Init(); /* configure ethernet (GPIOs, clocks, MAC, DMA) */ ETH_BSP_Config(); /* Initilaize the LwIP stack */ LwIP_Init(); /* Http webserver Init */ httpd_init(); /* Infinite loop */ while (1) { /* check if any packet received */ if (ETH_CheckFrameReceived()) { /* process received ethernet packet */ LwIP_Pkt_Handle(); } /* handle periodic timers for LwIP */ LwIP_Periodic_Handle(LocalTime); } }