Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DISCO-L072CZ-LRWAN1_LoRa_PingPong
Fork of SX1276GenericLib by
Revision 76:79f8ca9c8025, committed 2017-07-27
- Comitter:
- Helmut Tschemernjak
- Date:
- Thu Jul 27 11:47:46 2017 +0200
- Parent:
- 75:7330dd86cdea
- Child:
- 77:7f227a4dffe6
- Commit message:
- Disable Arduino sleep code when using SerialUSB because
the sleep kills the USB
Changed in this revision
| Arduino-mbed-APIs/arduino-mbed.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Arduino-mbed-APIs/arduino-mbed.cpp Wed Jul 26 15:18:35 2017 +0200
+++ b/Arduino-mbed-APIs/arduino-mbed.cpp Thu Jul 27 11:47:46 2017 +0200
@@ -632,16 +632,15 @@
* and if the SerialUSB and connected we should
* not enter into sleep mode because this kills the Arduino USB emulation
*/
-#if 0
if (ser && ser == (Stream *)&SerialUSB) {
- if (1) {
- __WFI();
- return;
- }
- USB->CTRLA.bit.ENABLE = 0;
+ __WFI();
+ return;
+ // USB->CTRLA.bit.ENABLE = 0;
+ // USB->HOST.CTRLA.reg = 0;
+ // USB->HOST.CTRLA.bit.ENABLE &= USB_CTRLA_ENABLE;
}
-#endif
+
#if 1 // (SAMD20 || SAMD21)
/* Errata: Make sure that the Flash does not power all the way down
* when in sleep mode. */
