From 979ab4e126dacca4d7fbbd0e71c849365ef2c947 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 15 Dec 2016 12:45:56 +1100 Subject: stmhal/usb: Always use the mp_kbd_exception object for VCP interrupt. There's no need to store a separate pointer to this object. --- stmhal/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stmhal/usb.c') 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); } } -- cgit v1.2.3