bbb
Dependencies: IOTAtelier1819-FileSystem BSP_B-L475E-IOT01
Diff: main.cpp
- Revision:
- 12:a07d0af60cc6
- Parent:
- 10:38d6b74b0eb7
- Child:
- 25:65a9183a2178
--- a/main.cpp Fri Mar 09 21:30:16 2018 +0000 +++ b/main.cpp Thu Apr 05 15:30:17 2018 +0100 @@ -72,8 +72,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... ");