Update freertos.c
parent
178b3e001f
commit
cfab7191b5
|
@ -216,11 +216,11 @@ void StartDefaultTask(void *argument)
|
|||
printf("Copyright (c) Powered by www.autolabor.com.cn\n");
|
||||
osDelay(100);
|
||||
printf("BIOS SW Version: V0.9, build: %s, %s\n",__DATE__ ,__TIME__ );
|
||||
printf("HAL Version: %d \n", HAL_GetHalVersion());
|
||||
printf("Revision ID: %d \n", HAL_GetREVID());
|
||||
printf("Device ID: %d \n", HAL_GetDEVID());
|
||||
printf("HAL Version: %lu \n", HAL_GetHalVersion());
|
||||
printf("Revision ID: %lu \n", HAL_GetREVID());
|
||||
printf("Device ID: %lu \n", HAL_GetDEVID());
|
||||
osDelay(100);
|
||||
printf("Chip UID: %d%d%d \n", HAL_GetUIDw0(),HAL_GetUIDw1(),HAL_GetUIDw2);
|
||||
printf("Chip UID: %lu%lu%lu \n", HAL_GetUIDw0(),HAL_GetUIDw1(),HAL_GetUIDw2);
|
||||
printf("----------------------------------------------\n");
|
||||
|
||||
/* Infinite loop */
|
||||
|
@ -555,8 +555,9 @@ void StartUartQueueTask(void *argument)
|
|||
osDelay(1);
|
||||
count = osMessageQueueGetCount(uartQueueHandle);
|
||||
if(count){
|
||||
for(uint8_t i=0;i<count;i++){
|
||||
for(uint32_t i=0;i<count;i++){
|
||||
osMessageQueueGet(uartQueueHandle,&temp[i],0,10);
|
||||
uint32_t space = osMessageQueueGetSpace(uartQueueHandle);
|
||||
}
|
||||
// taskENTER_CRITICAL();
|
||||
while(HAL_UART_GetState(&huart1) == HAL_UART_STATE_BUSY_TX){}
|
||||
|
@ -585,8 +586,10 @@ PUTCHAR_PROTOTYPE
|
|||
// HAL_UART_Transmit(&huart1,(uint8_t *)&ch,1,0xffff);
|
||||
|
||||
//queue space check before enqueue
|
||||
if(osMessageQueueGetSpace(uartQueueHandle)>0){
|
||||
osMessageQueuePut(uartQueueHandle,(uint8_t*)&ch,0,100);
|
||||
uint32_t space = osMessageQueueGetSpace(uartQueueHandle);
|
||||
if(space){
|
||||
osMessageQueuePut(uartQueueHandle,(uint8_t*)&ch,0,10);
|
||||
space = osMessageQueueGetSpace(uartQueueHandle);
|
||||
}
|
||||
else{
|
||||
// uint8_t front[1];//trash
|
||||
|
|
Loading…
Reference in New Issue