Michael Wei
/
PowerControl
see http://mbed.org/users/no2chem/notebook/mbed-power-controlconsumption/
Embed:
(wiki syntax)
Show/hide line numbers
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 }
Generated on Mon Jul 18 2022 21:16:25 by 1.7.2