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.
Diff: main.cpp
- Revision:
- 5:af8e8a91a373
- Parent:
- 4:df65a888a785
- Child:
- 6:5904bcfd7c00
--- a/main.cpp Mon Nov 04 18:40:57 2019 +0800
+++ b/main.cpp Tue Nov 05 11:20:02 2019 +0800
@@ -77,8 +77,9 @@
int main() {
printf("--- Mbed OS filesystem example ---\n");
- // Setup the irq in case we want to use it
- irq.fall(erase);
+ // Setup the erase event on button press, use the event queue
+ // to avoid running in interrupt context
+ irq.fall(mbed_event_queue()->event(erase));
// Try to mount the filesystem
printf("Mounting the filesystem... ");