mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 20:47:08 +03:00
big merge
This commit is contained in:
27
components/spotify/cspot/bell/include/BellUtils.h
Normal file
27
components/spotify/cspot/bell/include/BellUtils.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#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() vTaskYield()
|
||||
|
||||
#else
|
||||
#include <unistd.h>
|
||||
|
||||
#define BELL_SLEEP_MS(ms) usleep(ms * 1000)
|
||||
#define BELL_YIELD() ()
|
||||
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user