commit
This commit is contained in:
@@ -53,12 +53,12 @@ void MX_GPIO_Init(void)
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4
|
||||
|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8
|
||||
|GPIO_PIN_9|GPIO_PIN_10|One_wire_Pin, GPIO_PIN_RESET);
|
||||
|GPIO_PIN_9|GPIO_PIN_10|One_wire_Pin, GPIO_PIN_SET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_10
|
||||
|GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14
|
||||
|GPIO_PIN_15, GPIO_PIN_RESET);
|
||||
|GPIO_PIN_15, GPIO_PIN_SET);
|
||||
|
||||
/*Configure GPIO pin : PA0 */
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_0;
|
||||
|
||||
@@ -51,6 +51,8 @@ int fputc(int ch, FILE *f)
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
/* USER CODE BEGIN PD */
|
||||
uint16_t iter,cnt=5;
|
||||
|
||||
uint8_t ralay_5v_on_var=0;
|
||||
/* USER CODE END PD */
|
||||
|
||||
/* Private macro -------------------------------------------------------------*/
|
||||
@@ -93,6 +95,7 @@ void SystemClock_Config(void);
|
||||
* @retval int
|
||||
*/
|
||||
int main(void)
|
||||
|
||||
{
|
||||
|
||||
/* USER CODE BEGIN 1 */
|
||||
@@ -118,6 +121,7 @@ int main(void)
|
||||
|
||||
/* Initialize all configured peripherals */
|
||||
MX_GPIO_Init();
|
||||
|
||||
MX_TIM1_Init();
|
||||
MX_USART1_UART_Init();
|
||||
MX_TIM2_Init();
|
||||
@@ -183,6 +187,18 @@ int main(void)
|
||||
Dallas_ReadTemperature(&sens[i]);
|
||||
sens[i].set_temp = MB_DATA.HoldRegs.set_Temp[i];
|
||||
MB_DATA.InRegs.sens_Temp[i]=sens[i].temperature*10;
|
||||
|
||||
|
||||
|
||||
ralay_5v_on_var=MB_DATA.Coils.coils[1].state_val_bit.state_val_05;
|
||||
if (ralay_5v_on_var)
|
||||
{
|
||||
GPIOA->ODR|=1<<10;
|
||||
}
|
||||
else
|
||||
{
|
||||
GPIOA->ODR&=~(1<<10);
|
||||
}
|
||||
|
||||
//// if (sens[i].temperature<sens[i].set_temp-sens[i].hyst)
|
||||
////
|
||||
|
||||
Reference in New Issue
Block a user