Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/stmhal/usrsw.h

5 lines
92 B
C
Raw Normal View History

stmhal: Implement selector for USB device mode; improve boot up. Can now choose at boot up whether the USB device is CDC+MSC or CDC+HID. Choice is made by an option in boot.py, with default being CDC+MSC. HID+MSC is not currently supported, but should be easy to implement. Boot up now has ability to change the reset mode: hold down USR switch while booting and LEDs will count from 1 to 7 to indicate the boot mode. Release USR when correct mode is selected. Current modes are 1 (normal boot), 2 (safe mode), 3 (reset FS mode).
2014-03-30 00:00:15 +00:00
void switch_init0(void);
stmhal - add pin mapping, gpio, exti, usrsw
2014-03-14 23:41:28 -07:00
int switch_get(void);
stmhal: Make switch a class, to follow suit of all other modules. Instead of pyb.switch() as a function, it's more consistent (with respect to all the other modules and peripherals) to have pyb.Switch() create a switch object. This then generalises to having multiple switches. Call the object to get its state. Use sw.callback to set the callback function for when the switch is pressed.
2014-04-21 18:23:50 +01:00
extern const mp_obj_type_t pyb_switch_type;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 35ms Template: 0ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API