diff options
| author | Damien George <damien.p.george@gmail.com> | 2016-12-15 12:45:56 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2016-12-15 12:45:56 +1100 |
| commit | 979ab4e126dacca4d7fbbd0e71c849365ef2c947 (patch) | |
| tree | c1e2791f974da4bd29af32aad6cb609e2763c242 /stmhal/usb.c | |
| parent | f254cfd3c46432efabf837668c91271fddc8ea27 (diff) | |
stmhal/usb: Always use the mp_kbd_exception object for VCP interrupt.
There's no need to store a separate pointer to this object.
Diffstat (limited to 'stmhal/usb.c')
| -rw-r--r-- | stmhal/usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/usb.c b/stmhal/usb.c index 591cb321a..c6303befb 100644 --- a/stmhal/usb.c +++ b/stmhal/usb.c @@ -96,7 +96,7 @@ const mp_obj_tuple_t pyb_usb_hid_keyboard_obj = { }; void pyb_usb_init0(void) { - USBD_CDC_SetInterrupt(-1, MP_STATE_PORT(mp_kbd_exception)); + USBD_CDC_SetInterrupt(-1); MP_STATE_PORT(pyb_hid_report_desc) = MP_OBJ_NULL; } @@ -146,7 +146,7 @@ void usb_vcp_set_interrupt_char(int c) { if (c != -1) { mp_obj_exception_clear_traceback(MP_STATE_PORT(mp_kbd_exception)); } - USBD_CDC_SetInterrupt(c, MP_STATE_PORT(mp_kbd_exception)); + USBD_CDC_SetInterrupt(c); } } |
