From c6a1e7c00cd2946cef7716b205026a907136778b Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Sun, 12 Jul 2026 18:41:28 +0800
Subject: [PATCH] Add ex1.servo-sg90

---
 ex1.servo-sg90/Board/buzzer.h |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/ex1.servo-sg90/Board/buzzer.h b/ex1.servo-sg90/Board/buzzer.h
new file mode 100644
index 0000000..549c1a0
--- /dev/null
+++ b/ex1.servo-sg90/Board/buzzer.h
@@ -0,0 +1,37 @@
+/**********************************************************************
+*   Copyright: (C)2024 LingYun IoT System Studio
+*      Author: GuoWenxue<guowenxue@gmail.com>
+* Description: ISKBoard buzzer/beeper driver and music play
+*
+*   ChangeLog:
+*        Version    Date       Author            Description
+*        V1.0.0  2024.08.29    GuoWenxue      Release initial version
+***********************************************************************/
+
+#ifndef __BUZZER_H
+#define __BUZZER_H
+
+typedef struct
+{
+    uint32_t freq;      /* 音符频率,0表示休止 */
+    uint32_t duration;  /* 持续时间(ms) */
+} Note_t;
+
+/**
+ * @brief  让蜂鸣器响 $times 次,每次间隔 $interval 毫秒
+ */
+extern void beep_start(uint16_t times, uint16_t interval);
+
+/**
+ * @brief  播放歌曲
+ */
+extern void Play_Song(const Note_t *song, uint32_t note_count);
+
+extern const Note_t twinkle[];
+extern const uint32_t twinkle_count;
+extern const Note_t happy_birthday[];
+extern const uint32_t happy_birthday_count;
+extern const Note_t jingle_bells[];
+extern const uint32_t jingle_bells_count;
+
+#endif

--
Gitblit v1.10.0