FreeRTOS acquisition and release?
Hello Everyone,
I have a Problem with to acquisition DATA from One TASK to another and release data.
And there is another problem that I can not access Data from One task to another task.
how to use and when can we use , in this code i have to use acquisition and release process in this given code.
i have to send latitude , longitude ,objectTemp and ambientTemp by EC200u(message) and take data from temp sensor and L89.
void StartTask1(void *argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
while(!sendHTTP(Latitude, Longitude, objectTemp, ambientTemp)){
osSemaphoreAcquire(myCountingSem, osWaitForever);
if(count < 1){
count++;
}
else{
break;
}
osSemaphoreRelease(myCountingSem);
}
osDelay(100);
}
/* USER CODE END 5 */
}
/* USER CODE BEGIN Header_StartL89 */
/**
* @brief Function implementing the L89 thread.
* argument: Not used
* @retval None
*/
/* USER CODE END Header_StartL89 */
void StartL89(void *argument)
{
/* USER CODE BEGIN StartL89 */
/* Infinite loop */
for(;;)
{
uint8_t count = 0;
while(Latitude == 4 || Latitude == 1)
{
osSemaphoreAcquire(myCountingSem, osWaitForever);
HAL_UART_Receive(&huart2, (uint8_t *)Rxdata, 700, 5000);
get_location(&Latitude, &Longitude,0);
// L89_TogglePin(2,3);
if(count < 1)
{
count++;
// EC200_TogglePin(5,3);
}
else
{
break;
}
osSemaphoreRelease(myCountingSem);
}
osDelay(1);
}
/* USER CODE END StartL89 */
}
