Skip to content

Commit 40f3cd3

Browse files
authored
Change .report to .last_received_report
1 parent 9aca580 commit 40f3cd3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

shared-bindings/usb_hid/Device.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,21 @@ STATIC mp_obj_t usb_hid_device_send_report(mp_obj_t self_in, mp_obj_t buffer) {
5858
}
5959
MP_DEFINE_CONST_FUN_OBJ_2(usb_hid_device_send_report_obj, usb_hid_device_send_report);
6060

61-
//| report: bytes
62-
//| """The HID OUT report as a `bytes`. (read-only)"""
61+
//| last_received_report: bytes
62+
//| """The HID OUT report as a `bytes`. (read-only). `None` if nothing received."""
6363
//|
64-
STATIC mp_obj_t usb_hid_device_obj_get_report(mp_obj_t self_in) {
64+
STATIC mp_obj_t usb_hid_device_obj_get_last_received_report(mp_obj_t self_in) {
6565
usb_hid_device_obj_t *self = MP_OBJ_TO_PTR(self_in);
6666
if (self->out_report_buffer == 0) {
6767
return mp_const_none;
6868
}
6969
return mp_obj_new_bytes(self->out_report_buffer, self->out_report_length);
7070
}
71-
MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_report_obj, usb_hid_device_obj_get_report);
71+
MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_last_received_report_obj, usb_hid_device_obj_get_last_received_report);
7272

73-
const mp_obj_property_t usb_hid_device_report_obj = {
73+
const mp_obj_property_t usb_hid_device_last_received_report_obj = {
7474
.base.type = &mp_type_property,
75-
.proxy = {(mp_obj_t)&usb_hid_device_get_report_obj,
75+
.proxy = {(mp_obj_t)&usb_hid_device_get_last_received_report_obj,
7676
(mp_obj_t)&mp_const_none_obj,
7777
(mp_obj_t)&mp_const_none_obj},
7878
};
@@ -114,10 +114,10 @@ const mp_obj_property_t usb_hid_device_usage_obj = {
114114
};
115115

116116
STATIC const mp_rom_map_elem_t usb_hid_device_locals_dict_table[] = {
117-
{ MP_ROM_QSTR(MP_QSTR_send_report), MP_ROM_PTR(&usb_hid_device_send_report_obj) },
118-
{ MP_ROM_QSTR(MP_QSTR_report), MP_ROM_PTR(&usb_hid_device_report_obj) },
119-
{ MP_ROM_QSTR(MP_QSTR_usage_page), MP_ROM_PTR(&usb_hid_device_usage_page_obj)},
120-
{ MP_ROM_QSTR(MP_QSTR_usage), MP_ROM_PTR(&usb_hid_device_usage_obj)},
117+
{ MP_ROM_QSTR(MP_QSTR_send_report), MP_ROM_PTR(&usb_hid_device_send_report_obj) },
118+
{ MP_ROM_QSTR(MP_QSTR_last_received_report), MP_ROM_PTR(&usb_hid_device_report_obj) },
119+
{ MP_ROM_QSTR(MP_QSTR_usage_page), MP_ROM_PTR(&usb_hid_device_usage_page_obj)},
120+
{ MP_ROM_QSTR(MP_QSTR_usage), MP_ROM_PTR(&usb_hid_device_usage_obj)},
121121
};
122122

123123
STATIC MP_DEFINE_CONST_DICT(usb_hid_device_locals_dict, usb_hid_device_locals_dict_table);

0 commit comments

Comments
 (0)