Files
squeezelite-esp32/components/spotify/cspot/bell/include/BellUtils.h
2022-01-06 18:46:57 -08:00

28 lines
447 B
C++

#ifndef EUPHONIUM_BELL_UTILS
#define EUPHONIUM_BELL_UTILS
#include <random>
#include <string.h>
#include <vector>
namespace bell {
std::string generateRandomUUID();
} // namespace bell
#ifdef ESP_PLATFORM
#include <freertos/FreeRTOS.h>
#define BELL_SLEEP_MS(ms) vTaskDelay(ms / portTICK_PERIOD_MS)
#define BELL_YIELD() taskYIELD()
#else
#include <unistd.h>
#define BELL_SLEEP_MS(ms) usleep(ms * 1000)
#define BELL_YIELD() ;
#endif
#endif