summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-05-09 16:00:19 +1000
committerDamien George <damien.p.george@gmail.com>2018-05-09 16:00:19 +1000
commitc1115d931fdf3780df92233c3b7bbf2e5cbe82ca (patch)
treec3d57b47c172751cea5f2ba2b710eded3865d3bc
parente1bc85416a1f15edc95706ebc60255dfb7a9784a (diff)
stm32/usb: Use correct type for USB HID object.
-rw-r--r--ports/stm32/usb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ports/stm32/usb.c b/ports/stm32/usb.c
index 718fa898c..3448c65dd 100644
--- a/ports/stm32/usb.c
+++ b/ports/stm32/usb.c
@@ -588,7 +588,7 @@ STATIC mp_obj_t pyb_usb_hid_recv(size_t n_args, const mp_obj_t *args, mp_map_t *
};
// parse args
- pyb_usb_vcp_obj_t *self = MP_OBJ_TO_PTR(args[0]);
+ pyb_usb_hid_obj_t *self = MP_OBJ_TO_PTR(args[0]);
mp_arg_val_t vals[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args - 1, args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, vals);
@@ -610,7 +610,7 @@ STATIC mp_obj_t pyb_usb_hid_recv(size_t n_args, const mp_obj_t *args, mp_map_t *
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pyb_usb_hid_recv_obj, 1, pyb_usb_hid_recv);
STATIC mp_obj_t pyb_usb_hid_send(mp_obj_t self_in, mp_obj_t report_in) {
- pyb_usb_vcp_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ pyb_usb_hid_obj_t *self = MP_OBJ_TO_PTR(self_in);
mp_buffer_info_t bufinfo;
byte temp_buf[8];
// get the buffer to send from
@@ -652,7 +652,7 @@ STATIC const mp_rom_map_elem_t pyb_usb_hid_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(pyb_usb_hid_locals_dict, pyb_usb_hid_locals_dict_table);
STATIC mp_uint_t pyb_usb_hid_ioctl(mp_obj_t self_in, mp_uint_t request, mp_uint_t arg, int *errcode) {
- pyb_usb_vcp_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ pyb_usb_hid_obj_t *self = MP_OBJ_TO_PTR(self_in);
mp_uint_t ret;
if (request == MP_STREAM_POLL) {
mp_uint_t flags = arg;