allow no mode compilation (no host/device enabled). Handy for project without usb to compile such as nrf52832

This commit is contained in:
hathach
2018-08-30 16:12:34 +07:00
parent e623fc656d
commit dce2296756
3 changed files with 15 additions and 31 deletions

View File

@@ -36,6 +36,10 @@
*/
/**************************************************************************/
#include "tusb_option.h"
#if TUSB_OPT_HOST_ENABLED || TUSB_OPT_DEVICE_ENABLED
#define _TINY_USB_SOURCE_FILE_
#include "tusb.h"
@@ -82,10 +86,7 @@ void tusb_task(void)
/* Debug
*------------------------------------------------------------------*/
#if CFG_TUSB_DEBUG
char const* const tusb_strerr[TUSB_ERROR_COUNT] =
{
ERROR_TABLE(ERROR_STRING)
};
char const* const tusb_strerr[TUSB_ERROR_COUNT] = { ERROR_TABLE(ERROR_STRING) };
#endif
#endif // host or device enabled