Emulation is now a higher define which also accepts interfaces.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-02-23 07:57:35 +01:00
parent e5e5af634c
commit 16b4fa6ca3
6 changed files with 176 additions and 101 deletions

View File

@@ -29,9 +29,6 @@ endif()
if (NOT DEFINED ENABLE_EMULATION)
set(ENABLE_EMULATION 0)
endif()
if (NOT DEFINED ENABLE_EMULATION)
set(ENABLE_EMULATION 0)
endif()
option(ENABLE_DELAYED_BOOT "Enable/disable delayed boot" OFF)
if(ENABLE_DELAYED_BOOT)
@@ -40,17 +37,14 @@ if(ENABLE_DELAYED_BOOT)
else()
message(STATUS "Delayed boot:\t\t disabled")
endif(ENABLE_DELAYED_BOOT)
if(ENABLE_EMULATION)
else()
if(USB_ITF_HID)
add_definitions(-DUSB_ITF_HID=1)
message(STATUS "USB HID Interface:\t\t enabled")
endif(USB_ITF_HID)
if(USB_ITF_CCID)
add_definitions(-DUSB_ITF_CCID=1)
message(STATUS "USB CCID Interface:\t\t enabled")
endif(USB_ITF_CCID)
endif()
if(USB_ITF_HID)
add_definitions(-DUSB_ITF_HID=1)
message(STATUS "USB HID Interface:\t\t enabled")
endif(USB_ITF_HID)
if(USB_ITF_CCID)
add_definitions(-DUSB_ITF_CCID=1)
message(STATUS "USB CCID Interface:\t\t enabled")
endif(USB_ITF_CCID)
add_definitions(-DDEBUG_APDU=${DEBUG_APDU})
add_definitions(-DMBEDTLS_CONFIG_FILE="${CMAKE_CURRENT_LIST_DIR}/config/mbedtls_config.h")