mirror of
https://github.com/polhenarejos/pico-keys-sdk.git
synced 2026-08-21 20:17:28 +01:00
Fix serial in CI builds.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
+4
-4
@@ -28,7 +28,7 @@
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) && !(defined(ENABLE_EMULATION) && defined(__FOR_CI))
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <IOKit/IOKitLib.h>
|
||||
|
||||
@@ -57,7 +57,7 @@ static int get_macos_serial(uint8_t *out) {
|
||||
}
|
||||
return ok ? 0 : -4;
|
||||
}
|
||||
#elif defined(_MSC_VER)
|
||||
#elif defined(_MSC_VER) && !(defined(ENABLE_EMULATION) && defined(__FOR_CI))
|
||||
#include <windows.h>
|
||||
#include <wbemidl.h>
|
||||
|
||||
@@ -230,9 +230,9 @@ static int serial_id_is_zero(const uint8_t *id, size_t len) {
|
||||
|
||||
#if defined(ESP_PLATFORM)
|
||||
#define pico_get_unique_board_id(a) do { uint32_t value; esp_efuse_read_block(EFUSE_BLK1, &value, 0, 32); memcpy((uint8_t *)(a), &value, sizeof(uint32_t)); esp_efuse_read_block(EFUSE_BLK1, &value, 32, 32); memcpy((uint8_t *)(a)+4, &value, sizeof(uint32_t)); } while(0)
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) && !(defined(ENABLE_EMULATION) && defined(__FOR_CI))
|
||||
#define pico_get_unique_board_id(a) get_macos_serial((uint8_t *)(a))
|
||||
#elif defined(_MSC_VER)
|
||||
#elif defined(_MSC_VER) && !(defined(ENABLE_EMULATION) && defined(__FOR_CI))
|
||||
#define pico_get_unique_board_id(a) get_system_uuid((char *)(a))
|
||||
#elif defined(__linux__) && !(defined(ENABLE_EMULATION) && defined(__FOR_CI))
|
||||
#define pico_get_unique_board_id(a) get_linux_hardware_id((char *)(a))
|
||||
|
||||
Reference in New Issue
Block a user