@@ -159,7 +159,7 @@ static size_t _xfer(tuh_xfer_t *xfer, mp_int_t timeout) {
159159 _xfer_result = 0xff ;
160160 xfer -> complete_cb = _transfer_done_cb ;
161161 if (!tuh_edpt_xfer (xfer )) {
162- mp_raise_usb_core_USBError (MP_ERROR_TEXT ( "Xfer" ) );
162+ mp_raise_usb_core_USBError (NULL );
163163 return 0 ;
164164 }
165165 uint32_t start_time = supervisor_ticks_ms32 ();
@@ -177,7 +177,7 @@ static size_t _xfer(tuh_xfer_t *xfer, mp_int_t timeout) {
177177 xfer_result_t result = _xfer_result ;
178178 _xfer_result = 0xff ;
179179 if (result == XFER_RESULT_STALLED ) {
180- mp_raise_usb_core_USBError (MP_ERROR_TEXT ("Stall " ));
180+ mp_raise_usb_core_USBError (MP_ERROR_TEXT ("Pipe error " ));
181181 }
182182 if (result == 0xff ) {
183183 tuh_edpt_abort_xfer (xfer -> daddr , xfer -> ep_addr );
@@ -206,7 +206,7 @@ static bool _open_endpoint(usb_core_device_obj_t *self, mp_int_t endpoint) {
206206 }
207207
208208 if (self -> configuration_descriptor == NULL ) {
209- mp_raise_usb_core_USBError (MP_ERROR_TEXT ("NoCfg " ));
209+ mp_raise_usb_core_USBError (MP_ERROR_TEXT ("No configuration set " ));
210210 return false;
211211 }
212212
@@ -241,7 +241,7 @@ static bool _open_endpoint(usb_core_device_obj_t *self, mp_int_t endpoint) {
241241
242242mp_int_t common_hal_usb_core_device_write (usb_core_device_obj_t * self , mp_int_t endpoint , const uint8_t * buffer , mp_int_t len , mp_int_t timeout ) {
243243 if (!_open_endpoint (self , endpoint )) {
244- mp_raise_usb_core_USBError (MP_ERROR_TEXT ( "Endpt" ) );
244+ mp_raise_usb_core_USBError (NULL );
245245 return 0 ;
246246 }
247247 tuh_xfer_t xfer ;
@@ -254,7 +254,7 @@ mp_int_t common_hal_usb_core_device_write(usb_core_device_obj_t *self, mp_int_t
254254
255255mp_int_t common_hal_usb_core_device_read (usb_core_device_obj_t * self , mp_int_t endpoint , uint8_t * buffer , mp_int_t len , mp_int_t timeout ) {
256256 if (!_open_endpoint (self , endpoint )) {
257- mp_raise_usb_core_USBError (MP_ERROR_TEXT ( "Endpt" ) );
257+ mp_raise_usb_core_USBError (NULL );
258258 return 0 ;
259259 }
260260 tuh_xfer_t xfer ;
@@ -289,7 +289,7 @@ mp_int_t common_hal_usb_core_device_ctrl_transfer(usb_core_device_obj_t *self,
289289 _xfer_result = 0xff ;
290290
291291 if (!tuh_control_xfer (& xfer )) {
292- mp_raise_usb_core_USBError (MP_ERROR_TEXT ( "Xfer" ) );
292+ mp_raise_usb_core_USBError (NULL );
293293 return 0 ;
294294 }
295295 uint32_t start_time = supervisor_ticks_ms32 ();
@@ -307,7 +307,7 @@ mp_int_t common_hal_usb_core_device_ctrl_transfer(usb_core_device_obj_t *self,
307307 xfer_result_t result = _xfer_result ;
308308 _xfer_result = 0xff ;
309309 if (result == XFER_RESULT_STALLED ) {
310- mp_raise_usb_core_USBError (MP_ERROR_TEXT ("Stall " ));
310+ mp_raise_usb_core_USBError (MP_ERROR_TEXT ("Pipe error " ));
311311 }
312312 if (result == 0xff ) {
313313 tuh_edpt_abort_xfer (xfer .daddr , xfer .ep_addr );
0 commit comments