add a .clang-format file (#9154)

This commit is contained in:
Jorropo
2026-01-03 14:19:24 -06:00
committed by GitHub
parent abab6ce815
commit 0d11331d18
771 changed files with 77733 additions and 83165 deletions
+9 -17
View File
@@ -1,8 +1,7 @@
#include "concurrency/InterruptableDelay.h"
#include "configuration.h"
namespace concurrency
{
namespace concurrency {
InterruptableDelay::InterruptableDelay() {}
@@ -11,25 +10,18 @@ InterruptableDelay::~InterruptableDelay() {}
/**
* Returns false if we were interrupted
*/
bool InterruptableDelay::delay(uint32_t msec)
{
// LOG_DEBUG("delay %u ", msec);
bool InterruptableDelay::delay(uint32_t msec) {
// LOG_DEBUG("delay %u ", msec);
// sem take will return false if we timed out (i.e. were not interrupted)
bool r = semaphore.take(msec);
// sem take will return false if we timed out (i.e. were not interrupted)
bool r = semaphore.take(msec);
// LOG_DEBUG("interrupt=%d", r);
return !r;
// LOG_DEBUG("interrupt=%d", r);
return !r;
}
void InterruptableDelay::interrupt()
{
semaphore.give();
}
void InterruptableDelay::interrupt() { semaphore.give(); }
IRAM_ATTR void InterruptableDelay::interruptFromISR(BaseType_t *pxHigherPriorityTaskWoken)
{
semaphore.giveFromISR(pxHigherPriorityTaskWoken);
}
IRAM_ATTR void InterruptableDelay::interruptFromISR(BaseType_t *pxHigherPriorityTaskWoken) { semaphore.giveFromISR(pxHigherPriorityTaskWoken); }
} // namespace concurrency