File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1536,6 +1536,10 @@ msgstr ""
1536
1536
msgid "No timer available"
1537
1537
msgstr ""
1538
1538
1539
+ #: shared-module/usb/core/Device.c
1540
+ msgid "No usb host port initialized"
1541
+ msgstr ""
1542
+
1539
1543
#: ports/nrf/common-hal/_bleio/__init__.c
1540
1544
msgid "Nordic system firmware out of memory"
1541
1545
msgstr ""
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ SECTIONS
211
211
_ld_dtcm_data_flash_copy = LOADADDR (.dtcm_data);
212
212
_ld_dtcm_data_size = SIZEOF (.dtcm_data);
213
213
214
- .dtcm_bss :
214
+ .dtcm_bss (NOLOAD) :
215
215
{
216
216
. = ALIGN (4);
217
217
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ void tuh_umount_cb(uint8_t dev_addr) {
51
51
STATIC xfer_result_t _xfer_result ;
52
52
STATIC size_t _actual_len ;
53
53
bool common_hal_usb_core_device_construct (usb_core_device_obj_t * self , uint8_t device_number ) {
54
+ if (!tuh_inited ()) {
55
+ mp_raise_RuntimeError (translate ("No usb host port initialized" ));
56
+ }
57
+
54
58
if (device_number == 0 || device_number > CFG_TUH_DEVICE_MAX + CFG_TUH_HUB ) {
55
59
return false;
56
60
}
You can’t perform that action at this time.
0 commit comments