File tree 2 files changed +3
-16
lines changed 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,9 @@ LIBSTDCPP_FILE_NAME = "$(shell $(CXX) $(CXXFLAGS) -print-file-name=libstdc++.a)"
157
157
LDFLAGS += -L"$(shell dirname $(LIBSTDCPP_FILE_NAME ) ) "
158
158
endif
159
159
160
+ # Hook tinyusb USB interrupt if used to service usb task.
161
+ LDFLAGS += --wrap=dcd_event_handler
162
+
160
163
# Options for mpy-cross
161
164
MPY_CROSS_FLAGS += -march=armv7m
162
165
Original file line number Diff line number Diff line change @@ -250,25 +250,10 @@ typedef unsigned int mp_uint_t; // must be pointer size
250
250
251
251
typedef long mp_off_t ;
252
252
253
- #if MICROPY_HW_ENABLE_USBDEV
254
- #define MICROPY_HW_USBDEV_TASK_HOOK extern void mp_usbd_task(void); mp_usbd_task();
255
- #define MICROPY_VM_HOOK_COUNT (10)
256
- #define MICROPY_VM_HOOK_INIT static uint vm_hook_divisor = MICROPY_VM_HOOK_COUNT;
257
- #define MICROPY_VM_HOOK_POLL if (--vm_hook_divisor == 0) { \
258
- vm_hook_divisor = MICROPY_VM_HOOK_COUNT; \
259
- MICROPY_HW_USBDEV_TASK_HOOK \
260
- }
261
- #define MICROPY_VM_HOOK_LOOP MICROPY_VM_HOOK_POLL
262
- #define MICROPY_VM_HOOK_RETURN MICROPY_VM_HOOK_POLL
263
- #else
264
- #define MICROPY_HW_USBDEV_TASK_HOOK
265
- #endif
266
-
267
253
#if MICROPY_PY_THREAD
268
254
#define MICROPY_EVENT_POLL_HOOK \
269
255
do { \
270
256
extern void mp_handle_pending(bool); \
271
- MICROPY_HW_USBDEV_TASK_HOOK \
272
257
mp_handle_pending(true); \
273
258
if (pyb_thread_enabled) { \
274
259
MP_THREAD_GIL_EXIT(); \
@@ -284,7 +269,6 @@ typedef long mp_off_t;
284
269
#define MICROPY_EVENT_POLL_HOOK \
285
270
do { \
286
271
extern void mp_handle_pending(bool); \
287
- MICROPY_HW_USBDEV_TASK_HOOK \
288
272
mp_handle_pending(true); \
289
273
__WFI(); \
290
274
} while (0);
You can’t perform that action at this time.
0 commit comments