глобальные структуруы OW и DS перенесены в hdallas напрямую, без указателей

и соответственно укорочены аргументы Dallas_BusFirstInit
This commit is contained in:
2025-06-30 18:39:10 +03:00
parent fa32d653e8
commit fad8b2551a
5 changed files with 29 additions and 38 deletions

View File

@@ -92,9 +92,9 @@ int main(void)
MX_USART1_UART_Init();
/* USER CODE BEGIN 2 */
#ifndef UART_Driver
Dallas_BusFirstInit(&hdallas, OW_GPIO_Port, OW_Pin, NULL, NULL);
Dallas_BusFirstInit(&hdallas, OW_GPIO_Port, OW_Pin);
#else
Dallas_BusFirstInit(&hdallas, &huart1, NULL, NULL);
Dallas_BusFirstInit(&hdallas, &huart1);
#endif
sens.Init.InitParam.Ind = 0;
sens.Init.init_func = &Dallas_SensorInitByInd;