2 Commits

Author SHA1 Message Date
a37f13628d ап 2025-11-15 19:18:04 +03:00
0a017eee9f ап 2025-11-15 19:16:26 +03:00
3633 changed files with 475 additions and 2134658 deletions

48
.gitignore vendored Normal file
View File

@@ -0,0 +1,48 @@
# ---> uVision
# git ignore file for Keil µVision Project
# µVision 5 and µVision 4 Project screen layout file
*.uvguix.*
*.uvgui.*
# Listing Files
*.i
*.lst
*.m51
*.m66
*.map
# Object Files
*.axf
*.b[0-2][0-9]
*.b3[0-1]
*.bak
*.build_log.htm
*.crf
*.d
*.dep
*.elf
*.htm
*.iex
*.lnp
*.o
*.obj
*.sbr
# Firmware Files
*.bin
*.h86
*.hex
# Build Files
.bat
# Debugger Files
.ini
# JLink Files
JLinkLog.txt
# Other Files
/john103C6T6/MDK-ARM/john103C6T6.uvoptx

11
.gitmodules vendored Normal file
View File

@@ -0,0 +1,11 @@
[submodule "external_flash_eeprom"]
path = external_flash_eeprom
url = https://git.arktika.cyou/set506/external_flash_eeprom.git
[submodule "labview_proj"]
path = labview_proj
url = https://git.arktika.cyou/Andrey/labview_proj.git
branch = master
[submodule "core/STM32_Modbus"]
path = core/STM32_Modbus
url = https://git.arktika.cyou/set506/STM32_Modbus.git
branch = release

2
README.md Normal file
View File

@@ -0,0 +1,2 @@
# ds18b20-MODBUS

1
core/STM32_Modbus Submodule

Submodule core/STM32_Modbus added at cba13802b1

1
external_flash_eeprom Submodule

Submodule external_flash_eeprom added at 6ec779c11d

File diff suppressed because one or more lines are too long

View File

