| 182 | } |
| 183 | |
| 184 | void AsyncLogger::disableBackgroundFlush() { |
| 185 | detail::BackgroundFlushState& state = Singleton<detail::BackgroundFlushState>::instance(); |
| 186 | |
| 187 | if (state.mEnabled && state.mTimerHandle.is_valid()) { |
| 188 | fl::isr::detach_handler(state.mTimerHandle); |
| 189 | state.mTimerHandle = fl::isr::handle(); // Reset to default (invalid) handle |
| 190 | state.mEnabled = false; |
| 191 | state.mNeedsFlush = false; |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | bool AsyncLogger::isBackgroundFlushEnabled() const { |
| 196 | return Singleton<detail::BackgroundFlushState>::instance().mEnabled; |
no test coverage detected