12345678910111213141516171819202122 |
- /**
- * @Author: 李建
- * @Date: 2025/4/22 10:24
- * Description: 蜂鸣器模块
- * Copyright: Copyright (©) 2025 永续绿建. All rights reserved.
- */
- #ifndef WIRE_CONTROLLER_BEEP_H
- #define WIRE_CONTROLLER_BEEP_H
- #define LEDC_TIMER LEDC_TIMER_0
- #define LEDC_MODE LEDC_LOW_SPEED_MODE
- #define LEDC_OUTPUT_IO (42) // Define the output GPIO
- #define LEDC_CHANNEL LEDC_CHANNEL_0
- #define LEDC_DUTY_RES LEDC_TIMER_12_BIT // Set duty resolution to 10 bits
- #define LEDC_DUTY (50) // Set duty to 50%.
- #define LEDC_FREQUENCY (2900) // Frequency in Hertz. Set frequency at 4 kHz
- void beep_init(void);
- void beep();
- void beep_stop();
- #endif //WIRE_CONTROLLER_BEEP_H
|