@@ -130,7 +130,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_manufacturer_obj, usb_core_device_
130130MP_PROPERTY_GETTER (usb_core_device_manufacturer_obj ,
131131 (mp_obj_t )& usb_core_device_get_manufacturer_obj );
132132
133- //| def write(self, endpoint: int, data: ReadableBuffer, timeout = None) -> int:
133+ //| def write(self, endpoint: int, data: ReadableBuffer, timeout:Optional[int] = None) -> int:
134134//| """Write data to a specific endpoint on the device.
135135//|
136136//| :param int endpoint: the bEndpointAddress you want to communicate with.
@@ -159,7 +159,7 @@ STATIC mp_obj_t usb_core_device_write(size_t n_args, const mp_obj_t *pos_args, m
159159MP_DEFINE_CONST_FUN_OBJ_KW (usb_core_device_write_obj , 2 , usb_core_device_write );
160160
161161
162- //| def read(self, endpoint: int, size_or_buffer: array.array, timeout = None) -> int:
162+ //| def read(self, endpoint: int, size_or_buffer: array.array, timeout:Optional[int] = None) -> int:
163163//| """Read data from the endpoint.
164164//|
165165//| :param int endpoint: the bEndpointAddress you want to communicate with.
@@ -186,8 +186,8 @@ STATIC mp_obj_t usb_core_device_read(size_t n_args, const mp_obj_t *pos_args, mp
186186}
187187MP_DEFINE_CONST_FUN_OBJ_KW (usb_core_device_read_obj , 2 , usb_core_device_read );
188188
189- //| def ctrl_transfer(self, bmRequestType, bRequest, wValue=0, wIndex=0,
190- //| data_or_wLength: Optional[array.array] = None, timeout = None) -> int:
189+ //| def ctrl_transfer(self, bmRequestType:int , bRequest:int , wValue:int =0, wIndex:int =0,
190+ //| data_or_wLength: Optional[array.array] = None, timeout:Optional[int] = None) -> int:
191191//| """Do a control transfer on the endpoint 0. The parameters bmRequestType,
192192//| bRequest, wValue and wIndex are the same of the USB Standard Control
193193//| Request format.
@@ -254,7 +254,7 @@ STATIC mp_obj_t usb_core_device_is_kernel_driver_active(mp_obj_t self_in, mp_obj
254254}
255255MP_DEFINE_CONST_FUN_OBJ_2 (usb_core_device_is_kernel_driver_active_obj , usb_core_device_is_kernel_driver_active );
256256
257- //| def detach_kernel_driver(self, interface: int):
257+ //| def detach_kernel_driver(self, interface: int) -> None :
258258//| """Stop CircuitPython from using the interface. If successful, you
259259//| will then be able to perform I/O. CircuitPython will automatically
260260//| re-start using the interface on reload.
@@ -271,7 +271,7 @@ STATIC mp_obj_t usb_core_device_detach_kernel_driver(mp_obj_t self_in, mp_obj_t
271271}
272272MP_DEFINE_CONST_FUN_OBJ_2 (usb_core_device_detach_kernel_driver_obj , usb_core_device_detach_kernel_driver );
273273
274- //| def attach_kernel_driver(self, interface: int):
274+ //| def attach_kernel_driver(self, interface: int) -> None :
275275//| """Allow CircuitPython to use the interface if it wants to.
276276//|
277277//| :param int interface: the device interface number to allow CircuitPython to use
0 commit comments