Skip to content

Commit 31e5758

Browse files
committed
YAGNI - noTone() never implemented in v1 or called, remove from API
1 parent edadb31 commit 31e5758

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

src/components/pwm/hardware.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -137,26 +137,6 @@ uint32_t PWMHardware::WriteTone(uint32_t freq) {
137137
return rc;
138138
}
139139

140-
/**************************************************************************/
141-
/*!
142-
@brief Stops a "tone" output on a PWM pin from WriteTone(). Must be
143-
called to stop the tone before detaching the pin.
144-
@return true if the tone was successfully stopped, false otherwise
145-
*/
146-
/**************************************************************************/
147-
void PWMHardware::WriteNoTone() {
148-
if (! _is_attached) {
149-
WS_DEBUG_PRINTLN("[pwm] Pin not attached!");
150-
return; // back out
151-
}
152-
153-
#ifdef ARDUINO_ARCH_ESP32
154-
ledcWriteTone(_pin, 0);
155-
#else
156-
noTone(_pin);
157-
#endif
158-
}
159-
160140
/**************************************************************************/
161141
/*!
162142
@brief Returns the pin number of the PWM pin

src/components/pwm/hardware.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class PWMHardware {
3333
bool DetachPin();
3434
bool WriteDutyCycle(uint32_t duty);
3535
uint32_t WriteTone(uint32_t freq);
36-
void WriteNoTone();
3736
uint8_t GetPin();
3837

3938
// Abstractions for LEDC API

0 commit comments

Comments
 (0)