include tusb.h for tuh_task()

This commit is contained in:
graham sanderson 2022-04-04 12:45:05 -05:00
parent c77136a248
commit 0245d5e43a
3 changed files with 8 additions and 2 deletions

View file

@ -14,7 +14,7 @@ set(CMAKE_CXX_STANDARD 14)
if (PICO_SDK_PATH)
# we are using git@github.com:liamfraser/tinyusb.git as it has some RP2040 fixes that aren't upstreamed yet
set(PICO_TINYUSB_PATH ${CMAKE_CURRENT_LIST_DIR}/3rdparty/tinyusb)
#set(PICO_TINYUSB_PATH ${CMAKE_CURRENT_LIST_DIR}/3rdparty/tinyusb)
# this only affects device builds device, but we want to use zone for malloc in this case so we don't have two separate elastic spaces and can fit more in
set(SKIP_PICO_MALLOC 1)
pico_sdk_init()
@ -53,6 +53,7 @@ endif()
# Note PICO_SDK path is set by the SDK initialization if it occurs above
if (NOT PICO_SDK)
message("Wibble")
find_package(SDL2 2.0.1 REQUIRED)
find_package(SDL2_mixer 2.0.0 REQUIRED)
find_package(SDL2_net 2.0.0 REQUIRED)

View file

@ -81,6 +81,9 @@
#include "d_main.h"
#if PICO_BUILD
#include "i_picosound.h"
#if USB_SUPPORT
#include "tusb.h"
#endif
#endif
//
// D-DoomLoop()

View file

@ -23,6 +23,9 @@
#include "doomtype.h"
#include "doom/p_saveg.h"
#endif
#if USB_SUPPORT
#include "tusb.h"
#endif
extern void I_InputInit();
#include <stdlib.h>
@ -475,7 +478,6 @@ void __attribute((noreturn)) I_Quit (void)
// no idea why the default timeout of 50 ms is NOT working here, hack hack hack away!
I_GetEventTimeout(1000);
#if USB_SUPPORT
extern void tuh_task();
tuh_task();
#endif
#endif