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.
Diff: power_up.cpp
- Revision:
- 4:fc56fa8aa794
- Parent:
- 3:764ccaf29ce9
--- a/power_up.cpp Thu Sep 20 23:45:05 2012 +0000 +++ b/power_up.cpp Sat Sep 29 19:22:38 2012 +0000 @@ -2,7 +2,7 @@ using namespace std; #define ADDR 0x98 //change to 94 or 98 if doesn't work -#define POWER_UP_TIME 1 +#define POWER_UP_TIME 0.3 I2C i2c(p9, p10); //sda, scl DigitalOut ADDR0(p6); //ADDR0 in DAC @@ -63,6 +63,7 @@ power(ADDR,0x33,0xFF,0xF0) ; //update channel D 3.3V DVDD wait(POWER_UP_TIME); } + void powerDown() { power(ADDR,0x33,0x00,0x00) ; //update channel D 3.3V DVDD