STM32超声波测距代码-HC-SR04.zip


这是基于STM32的超声波传感器测距小项目的硬件部分代码,采用UART传输,通过蓝牙传输至手机,在手机上使用app可获取数据。该项目的原理与介绍在博客https://blog.csdn.net/qq_36999901/article/details/87554277有详细介绍。 此处上传代码方便查看。
资源截图
代码片段和文件信息
/**
  ******************************************************************************
  * @file    system_stm32f4xx.c
  * @author  MCD Application Team
  * @version V2.6.1
  * @date    14-February-2017
  * @brief   CMSIS Cortex-M4 Device Peripheral Access layer System Source File.
  *
  *   This file provides two functions and one global variable to be called from 
  *   user application:
  *      - SystemInit(): This function is called at startup just after reset and 
  *                      before branch to main program. This call is made inside
  *                      the “startup_stm32f4xx.s“ file.
  *
  *      - SystemCoreClock variable: Contains the core clock (HCLK) it can be used
  *                                  by the user application to setup the SysTick 
  *                                  timer or configure other parameters.
  *                                     
  *      - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
  *                                 be called whenever the core clock is changed
  *                                 during program execution.
  *
  *
  ******************************************************************************
  * @attention
  *
  * 

© COPYRIGHT 2017 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.
  *
  ******************************************************************************
  */

/** @addtogroup CMSIS
  * @{
  */

/** @addtogroup stm32f4xx_system

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-11-12 02:44  STM32-HC-SR04-master
     文件        3719  2019-11-12 02:44  STM32-HC-SR04-master.mxproject
     目录           0  2019-11-12 02:44  STM32-HC-SR04-masterDrivers
     目录           0  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSIS
     目录           0  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_Lib
     目录           0  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSource
     目录           0  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctions
     文件        4949  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_abs_f32.c
     文件        5279  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_abs_q15.c
     文件        4301  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_abs_q31.c
     文件        4933  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_abs_q7.c
     文件        4741  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_add_f32.c
     文件        4283  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_add_q15.c
     文件        4405  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_add_q31.c
     文件        4092  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_add_q7.c
     文件        4478  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_dot_prod_f32.c
     文件        4772  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_dot_prod_q15.c
     文件        4857  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_dot_prod_q31.c
     文件        5249  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_dot_prod_q7.c
     文件        5408  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_mult_f32.c
     文件        5152  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_mult_q15.c
     文件        5041  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_mult_q31.c
     文件        4403  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_mult_q7.c
     文件        4428  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_negate_f32.c
     文件        4479  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_negate_q15.c
     文件        4049  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_negate_q31.c
     文件        3979  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_negate_q7.c
     文件        4930  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_offset_f32.c
     文件        4398  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_offset_q15.c
     文件        4285  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_offset_q31.c
     文件        4327  2019-11-12 02:44  STM32-HC-SR04-masterDriversCMSISDSP_LibSourceBasicMathFunctionsarm_offset_q7.c
............此处省略737个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)