Переструктурирован проект, перенесена ветка тестирования modbus и чуть скомпрессированная библиотека dallas

This commit is contained in:
2025-03-03 13:05:37 +03:00
parent 0f2736b8a5
commit b6978c385a
14 changed files with 387 additions and 4321 deletions

View File

@@ -24,6 +24,7 @@
#include "main.h"
#include "gpio.h"
#include "tim.h"
#include "usart.h"
#include "pch_sensors.h"
#include "rs_message.h"
@@ -51,6 +52,11 @@ int main(void)
MX_GPIO_Init();
MX_TIM1_Init();
HAL_TIM_Base_Start(&htim1);
MX_USART1_UART_Init();
// MODBUS_FirstInit();
// RS_Receive_IT(&hmodbus1, &MODBUS_MSG);
PCHSens_FirstInit();
/* infinite loop */
@@ -58,6 +64,11 @@ int main(void)
{
GPIOA->ODR ^= GPIO_LED_2;
PCHSens_ReadTemperature(&module1);
PCHSens_ReadTemperature(&module2);
PCHSens_ReadTemperature(&module3);
PCHSens_ReadTemperature(&module4);
PCHSens_ReadTemperature(&module5);
PCHSens_ReadTemperature(&module6);
}
}

View File

@@ -75,6 +75,23 @@ void SysTick_Handler(void)
HAL_IncTick();
}
//#include "rs_message.h"
///**
// * @brief This function handles USART1.
// */
//void USART1_IRQHandler(void)
//{
// RS_UART_Handler(&hmodbus1);
//}
///**
// * @brief This function handles TIM2 global interrupt.
// */
//void TIM14_IRQHandler(void)
//{
// /* USER CODE BEGIN TIM2_IRQn 0 */
// RS_TIM_Handler(&hmodbus1);
//}
/******************************************************************************/
/* PY32F002B Peripheral Interrupt Handlers */
/* Add here the Interrupt Handlers for the used peripherals. */