diff options
| author | Dan Halbert <halbert@adafruit.com> | 2020-09-10 13:26:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-10 13:26:51 -0400 |
| commit | 40f3cd3615ca7be009ba2deb37209fa4d3993bf9 (patch) | |
| tree | d5a0733d5e97aab995fa951fabb3c902f2d6fbf4 /shared-bindings/usb_hid | |
| parent | 9aca580195b8381d0db6663dd0dbe22f465ce170 (diff) | |
Change `.report` to `.last_received_report`
Diffstat (limited to 'shared-bindings/usb_hid')
| -rw-r--r-- | shared-bindings/usb_hid/Device.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/shared-bindings/usb_hid/Device.c b/shared-bindings/usb_hid/Device.c index a6c268c74..8f28bc422 100644 --- a/shared-bindings/usb_hid/Device.c +++ b/shared-bindings/usb_hid/Device.c @@ -58,21 +58,21 @@ STATIC mp_obj_t usb_hid_device_send_report(mp_obj_t self_in, mp_obj_t buffer) { } MP_DEFINE_CONST_FUN_OBJ_2(usb_hid_device_send_report_obj, usb_hid_device_send_report); -//| report: bytes -//| """The HID OUT report as a `bytes`. (read-only)""" +//| last_received_report: bytes +//| """The HID OUT report as a `bytes`. (read-only). `None` if nothing received.""" //| -STATIC mp_obj_t usb_hid_device_obj_get_report(mp_obj_t self_in) { +STATIC mp_obj_t usb_hid_device_obj_get_last_received_report(mp_obj_t self_in) { usb_hid_device_obj_t *self = MP_OBJ_TO_PTR(self_in); if (self->out_report_buffer == 0) { return mp_const_none; } return mp_obj_new_bytes(self->out_report_buffer, self->out_report_length); } -MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_report_obj, usb_hid_device_obj_get_report); +MP_DEFINE_CONST_FUN_OBJ_1(usb_hid_device_get_last_received_report_obj, usb_hid_device_obj_get_last_received_report); -const mp_obj_property_t usb_hid_device_report_obj = { +const mp_obj_property_t usb_hid_device_last_received_report_obj = { .base.type = &mp_type_property, - .proxy = {(mp_obj_t)&usb_hid_device_get_report_obj, + .proxy = {(mp_obj_t)&usb_hid_device_get_last_received_report_obj, (mp_obj_t)&mp_const_none_obj, (mp_obj_t)&mp_const_none_obj}, }; @@ -114,10 +114,10 @@ const mp_obj_property_t usb_hid_device_usage_obj = { }; STATIC const mp_rom_map_elem_t usb_hid_device_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_send_report), MP_ROM_PTR(&usb_hid_device_send_report_obj) }, - { MP_ROM_QSTR(MP_QSTR_report), MP_ROM_PTR(&usb_hid_device_report_obj) }, - { MP_ROM_QSTR(MP_QSTR_usage_page), MP_ROM_PTR(&usb_hid_device_usage_page_obj)}, - { MP_ROM_QSTR(MP_QSTR_usage), MP_ROM_PTR(&usb_hid_device_usage_obj)}, + { MP_ROM_QSTR(MP_QSTR_send_report), MP_ROM_PTR(&usb_hid_device_send_report_obj) }, + { MP_ROM_QSTR(MP_QSTR_last_received_report), MP_ROM_PTR(&usb_hid_device_report_obj) }, + { MP_ROM_QSTR(MP_QSTR_usage_page), MP_ROM_PTR(&usb_hid_device_usage_page_obj)}, + { MP_ROM_QSTR(MP_QSTR_usage), MP_ROM_PTR(&usb_hid_device_usage_obj)}, }; STATIC MP_DEFINE_CONST_DICT(usb_hid_device_locals_dict, usb_hid_device_locals_dict_table); |
