From fc5f4299cc5754fae53e84461be2a7f6e5c18820 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Wed, 17 Apr 2024 11:56:54 +0200 Subject: [PATCH] Fix emulation build. Signed-off-by: Pol Henarejos --- src/fs/file.c | 2 ++ src/usb/usb.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/fs/file.c b/src/fs/file.c index b3cdc41..6e21340 100644 --- a/src/fs/file.c +++ b/src/fs/file.c @@ -149,9 +149,11 @@ file_t *search_by_name(uint8_t *name, uint16_t namelen) { } file_t *search_by_fid(const uint16_t fid, const file_t *parent, const uint8_t sp) { +#ifndef ENABLE_EMULATION if (fid == EF_PHY) { return ef_phy; } +#endif for (file_t *p = file_entries; p != file_last; p++) { if (p->fid != 0x0000 && p->fid == fid) { if (!parent || (parent && is_parent(p, parent))) { diff --git a/src/usb/usb.c b/src/usb/usb.c index 00fbe0e..fe860ba 100644 --- a/src/usb/usb.c +++ b/src/usb/usb.c @@ -30,6 +30,10 @@ #include "tusb.h" #endif +#ifndef ENABLE_EMULATION +#include "tusb.h" +#endif + // For memcpy #include #include