From 889634f3984518061750406d342d7834012bb5a6 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 7 Aug 2024 12:16:52 +0200 Subject: [PATCH] chipset/bcm: provide sleep for Visual Studio --- chipset/bcm/btstack_chipset_bcm_download_firmware.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/chipset/bcm/btstack_chipset_bcm_download_firmware.c b/chipset/bcm/btstack_chipset_bcm_download_firmware.c index 1ab78fd15..88fcc338a 100644 --- a/chipset/bcm/btstack_chipset_bcm_download_firmware.c +++ b/chipset/bcm/btstack_chipset_bcm_download_firmware.c @@ -43,7 +43,17 @@ #include #include + +#ifdef _MSC_VER +// map sleep() to Sleep() +#include "Windows.h" +unsigned int sleep(unsigned int seconds){ + _Sleep(seconds * 1000); + return 0; +} +#else #include +#endif #include "hci_dump.h" #include "btstack_chipset_bcm.h"