see http://mbed.org/users/no2chem/notebook/mbed-power-controlconsumption/

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "PowerControl/PowerControl.h"
00003 #include "PowerControl/EthernetPowerControl.h"
00004 
00005 int main() {
00006     //turn OSC1 down
00007      PHY_PowerDown();
00008      wait(5);
00009      LPC_GPIO1->FIODIR = 0x8000000;
00010      LPC_GPIO1->FIOCLR = 0x8000000;
00011      wait(5);
00012      LPC_GPIO1->FIOSET = 0x8000000;
00013      wait(5);
00014      PHY_PowerUp();
00015 }