kbf.cpp 294 B

123456789101112
  1. #include "kbf.h"
  2. #include <freertos/FreeRTOS.h>
  3. #include <freertos/task.h>
  4. #include <esp_log.h>
  5. static constexpr const char *TAG = "kbf";
  6. void kbf::sleep(uint32_t milliseconds) {
  7. ESP_LOGD(TAG, "sleeping task for %d ms", milliseconds);
  8. vTaskDelay(milliseconds / portTICK_PERIOD_MS);
  9. }