File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 16
16
#include " mbed.h"
17
17
#include < stdio.h>
18
18
#include < errno.h>
19
+ #include < functional>
19
20
20
21
#include " BlockDevice.h"
21
22
@@ -68,14 +69,15 @@ void erase() {
68
69
}
69
70
}
70
71
72
+ static auto erase_event = mbed_event_queue()->make_user_allocated_event (erase);
71
73
72
74
// Entry point for the example
73
75
int main () {
74
76
printf (" --- Mbed OS filesystem example ---\n " );
75
77
76
78
// Setup the erase event on button press, use the event queue
77
79
// to avoid running in interrupt context
78
- irq.fall (mbed_event_queue ()-> event (erase ));
80
+ irq.fall (std::ref (erase_event ));
79
81
80
82
// Try to mount the filesystem
81
83
printf (" Mounting the filesystem... " );
Original file line number Diff line number Diff line change 1
- https://github.com/ARMmbed/mbed-os/#51d55508e8400b60af467005646c4e2164738d48
2
-
1
+ https://github.com/ARMmbed/mbed-os/#b6370b4c37f3d4665ed1cdcb1afea85396bba1b3
You can’t perform that action at this time.
0 commit comments