Fix emulation build.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2024-04-17 11:56:54 +02:00
parent ade730ffb5
commit fc5f4299cc
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3
2 changed files with 6 additions and 0 deletions

View file

@ -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))) {

View file

@ -30,6 +30,10 @@
#include "tusb.h"
#endif
#ifndef ENABLE_EMULATION
#include "tusb.h"
#endif
// For memcpy
#include <string.h>
#include <stdlib.h>