![](/media/cache/group/160px-Gnome-fs-trash-full.svg.png.50x50_q85.png)
minimizing power on C027
Dependencies: C027_Support mbed
Fork of PowerControl by
main.cpp
- Committer:
- coyotebush
- Date:
- 2015-05-27
- Revision:
- 1:21401fc44382
- Parent:
- 0:9bd5f1bdb845
File content as of revision 1:21401fc44382:
#include "mbed.h" #include "PowerControl/PowerControl.h" #include "PowerControl/EthernetPowerControl.h" #include "MDM.h" #include "GPS.h" DigitalOut led(LED); void hello() { led = !led; } int main() { printf("Starting\r\n"); wait(5); printf("Modem on\r\n"); MDMSerial mdm; wait(5); printf("GPS on\r\n"); GPSI2C gps; wait(5); printf("PHY off\r\n"); PHY_PowerDown(); wait(5); printf("Modem off\r\n"); mdm.powerOff(); wait(5); printf("GPS off\r\n"); gps.powerOff(); printf("Sleeping\r\n"); Timeout t; t.attach(&hello, 5.0f); Sleep(); printf("Woke up\r\n"); while (true); }