@@ -130,7 +130,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(usb_core_device_get_manufacturer_obj, usb_core_device_
130
130
MP_PROPERTY_GETTER (usb_core_device_manufacturer_obj ,
131
131
(mp_obj_t )& usb_core_device_get_manufacturer_obj );
132
132
133
- //| def write(self, endpoint: int, data: ReadableBuffer, timeout = None) -> int:
133
+ //| def write(self, endpoint: int, data: ReadableBuffer, timeout:Optional[int] = None) -> int:
134
134
//| """Write data to a specific endpoint on the device.
135
135
//|
136
136
//| :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
159
159
MP_DEFINE_CONST_FUN_OBJ_KW (usb_core_device_write_obj , 2 , usb_core_device_write );
160
160
161
161
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:
163
163
//| """Read data from the endpoint.
164
164
//|
165
165
//| :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
186
186
}
187
187
MP_DEFINE_CONST_FUN_OBJ_KW (usb_core_device_read_obj , 2 , usb_core_device_read );
188
188
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:
191
191
//| """Do a control transfer on the endpoint 0. The parameters bmRequestType,
192
192
//| bRequest, wValue and wIndex are the same of the USB Standard Control
193
193
//| Request format.
@@ -254,7 +254,7 @@ STATIC mp_obj_t usb_core_device_is_kernel_driver_active(mp_obj_t self_in, mp_obj
254
254
}
255
255
MP_DEFINE_CONST_FUN_OBJ_2 (usb_core_device_is_kernel_driver_active_obj , usb_core_device_is_kernel_driver_active );
256
256
257
- //| def detach_kernel_driver(self, interface: int):
257
+ //| def detach_kernel_driver(self, interface: int) -> None :
258
258
//| """Stop CircuitPython from using the interface. If successful, you
259
259
//| will then be able to perform I/O. CircuitPython will automatically
260
260
//| 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
271
271
}
272
272
MP_DEFINE_CONST_FUN_OBJ_2 (usb_core_device_detach_kernel_driver_obj , usb_core_device_detach_kernel_driver );
273
273
274
- //| def attach_kernel_driver(self, interface: int):
274
+ //| def attach_kernel_driver(self, interface: int) -> None :
275
275
//| """Allow CircuitPython to use the interface if it wants to.
276
276
//|
277
277
//| :param int interface: the device interface number to allow CircuitPython to use
0 commit comments