@@ -35,13 +35,12 @@ extern "C" {
/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"
#include "modbus_data.h"
#include "PROJ_setup.h"
#include "dallas_tools.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "Proj_setup.h"
#include "dallas_tools.h"
#include "modbus.h"
typedef enum
{
FuncOK=0,
@@ -111,8 +110,6 @@ void Check_Tconnect(MB_DataStructureTypeDef* MB_DATA, Flags_TypeDef* flag ,DALL
FuncStat value_control(void );
void reinit_t_sens(void);
HAL_StatusTypeDef ModbusMaster_Request(RS_MsgTypeDef *request,
void (*callback)(RS_HandleTypeDef *, RS_MsgTypeDef *));
/* USER CODE END ET */

View File

@@ -1,9 +1,9 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file can.h
* @file rtc.h
* @brief This file contains all the function prototypes for
* the can.c file
* the rtc.c file
******************************************************************************
* @attention
*
@@ -18,8 +18,8 @@
*/
/* USER CODE END Header */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __CAN_H__
#define __CAN_H__
#ifndef __RTC_H__
#define __RTC_H__
#ifdef __cplusplus
extern "C" {
@@ -32,13 +32,13 @@ extern "C" {
/* USER CODE END Includes */
extern CAN_HandleTypeDef hcan;
extern RTC_HandleTypeDef hrtc;
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
void MX_CAN_Init(void);
void MX_RTC_Init(void);
/* USER CODE BEGIN Prototypes */
@@ -48,5 +48,5 @@ void MX_CAN_Init(void);
}
#endif
#endif /* __CAN_H__ */
#endif /* __RTC_H__ */

View File

@@ -62,9 +62,7 @@ void TIM1_TRG_COM_IRQHandler(void);
void TIM1_CC_IRQHandler(void);
void TIM2_IRQHandler(void);
void TIM3_IRQHandler(void);
void TIM4_IRQHandler(void);
void USART1_IRQHandler(void);
void USART2_IRQHandler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */

View File

@@ -35,7 +35,6 @@ extern "C" {
extern TIM_HandleTypeDef htim1;
extern TIM_HandleTypeDef htim2;
extern TIM_HandleTypeDef htim4;
/* USER CODE BEGIN Private defines */
@@ -43,7 +42,6 @@ extern TIM_HandleTypeDef htim4;
void MX_TIM1_Init(void);
void MX_TIM2_Init(void);
void MX_TIM4_Init(void);
/* USER CODE BEGIN Prototypes */

View File

@@ -33,14 +33,12 @@ extern "C" {
/* USER CODE END Includes */
extern UART_HandleTypeDef huart1;
extern UART_HandleTypeDef huart2;
/* USER CODE BEGIN Private defines */
/* USER CODE END Private defines */
void MX_USART1_UART_Init(void);
void MX_USART2_UART_Init(void);
/* USER CODE BEGIN Prototypes */

View File

@@ -25,6 +25,7 @@
/* USER CODE END 0 */
/*----------------------------------------------------------------------------*/
/* Configure GPIO */
/*----------------------------------------------------------------------------*/
@@ -51,10 +52,11 @@ void MX_GPIO_Init(void)
__HAL_RCC_GPIOB_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_1|GPIO_PIN_4
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|Relay_dc5v_Pin|One_wire_Pin, GPIO_PIN_RESET);
@@ -64,9 +66,9 @@ void MX_GPIO_Init(void)
|GPIO_PIN_15, GPIO_PIN_RESET);
/*Configure GPIO pin : PC13 */
GPIO_InitStruct.Pin = GPIO_PIN_13;
GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
@@ -76,10 +78,10 @@ void MX_GPIO_Init(void)
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/*Configure GPIO pins : PA1 PA4
/*Configure GPIO pins : PA1 PA2 PA3 PA4
PA5 PA6 PA7 PA8
PA9 Relay_dc5v_Pin One_wire_Pin */
GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4
GPIO_InitStruct.Pin = 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|Relay_dc5v_Pin|One_wire_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

View File

@@ -80,7 +80,7 @@ uint8_t first_in = 1;
DALLAS_SensorHandleTypeDef sens[30];
int init_sens = 0;
FlashRecord_t* record;
uint8_t flash_buff[RECORD_SIZE-4];
uint8_t flash_buff[RECORD_SIZE - 4];
/* USER CODE END PM */
@@ -88,7 +88,7 @@ uint8_t flash_buff[RECORD_SIZE-4];
/* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */
int last_page_addr=LAST_PAGE_ADDR;
int last_page_addr = LAST_PAGE_ADDR;
/* USER CODE END PV */
@@ -158,8 +158,12 @@ int main(void)
init_setpoint_all_T_sense(temp_sense, hdallas.onewire->RomCnt);
MB_DATA.InRegs.num_Tsens = hdallas.onewire->RomCnt;
BufferState_t buffer_state = buffer_init();
// BufferState_t buffer_state = buffer_init();
for(int i=0;i<RECORD_SIZE;i++)
{
flash_buff[i]=i;
}
/* USER CODE END 2 */
/* Infinite loop */
@@ -168,30 +172,30 @@ int main(void)
{
if (MB_DATA.Coils.relay_struct[0].state_val_bit.Temp11_relay_isOn)
{
MB_DATA.Coils.relay_struct[0].state_val_bit.Temp11_relay_isOn=0;
BufferState_t state = buffer_init();
uint32_t idx = (state.write_index ) % RECORDS_PER_PAGE;
FlashRecord_t* record = buffer_read_record(idx);
// if (MB_DATA.Coils.relay_struct[0].state_val_bit.Temp11_relay_isOn)
// {
// MB_DATA.Coils.relay_struct[0].state_val_bit.Temp11_relay_isOn = 0;
// BufferState_t state = buffer_init();
// uint32_t idx = (state.write_index ) % RECORDS_PER_PAGE;
// FlashRecord_t* record = buffer_read_record(idx);
}
if (MB_DATA.Coils.relay_struct[0].state_val_bit.Temp10_relay_isOn)
{
MB_DATA.Coils.relay_struct[0].state_val_bit.Temp10_relay_isOn = 0;
FlashRecord_t new_record;
new_record.timestamp = HAL_GetTick();
memset(new_record.data, (uint8_t)*flash_buff, sizeof(new_record.data));
// }
// if (MB_DATA.Coils.relay_struct[0].state_val_bit.Temp10_relay_isOn)
// {
// MB_DATA.Coils.relay_struct[0].state_val_bit.Temp10_relay_isOn = 0;
// FlashRecord_t new_record;
// new_record.timestamp = HAL_GetTick();
// memcpy(new_record.data, flash_buff, sizeof(new_record.data));
HAL_StatusTypeDef status = buffer_write_record(&new_record, &buffer_state);
// HAL_StatusTypeDef status = buffer_write_record(&new_record, &buffer_state);
if (status == HAL_OK)
{
// printf("Record written successfully\n");
GPIOC->ODR|=1<<13;
}
// if (status == HAL_OK)
// {
// // printf("Record written successfully\n");
// GPIOC->ODR |= 1 << 13;
// }
}
// }
temp_sense[0].t_close = 1;
Field_modbus(&MB_DATA, &flag);
Check_Tconnect(&MB_DATA, &flag, &hdallas, 0);
@@ -429,8 +433,8 @@ FuncStat value_control(void )
{
MB_DATA.Coils.coils[0].all |= 1 << i;
MB_DATA.Coils.coils[1].all &= ~(1 << i);
MB_DATA.Coils.relay_struct_off.all |= 1 << i;
MB_DATA.Coils.relay_struct_on.all &= ~(1 << i);
}
@@ -440,11 +444,19 @@ FuncStat value_control(void )
if (sens[i].temperature > sens[i].set_temp + sens[i].hyst)
{
MB_DATA.Coils.coils[0].all &= ~(1 << i);
MB_DATA.Coils.coils[1].all |= 1 << i;
MB_DATA.Coils.relay_struct_off.all &= ~(1 << i);
MB_DATA.Coils.relay_struct_on.all |= 1 << i;
}
else
if (sens[i].temperature == sens[i].set_temp )
{
MB_DATA.Coils.relay_struct_on.all &= ~(1 << i);
MB_DATA.Coils.relay_struct_off.all &= ~(1 << i);
}
}

127
john103C6T6/Core/Src/rtc.c Normal file
View File

@@ -0,0 +1,127 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file rtc.c
* @brief This file provides code for the configuration
* of the RTC instances.
******************************************************************************
* @attention
*
* Copyright (c) 2025 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "rtc.h"
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
RTC_HandleTypeDef hrtc;
/* RTC init function */
void MX_RTC_Init(void)
{
/* USER CODE BEGIN RTC_Init 0 */
/* USER CODE END RTC_Init 0 */
RTC_TimeTypeDef sTime = {0};
RTC_DateTypeDef DateToUpdate = {0};
/* USER CODE BEGIN RTC_Init 1 */
/* USER CODE END RTC_Init 1 */
/** Initialize RTC Only
*/
hrtc.Instance = RTC;
hrtc.Init.AsynchPrediv = RTC_AUTO_1_SECOND;
hrtc.Init.OutPut = RTC_OUTPUTSOURCE_NONE;
if (HAL_RTC_Init(&hrtc) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN Check_RTC_BKUP */
/* USER CODE END Check_RTC_BKUP */
/** Initialize RTC and set the Time and Date
*/
sTime.Hours = 0x0;
sTime.Minutes = 0x0;
sTime.Seconds = 0x0;
if (HAL_RTC_SetTime(&hrtc, &sTime, RTC_FORMAT_BCD) != HAL_OK)
{
Error_Handler();
}
DateToUpdate.WeekDay = RTC_WEEKDAY_MONDAY;
DateToUpdate.Month = RTC_MONTH_JANUARY;
DateToUpdate.Date = 0x1;
DateToUpdate.Year = 0x0;
if (HAL_RTC_SetDate(&hrtc, &DateToUpdate, RTC_FORMAT_BCD) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN RTC_Init 2 */
/* USER CODE END RTC_Init 2 */
}
void HAL_RTC_MspInit(RTC_HandleTypeDef* rtcHandle)
{
if(rtcHandle->Instance==RTC)
{
/* USER CODE BEGIN RTC_MspInit 0 */
/* USER CODE END RTC_MspInit 0 */
HAL_PWR_EnableBkUpAccess();
/* Enable BKP CLK enable for backup registers */
__HAL_RCC_BKP_CLK_ENABLE();
/* RTC clock enable */
__HAL_RCC_RTC_ENABLE();
/* RTC interrupt Init */
HAL_NVIC_SetPriority(RTC_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(RTC_IRQn);
/* USER CODE BEGIN RTC_MspInit 1 */
/* USER CODE END RTC_MspInit 1 */
}
}
void HAL_RTC_MspDeInit(RTC_HandleTypeDef* rtcHandle)
{
if(rtcHandle->Instance==RTC)
{
/* USER CODE BEGIN RTC_MspDeInit 0 */
/* USER CODE END RTC_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_RTC_DISABLE();
/* RTC interrupt Deinit */
HAL_NVIC_DisableIRQ(RTC_IRQn);
/* USER CODE BEGIN RTC_MspDeInit 1 */
/* USER CODE END RTC_MspDeInit 1 */
}
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */

View File

@@ -60,12 +60,9 @@ extern RTC_HandleTypeDef hrtc;
extern TIM_HandleTypeDef htim1;
extern TIM_HandleTypeDef htim2;
extern UART_HandleTypeDef huart1;
extern UART_HandleTypeDef huart2;
extern TIM_HandleTypeDef htim3;
extern TIM_HandleTypeDef htim4;
/* USER CODE BEGIN EV */
extern RS_HandleTypeDef hmodbus_master;
/* USER CODE END EV */
@@ -311,21 +308,6 @@ static uint8_t first_in=1;
/* USER CODE END TIM3_IRQn 1 */
}
/**
* @brief This function handles TIM4 global interrupt.
*/
void TIM4_IRQHandler(void)
{
/* USER CODE BEGIN TIM4_IRQn 0 */
RS_TIM_Handler(&hmodbus_master);
return;
/* USER CODE END TIM4_IRQn 0 */
HAL_TIM_IRQHandler(&htim4);
/* USER CODE BEGIN TIM4_IRQn 1 */
/* USER CODE END TIM4_IRQn 1 */
}
/**
* @brief This function handles USART1 global interrupt.
*/
@@ -343,21 +325,6 @@ RS_UART_Handler(&hmodbus1);
/* USER CODE END USART1_IRQn 1 */
}
/**
* @brief This function handles USART2 global interrupt.
*/
void USART2_IRQHandler(void)
{
/* USER CODE BEGIN USART2_IRQn 0 */
RS_UART_Handler(&hmodbus_master);
return;
/* USER CODE END USART2_IRQn 0 */
HAL_UART_IRQHandler(&huart2);
/* USER CODE BEGIN USART2_IRQn 1 */
/* USER CODE END USART2_IRQn 1 */
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */

View File

@@ -26,7 +26,6 @@
TIM_HandleTypeDef htim1;
TIM_HandleTypeDef htim2;
TIM_HandleTypeDef htim4;
/* TIM1 init function */
void MX_TIM1_Init(void)
@@ -84,7 +83,7 @@ void MX_TIM2_Init(void)
/* USER CODE END TIM2_Init 1 */
htim2.Instance = TIM2;
htim2.Init.Prescaler = 7199;
htim2.Init.Prescaler = 72-1;
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = 65535;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
@@ -110,47 +109,6 @@ void MX_TIM2_Init(void)
}
/* TIM4 init function */
void MX_TIM4_Init(void)
{
/* USER CODE BEGIN TIM4_Init 0 */
/* USER CODE END TIM4_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
/* USER CODE BEGIN TIM4_Init 1 */
/* USER CODE END TIM4_Init 1 */
htim4.Instance = TIM4;
htim4.Init.Prescaler = 7199;
htim4.Init.CounterMode = TIM_COUNTERMODE_UP;
htim4.Init.Period = 65535;
htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim4.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim4) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim4, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim4, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM4_Init 2 */
/* USER CODE END TIM4_Init 2 */
}
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle)
{
@@ -190,21 +148,6 @@ void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle)
/* USER CODE END TIM2_MspInit 1 */
}
else if(tim_baseHandle->Instance==TIM4)
{
/* USER CODE BEGIN TIM4_MspInit 0 */
/* USER CODE END TIM4_MspInit 0 */
/* TIM4 clock enable */
__HAL_RCC_TIM4_CLK_ENABLE();
/* TIM4 interrupt Init */
HAL_NVIC_SetPriority(TIM4_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(TIM4_IRQn);
/* USER CODE BEGIN TIM4_MspInit 1 */
/* USER CODE END TIM4_MspInit 1 */
}
}
void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle)
@@ -241,20 +184,6 @@ void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle)
/* USER CODE END TIM2_MspDeInit 1 */
}
else if(tim_baseHandle->Instance==TIM4)
{
/* USER CODE BEGIN TIM4_MspDeInit 0 */
/* USER CODE END TIM4_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_TIM4_CLK_DISABLE();
/* TIM4 interrupt Deinit */
HAL_NVIC_DisableIRQ(TIM4_IRQn);
/* USER CODE BEGIN TIM4_MspDeInit 1 */
/* USER CODE END TIM4_MspDeInit 1 */
}
}
/* USER CODE BEGIN 1 */

