echo-lalia / MicroHydra

MicroHydra is a simple, 'OS-like', MicroPython based app switcher designed for ESP32 based devices.
GNU General Public License v3.0
155 stars 14 forks source link

FEATURE: Add USB-HID compatibility #121

Open TheOddCell opened 2 months ago

TheOddCell commented 2 months ago

As far as I can tell, to use USB-HID, you need to change boot.py to include:

import pyb
pyb.usb_mode()

However, this is not really an option with MicroHydra, so I propose before reseting to the apploader checking if it has some comment like #mh-usb_hid-enable or something similar to run pyb.usb_mode in the boot.py after reseting.

Of cource, this is just an idea, and I am not a MicroPython expert, but this seems to be the case.

echo-lalia commented 2 months ago

The example you sent seems to be specific to the Pyboard, and is not part of the ESP32 port of MicroPython.

Can I ask what functionality you're hoping to get from this? I'm having trouble determining what the goal of your feature request is, because is, because I don't think that code would do a lot on its own.