Skip to content

Commit 6ee2bfa

Browse files
authored
Merge pull request #116 from kjbracey-arm/event2
Don't require platform.callback-nontrivial
2 parents 40431c7 + b3141fb commit 6ee2bfa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "mbed.h"
1717
#include <stdio.h>
1818
#include <errno.h>
19+
#include <functional>
1920

2021
#include "BlockDevice.h"
2122

@@ -68,14 +69,15 @@ void erase() {
6869
}
6970
}
7071

72+
static auto erase_event = mbed_event_queue()->make_user_allocated_event(erase);
7173

7274
// Entry point for the example
7375
int main() {
7476
printf("--- Mbed OS filesystem example ---\n");
7577

7678
// Setup the erase event on button press, use the event queue
7779
// to avoid running in interrupt context
78-
irq.fall(mbed_event_queue()->event(erase));
80+
irq.fall(std::ref(erase_event));
7981

8082
// Try to mount the filesystem
8183
printf("Mounting the filesystem... ");

mbed-os.lib

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
https://github.com/ARMmbed/mbed-os/#51d55508e8400b60af467005646c4e2164738d48
2-
1+
https://github.com/ARMmbed/mbed-os/#b6370b4c37f3d4665ed1cdcb1afea85396bba1b3

0 commit comments

Comments
 (0)