• 大小: 5.65MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-11
  • 语言: 其他
  • 标签: 超声波  源码  STM32  

资源简介

1、适用于STM32RCT6最小系统板,HC-SR04超声波测距模块(工作电压5V,静态工作电流<5mA) 2、量程2cm--700cm,感应角度<30°(R8=4.7K);R8=3.9K/4.3K时:量程2cm--450cm,感应角度<15° 3、精度3mm,盲区2cm

资源截图

代码片段和文件信息

/**************************************************************************//**
 * @file     core_cm3.c
 * @brief    CMSIS Cortex-M3 Core Peripheral Access layer Source File
 * @version  V1.30
 * @date     30. October 2009
 *
 * @note
 * Copyright (C) 2009 ARM Limited. All rights reserved.
 *
 * @par
 * ARM Limited (ARM) is supplying this software for use with Cortex-M 
 * processor based microcontrollers.  This file can be freely distributed 
 * within development tools that are supporting such ARM based processors. 
 *
 * @par
 * THIS SOFTWARE IS PROVIDED “AS IS“.  NO WARRANTIES WHETHER EXPRESS IMPLIED
 * OR STATUTORY INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
 * ARM SHALL NOT IN ANY CIRCUMSTANCES BE LIABLE FOR SPECIAL INCIDENTAL OR
 * CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER.
 *
 ******************************************************************************/

#include 

/* define compiler specific symbols */
#if defined ( __CC_ARM   )
  #define __ASM            __asm                                      /*!< asm keyword for ARM Compiler          */
  #define __INLINE         __inline                                   /*!< inline keyword for ARM Compiler       */

#elif defined ( __ICCARM__ )
  #define __ASM           __asm                                       /*!< asm keyword for IAR Compiler          */
  #define __INLINE        inline                                      /*!< inline keyword for IAR Compiler. Only avaiable in High optimization mode! */

#elif defined   (  __GNUC__  )
  #define __ASM            __asm                                      /*!< asm keyword for GNU Compiler          */
  #define __INLINE         inline                                     /*!< inline keyword for GNU Compiler       */

#elif defined   (  __TASKING__  )
  #define __ASM            __asm                                      /*!< asm keyword for TASKING Compiler      */
  #define __INLINE         inline                                     /*!< inline keyword for TASKING Compiler   */

#endif


/* ###################  Compiler specific Intrinsics  ########################### */

#if defined ( __CC_ARM   ) /*------------------RealView Compiler -----------------*/
/* ARM armcc specific functions */

/**
 * @brief  Return the Process Stack Pointer
 *
 * @return ProcessStackPointer
 *
 * Return the actual process stack pointer
 */
__ASM uint32_t __get_PSP(void)
{
  mrs r0 psp
  bx lr
}

/**
 * @brief  Set the Process Stack Pointer
 *
 * @param  topOfProcStack  Process Stack Pointer
 *
 * Assign the value ProcessStackPointer to the MSP 
 * (process stack pointer) Cortex processor register
 */
__ASM void __set_PSP(uint32_t topOfProcStack)
{
  msr psp r0
  bx lr
}

/**
 * @brief  Return the Main Stack Pointer
 *
 * @return Main Stack Pointer
 *
 * Return the curren

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      17273  2010-06-07 10:25  18、Ultrasonic\CORE\core_cm3.c

     文件      85714  2011-02-09 14:59  18、Ultrasonic\CORE\core_cm3.h

     文件      15503  2011-03-10 10:52  18、Ultrasonic\CORE\startup_stm32f10x_hd.s

     文件       1599  2018-12-21 10:42  18、Ultrasonic\HARDWARE\delay.c

     文件        175  2015-09-28 15:18  18、Ultrasonic\HARDWARE\delay.h

     文件       1338  2018-11-23 11:17  18、Ultrasonic\HARDWARE\led.c

     文件        609  2018-12-20 11:57  18、Ultrasonic\HARDWARE\led.h

     文件       1102  2018-12-21 09:58  18、Ultrasonic\HARDWARE\SysTick.c

     文件        416  2018-12-20 15:58  18、Ultrasonic\HARDWARE\SysTick.h

     文件       1401  2018-12-21 11:04  18、Ultrasonic\HARDWARE\timer3.c

     文件        317  2018-07-27 11:38  18、Ultrasonic\HARDWARE\timer3.h

     文件       1788  2018-12-24 14:14  18、Ultrasonic\HARDWARE\ultrasonic.c

     文件        716  2018-12-21 09:58  18、Ultrasonic\HARDWARE\ultrasonic.h

     文件       3730  2019-01-17 10:31  18、Ultrasonic\HARDWARE\usart1.c

     文件        391  2019-01-17 10:31  18、Ultrasonic\HARDWARE\usart1.h

     文件       1705  2017-09-26 14:33  18、Ultrasonic\HARDWARE\watchdog.c

     文件        272  2016-09-02 15:11  18、Ultrasonic\HARDWARE\watchdog.h

     文件     109902  2018-12-26 11:22  18、Ultrasonic\JlinkLog.txt

     文件        573  2016-07-28 16:34  18、Ultrasonic\JlinkSettings.ini

     文件     348827  2018-03-21 14:22  18、Ultrasonic\OBJ\adc1.crf

     文件       1571  2018-03-21 14:22  18、Ultrasonic\OBJ\adc1.d

     文件     381548  2018-03-21 14:22  18、Ultrasonic\OBJ\adc1.o

     文件       3662  2019-01-21 11:06  18、Ultrasonic\OBJ\core_cm3.crf

     文件        112  2019-01-21 11:06  18、Ultrasonic\OBJ\core_cm3.d

     文件      10784  2019-01-21 11:06  18、Ultrasonic\OBJ\core_cm3.o

     文件     348481  2019-01-21 11:06  18、Ultrasonic\OBJ\delay.crf

     文件       1572  2019-01-21 11:06  18、Ultrasonic\OBJ\delay.d

     文件     381008  2019-01-21 11:06  18、Ultrasonic\OBJ\delay.o

     文件     353728  2018-12-20 09:53  18、Ultrasonic\OBJ\dht11.crf

     文件       1712  2018-12-20 09:53  18、Ultrasonic\OBJ\dht11.d

............此处省略193个文件信息

评论

共有 条评论