int main(void) { char str_buf[30]; int32_t value =43552; LED_Init(); ILI9341_Init(); Usart1_Init(9600); Myprintf_Init(0x00,myputc); ILI9341_Puts(0,0,"LCD string test",&MY_Font_11x18,ILI9341_COLOR_WHITE,ILI9341_COLOR_BLUE); while(1) { //my_printf("It's usart1 test!\n"); my_sprintf(str_buf,"%d\n",value); my_printf(str_buf); LED_GREEN_ON(); LED_RED_OFF(); delay(800000); LED_GREEN_OFF(); LED_RED_ON(); delay(800000); } return 0; }
/*====================================================================================================*/ int main( void ) { s32 Sita = 0; SystemInit(); GPIO_Config(); ILI9341_Config(); ILI9341_Init(); WaveForm_Init(); LED_R = 0; while(1) { LED_G = !LED_G; LED_B = !LED_B; Sita++; if(Sita == 360) Sita = 0; WaveForm.Data[0] = sinf(toRad(Sita))*10000; WaveForm.Data[1] = sinf(toRad(Sita-120))*10000; WaveForm.Data[2] = sinf(toRad(Sita-240))*10000; LCD_PutNum(WaveFromNum_X, WaveFromNum_Y+8*11, Type_I, 5, WaveForm.Data[0], RED, BLACK); LCD_PutNum(WaveFromNum_X, WaveFromNum_Y+8*16, Type_I, 5, WaveForm.Data[1], GREEN, BLACK); LCD_PutNum(WaveFromNum_X, WaveFromNum_Y+8*21, Type_I, 5, WaveForm.Data[2], BLUE, BLACK); WaveFormPrint(&WaveForm); } }
/*====================================================================================================*/ int main( void ) { SystemInit(); GPIO_Config(); ILI9341_Config(); ILI9341_Init(); LED_R = 0; LCD_TestColoBar(); while(1) { LED_G = !LED_G; LED_B = !LED_B; Delay_1ms(200); } }
/*=====================================================================================================*/ int main( void ) { SystemInit(); GPIO_Config(); ILI9341_Config(); ILI9341_Init(); LED_R = 0; LCD_TestColoBar(); LCD_DrawPicture(5, 0, 229, 320, QCopterLogo_229x320); while(1) { LED_B = ~LED_B; LED_Y = ~LED_Y; Delay_1ms(200); } }
int main(void) { LED_Init(); ILI9341_Init(); ILI9341_Fill(ILI9341_COLOR_BLUE); ILI9341_Puts(0,0,"LCD string test",&MY_Font_11x18,ILI9341_COLOR_WHITE,ILI9341_COLOR_BLUE); while(1) { LED_GREEN_ON(); LED_RED_OFF(); delay(800000); LED_GREEN_OFF(); LED_RED_ON(); delay(800000); } return 0; }