Replies: 2 comments 4 replies
-
What are you trying to do ? |
Beta Was this translation helpful? Give feedback.
-
You seem to refer to this piece of code: int is_plugged_usb(void){
uint32_t *aa = USB_SERIAL_JTAG_FRAM_NUM_REG;
uint32_t first = *aa;
vTaskDelay(pdMS_TO_TICKS(10));
return (int) (*aa - first);
} which refers to C code headers included that are part of the IDF that are specific for each esp device. So you have an address where to look at: from machine import mem32
first = mem32[0x60043024] then perhaps use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Apparently the esp32 has a register that detects if the usb is plugged in? https://www.esp32.com/viewtopic.php?t=26380 and https://www.esp32.com/viewtopic.php?t=31293 Just wondering if it's possible to read it from upython? Maybe an atomic_bitmask _read() or something?
Beta Was this translation helpful? Give feedback.
All reactions