Skip to content

Commit ac90633

Browse files
committed
more clean up
1 parent 1f2b65b commit ac90633

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

cores/nRF5/Tone.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,9 @@ bool TonePwmConfig::startPlayback(void) {
370370

371371
bool TonePwmConfig::stopPlayback(bool releaseOwnership) {
372372

373-
bool notInIsr = !isInISR();
374-
375373
if (!_HwPWM->isOwner(TonePwmConfig::toneToken)) {
376-
if (notInIsr) {
377-
LOG_LV2("TON", "Attempt to set noTone when not the owner of the PWM peripheral. Ignoring call....");
378-
}
379-
return false;
374+
LOG_LV2("TON", "Attempt to set noTone when not the owner of the PWM peripheral. Ignoring call....");
375+
return false;
380376
}
381377
// ensure stopped and then disable
382378
if (_is_pwm_enabled(_PWMInstance)) {
@@ -388,5 +384,6 @@ bool TonePwmConfig::stopPlayback(bool releaseOwnership) {
388384
if (releaseOwnership) {
389385
_HwPWM->releaseOwnership(TonePwmConfig::toneToken);
390386
}
387+
391388
return true;
392389
}

0 commit comments

Comments
 (0)