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.
Revision 1:e508448feb1c, committed 2016-11-17
- Comitter:
- pateshian
- Date:
- Thu Nov 17 16:33:21 2016 +0000
- Parent:
- 0:ab9939da6645
- Commit message:
- WFI based sleep and wake-up for GR-PEACH on mbed5.X
Changed in this revision
| mbed_sleep_blinky.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/mbed_sleep_blinky.cpp Thu Nov 17 15:52:54 2016 +0000
+++ b/mbed_sleep_blinky.cpp Thu Nov 17 16:33:21 2016 +0000
@@ -1,22 +1,17 @@
#include "mbed.h"
#define IRQ4 (36)
gpio_irq_t irqHandler;
-
DigitalOut led1(LED1);
int gFlag = 0;
-
void interrupt_irq4_user (uint32_t id, gpio_irq_event event) {
if (!gFlag){
gFlag = 1;
}
}
-
// main() runs in its own thread in the OS
// (note the calls to Thread::wait below for delays)
int main() {
-
- gpio_irq_init (&irqHandler, USER_BUTTON0, interrupt_irq4_user, IRQ4);
-
+ gpio_irq_init (&irqHandler, USER_BUTTON0, interrupt_irq4_user, IRQ4);
while (true) {
if ( gFlag == 1 ) {
gFlag = 0;