Skip to content

Commit 7df0420

Browse files
lovyan03zhouyangyale
authored andcommitted
Modify: Suppress the mosquito noise that LCD backlight PWM emits. (#147)
Revert: "reduce noise" commit 59340bc.
1 parent ad85092 commit 7df0420

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/M5Display.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void M5Display::begin() {
1010
fillScreen(0);
1111

1212
// Init the back-light LED PWM
13-
ledcSetup(BLK_PWM_CHANNEL, 10000, 8);
13+
ledcSetup(BLK_PWM_CHANNEL, 44100, 8);
1414
ledcAttachPin(TFT_BL, BLK_PWM_CHANNEL);
1515
ledcWrite(BLK_PWM_CHANNEL, 80);
1616
}

src/M5Stack.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ void M5Stack::begin(bool LCDEnable, bool SDEnable, bool SerialEnable, bool I2CEn
2525
// LCD INIT
2626
if (LCDEnable == true) {
2727
Lcd.begin();
28-
dacWrite(SPEAKER_PIN, 0);
2928
}
3029

3130
// TF Card
@@ -34,7 +33,7 @@ void M5Stack::begin(bool LCDEnable, bool SDEnable, bool SerialEnable, bool I2CEn
3433
}
3534

3635
// TONE
37-
//Speaker.begin();
36+
// Speaker.begin();
3837

3938
// Set wakeup button
4039
Power.setWakeupButton(BUTTON_A_PIN);

0 commit comments

Comments
 (0)