这是串口中断
- void DEBUG_USART_IRQHandler(void)
- {
- if(USART_GetITStatus(DEBUG_USARTx,USART_IT_RXNE)!=RESET)
- {
- temp_head[0] = USART_ReceiveData(DEBUG_USARTx);
-
- }
- }
复制代码
这是显示数据的代码
- while(1)
- {
- Gui_DrawFont_GBK16(5,5,BLUE,BLACK,"任务显示:");
- Gui_DrawFont_GBK16(5,55,BLUE,BLACK,"进程:");
- 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);
复制代码
|