Zoltan Hudak
/
Internal_Temperature_F103RB
Reading temperature sensor built into STM32F103RB chips
Embed:
(wiki syntax)
Show/hide line numbers
stm32f1xx_hal_msp.c
00001 /**tttttttttt 00002 ****************************************************************************** 00003 * File Name : stm32f1xx_hal_msp.c 00004 * Description : This file provides code for the MSP Initialization 00005 * and de-Initialization codes. 00006 ****************************************************************************** 00007 * 00008 * COPYRIGHT(c) 2016 STMicroelectronics 00009 * 00010 * Redistribution and use in source and binary forms, with or without modification, 00011 * are permitted provided that the following conditions are met: 00012 * 1. Redistributions of source code must retain the above copyright notice, 00013 * this list of conditions and the following disclaimer. 00014 * 2. Redistributions in binary form must reproduce the above copyright notice, 00015 * this list of conditions and the following disclaimer in the documentation 00016 * and/or other materials provided with the distribution. 00017 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00018 * may be used to endorse or promote products derived from this software 00019 * without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00022 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00023 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00024 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00025 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00026 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00027 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00028 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00029 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00030 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 * 00032 ****************************************************************************** 00033 */ 00034 /* Includes ------------------------------------------------------------------*/ 00035 #include "stm32f1xx_hal.h" 00036 00037 /* USER CODE BEGIN 0 */ 00038 00039 /* USER CODE END 0 */ 00040 00041 /** 00042 * Initializes the Global MSP. 00043 */ 00044 void HAL_MspInit(void) 00045 { 00046 /* USER CODE BEGIN MspInit 0 */ 00047 00048 /* USER CODE END MspInit 0 */ 00049 00050 __HAL_RCC_AFIO_CLK_ENABLE(); 00051 00052 HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4); 00053 00054 /* System interrupt init*/ 00055 /* SysTick_IRQn interrupt configuration */ 00056 HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0); 00057 00058 /* USER CODE BEGIN MspInit 1 */ 00059 00060 /* USER CODE END MspInit 1 */ 00061 } 00062 00063 void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc) 00064 { 00065 00066 if(hadc->Instance==ADC1) 00067 { 00068 /* USER CODE BEGIN ADC1_MspInit 0 */ 00069 00070 /* USER CODE END ADC1_MspInit 0 */ 00071 /* Peripheral clock enable */ 00072 __HAL_RCC_ADC1_CLK_ENABLE(); 00073 /* USER CODE BEGIN ADC1_MspInit 1 */ 00074 00075 /* USER CODE END ADC1_MspInit 1 */ 00076 } 00077 00078 } 00079 00080 void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc) 00081 { 00082 00083 if(hadc->Instance==ADC1) 00084 { 00085 /* USER CODE BEGIN ADC1_MspDeInit 0 */ 00086 00087 /* USER CODE END ADC1_MspDeInit 0 */ 00088 /* Peripheral clock disable */ 00089 __HAL_RCC_ADC1_CLK_DISABLE(); 00090 } 00091 /* USER CODE BEGIN ADC1_MspDeInit 1 */ 00092 00093 /* USER CODE END ADC1_MspDeInit 1 */ 00094 00095 } 00096 00097 /* USER CODE BEGIN 1 */ 00098 00099 /* USER CODE END 1 */ 00100 00101 /** 00102 * @} 00103 */ 00104 00105 /** 00106 * @} 00107 */ 00108 00109 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Fri Jul 15 2022 10:36:34 by 1.7.2