|
這是串口中斷
- void DEBUG_USART_IRQHandler(void)
- {
- if(USART_GetITStatus(DEBUG_USARTx,USART_IT_RXNE)!=RESET)
- {
- temp_head[0] = USART_ReceiveData(DEBUG_USARTx);
-
- }
- }
復(fù)制代碼
這是顯示數(shù)據(jù)的代碼
- while(1)
- {
- Gui_DrawFont_GBK16(5,5,BLUE,BLACK,"任務(wù)顯示:");
- Gui_DrawFont_GBK16(5,55,BLUE,BLACK,"進(jìn)程:");
- Gui_DrawFont_Num32(0 ,20,GREEN,BLACK,Num[2]);
- Gui_DrawFont_Num32(0 ,20,BLACK,BLACK,Num[2]);
- Gui_DrawFont_Num32(0 ,20,GREEN,BLACK,Num[3]);
- Gui_DrawFont_Num32(0 ,20,BLACK,BLACK,Num[3]);
- Gui_DrawFont_Num32(0 ,20,GREEN,BLACK,Num[4]);
- Gui_DrawFont_Num32(0 ,20,BLACK,BLACK,Num[4]);
-
- Gui_DrawFont_Num32(25,20,GREEN,BLACK,Num[2]);
- Gui_DrawFont_Num32(50,20,GREEN,BLACK,Num[3]);
- Gui_DrawFont_GBK16(82,30,RED,BLACK,"+");
- Gui_DrawFont_Num32(90,20,GREEN,BLACK,Num[1]);
- Gui_DrawFont_Num32(115,20,GREEN,BLACK,Num[2]);
- Gui_DrawFont_Num32(140,20,GREEN,BLACK,Num[3]);
- USART_SendData(DEBUG_USARTx,0xA2);
- sprintf((char*)cx_buf,"cx:%08X",temp_head[2]);
- Gui_DrawFont_GBK16(5,80,RED,BLACK,cx_buf);
復(fù)制代碼
|
|