/**
******************************************************************************
* @file : main.c
* @brief : Main program body
******************************************************************************
** This notice applies to any and all portions of this file
* that are not between comment pairs USER CODE BEGIN and
* USER CODE END. Other portions of this file, whether
* inserted by the user or by software development tools
* are owned by their respective copyright owners.
*
* COPYRIGHT(c) 2018 STMicroelectronics
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "stm32f1xx_hal.h"
/* USER CODE BEGIN Includes */
#include "stmflash.h"
#include "STM32_LCD1602.h"
#include "DS18B20.h"
/**
* @brief This function is executed in case of error occurrence.
* @param file: The file name as string.
* @param line: The line in file as a number.
* @retval None
*/
void _Error_Handler(char *file, int line)
{
/* USER CODE BEGIN Error_Handler_Debug */
/* User can add his own implementation to report the HAL error return state */
while(1)
{
}
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t* file, uint32_t line)
{
/* USER CODE BEGIN 6 */
/* User can add his own implementation to report the file name and line number,
tex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Rebuild target 'STM32'
assembling startup_stm32f103xb.s...
compiling main.c...
..\HARDWARE\LCD1602\STM32_LCD1602.h(80): warning: #1295-D: Deprecated declaration LCD1602_cls - give arg types
void LCD1602_cls(); //初始化液晶
../Src/main.c(333): warning: #177-D: variable "i" was declared but never referenced
uint8_t i, DS18B20ID[8];
../Src/main.c(333): warning: #177-D: variable "DS18B20ID" was declared but never referenced
uint8_t i, DS18B20ID[8];
../Src/main.c: 3 warnings, 0 errors
compiling stm32f1xx_it.c...
compiling stm32f1xx_hal_msp.c...
compiling stm32f1xx_hal_gpio_ex.c...
compiling stm32f1xx_hal_tim.c...
compiling stm32f1xx_hal_tim_ex.c...
compiling stm32f1xx_hal.c...
compiling stm32f1xx_hal_rcc.c...
compiling stm32f1xx_hal_rcc_ex.c...
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c(132): error: #268: declaration may not appear after executable statement in block
FlagStatus pwrclkchanged = RESET;
../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c: 0 warnings, 1 error
compiling stm32f1xx_hal_gpio.c...
compiling stm32f1xx_hal_dma.c...
compiling stm32f1xx_hal_cortex.c...
compiling stm32f1xx_hal_pwr.c...
compiling stm32f1xx_hal_flash.c...
compiling stm32f1xx_hal_flash_ex.c...
compiling system_stm32f1xx.c...
compiling STM32_LCD1602.c...
..\HARDWARE\LCD1602\STM32_LCD1602.h(80): warning: #1295-D: Deprecated declaration LCD1602_cls - give arg types
void LCD1602_cls(); //初始化液晶
..\HARDWARE\LCD1602\STM32_LCD1602.c: 1 warning, 0 errors
compiling stmflash.c...
..\HARDWARE\STMFLASH\stmflash.c(26): error: #268: declaration may not appear after executable statement in block
FLASH_EraseInitTypeDef f;
..\HARDWARE\STMFLASH\stmflash.c(31): error: #268: declaration may not appear after executable statement in block
uint32_t PageError = 0;
..\HARDWARE\STMFLASH\stmflash.c: 0 warnings, 2 errors
compiling DS18B20.c...
"STM32\STM32.axf" - 3 Error(s), 4 Warning(s).
Target not created