资源简介
使用STM32控制无源蜂鸣器发声播放音乐(红海情歌+生日快乐),如果要改成别的歌曲,改时间和音调就可以了。参考文章:https://blog.csdn.net/qq_28056277/article/details/85019960
【更新-->更改为固定分值了】
代码片段和文件信息
/**************************************************************************//**
* @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
- 上一篇:基于51单片机的智能小车循迹寻迹避障的源代码
- 下一篇:weka源代码分析
相关资源
- 基于51单片机音乐彩灯
- stm32 4x4简易密码锁
- 基于单片机蜂鸣器唱歌祝你生日快乐
- WS2812 5050RGB灯 stm32f103控制
- STM32的无线图像采集传输系统的软件设
- 利用定时器和蜂鸣器唱歌
- 基于STM32的锂电池组并行充电系统的设
- STM32的录音机程序,亲测可用
- 51单片机Protues,仿真PT100温度传感器,
- stm32同步规则转换DMA传输
- 基于stm32利用GPRS发送彩信
- STM32 智能充电器原理图
- STM32全部系列芯片protel99se的库sch
- HMC5883L-STM32驱动程序
- 野火STM32开发板串口1接收-串口2转发
- STM32模拟I2C驱动PN532
- STM32f103 ADC采集电压数据 显示在LCD液晶
- STM32下MCP2515驱动
- STM32 F103R6 GPIO 闪烁源代码Keil及protue
- STM32 唯一序列号用于程序
- STM32 SDIO FATFS
- 5 UARTRecIT.zip
- stm32控制esp8266访问web
- 超完整的STM32的STM32 SD卡 TATFS文件格式
- STM32F103 LORA配置
- STM32 PWM输出不同相位差和占空比
- STM32 同一定时器不同通道产生不同频
- 铭正同创液晶STM32 240128 源码
- STM32F4 串口DMA发送接收方式代码例程
- stm32 SDIO操作库
评论
共有 条评论