View File

@@ -25,7 +25,6 @@
/* USER CODE END 0 */
UART_HandleTypeDef huart1;
UART_HandleTypeDef huart2;
/* USART1 init function */
@@ -57,36 +56,6 @@ void MX_USART1_UART_Init(void)
}
/* USART2 init function */
void MX_USART2_UART_Init(void)
{
/* USER CODE BEGIN USART2_Init 0 */
/* USER CODE END USART2_Init 0 */
/* USER CODE BEGIN USART2_Init 1 */
huart2.ReceptionType = HAL_UART_RECEPTION_TOIDLE;
/* USER CODE END USART2_Init 1 */
huart2.Instance = USART2;
huart2.Init.BaudRate = 115200;
huart2.Init.WordLength = UART_WORDLENGTH_8B;
huart2.Init.StopBits = UART_STOPBITS_1;
huart2.Init.Parity = UART_PARITY_NONE;
huart2.Init.Mode = UART_MODE_TX_RX;
huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart2.Init.OverSampling = UART_OVERSAMPLING_16;
if (HAL_UART_Init(&huart2) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN USART2_Init 2 */
/* USER CODE END USART2_Init 2 */
}
void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
{
@@ -123,36 +92,6 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle)
/* USER CODE END USART1_MspInit 1 */
}
else if(uartHandle->Instance==USART2)
{
/* USER CODE BEGIN USART2_MspInit 0 */
/* USER CODE END USART2_MspInit 0 */
/* USART2 clock enable */
__HAL_RCC_USART2_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
/**USART2 GPIO Configuration
PA2 ------> USART2_TX
PA3 ------> USART2_RX
*/
GPIO_InitStruct.Pin = GPIO_PIN_2;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_3;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* USART2 interrupt Init */
HAL_NVIC_SetPriority(USART2_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(USART2_IRQn);
/* USER CODE BEGIN USART2_MspInit 1 */
/* USER CODE END USART2_MspInit 1 */
}
}
void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
@@ -178,26 +117,6 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle)
/* USER CODE END USART1_MspDeInit 1 */
}
else if(uartHandle->Instance==USART2)
{
/* USER CODE BEGIN USART2_MspDeInit 0 */
/* USER CODE END USART2_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USART2_CLK_DISABLE();
/**USART2 GPIO Configuration
PA2 ------> USART2_TX
PA3 ------> USART2_RX
*/
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_2|GPIO_PIN_3);
/* USART2 interrupt Deinit */
HAL_NVIC_DisableIRQ(USART2_IRQn);
/* USER CODE BEGIN USART2_MspDeInit 1 */
/* USER CODE END USART2_MspDeInit 1 */
}
}
/* USER CODE BEGIN 1 */

Some files were not shown because too many files have changed in this diff Show More