summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-08-15 12:03:32 +1000
committerDamien George <damien.p.george@gmail.com>2019-08-15 12:03:32 +1000
commitba607809f210ae9648709138623ddadbfb16fe57 (patch)
treee67121d583812d8f58ab9169281eae2f38d24ff7
parentb6906fa573bb1fcde5004e83b40832ae9ba8b002 (diff)
stm32/modpyb: Support building with PY_PYB_LEGACY on and HW_USB_HID off.
-rw-r--r--ports/stm32/modpyb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/stm32/modpyb.c b/ports/stm32/modpyb.c
index 139defc53..1a1f567a5 100644
--- a/ports/stm32/modpyb.c
+++ b/ports/stm32/modpyb.c
@@ -170,9 +170,11 @@ STATIC const mp_rom_map_elem_t pyb_module_globals_table[] = {
#if MICROPY_PY_PYB_LEGACY
// these 2 are deprecated; use USB_VCP.isconnected and USB_HID.send instead
{ MP_ROM_QSTR(MP_QSTR_have_cdc), MP_ROM_PTR(&pyb_have_cdc_obj) },
+ #if MICROPY_HW_USB_HID
{ MP_ROM_QSTR(MP_QSTR_hid), MP_ROM_PTR(&pyb_hid_send_report_obj) },
#endif
#endif
+ #endif
#if MICROPY_PY_PYB_LEGACY
{ MP_ROM_QSTR(MP_QSTR_millis), MP_ROM_PTR(&mp_utime_ticks_ms_obj) },