modify main.cpp of analog and analog_in

pull/866/head
Marcomissyou 2015-01-27 15:41:52 +08:00
parent 48aed8e75f
commit e7c32aff0f
4 changed files with 7 additions and 55 deletions

View File

@ -62,4 +62,4 @@ int main() {
}
notify_completion(check);
}
}

View File

@ -50,9 +50,9 @@ int main() {
}
if (successes > 8) {
notify_completion(true);
notify_success(true);
}
else {
notify_completion(false);
notify_success(false);
}
}

View File

@ -1,60 +1,12 @@
#include "mbed.h"
#include "nrf_soc.h"
#define CMD_POWER_DOWN (0xB9)
DigitalOut LED00(p0);
DigitalOut LED01(p1);
DigitalOut LED02(p2);
DigitalOut LED03(p3);
DigitalOut LED04(p4);
DigitalOut LED05(p5);
DigitalOut Flash_CS(p28);
InterruptIn button(p20);
void intoSystemoff() {
Flash_CS = 0;
LED00 = 0;
LED01 = 0;
LED02 = 0;
LED03 = 0;
//ble.init();
wait(1);
NRF_POWER->SYSTEMOFF = POWER_SYSTEMOFF_SYSTEMOFF_Enter;
//sd_power_system_off();
//NRF_POWER->RAMON = POWER_RAMON_OFFRAM3_RAM3Off << POWER_RAMON_OFFRAM3_Pos;
//NRF_POWER->RAMON = POWER_RAMON_OFFRAM2_RAM2Off << POWER_RAMON_OFFRAM2_Pos;
//wait(5);
//NRF_POWER->RAMON = POWER_RAMON_OFFRAM1_RAM1On << POWER_RAMON_ONRAM1_Pos;
//NRF_POWER->RAMON = POWER_RAMON_OFFRAM0_RAM0On << POWER_RAMON_ONRAM0_Pos;
}
int main() {
LED00 = 1;
button.fall(&intoSystemoff);
for(;;)
{
LED03 = 1;
wait(1);
LED03 = 0;
wait(1);
}
}
/*#include "mbed.h"
DigitalOut myled(LED1);
int main() {
while(1) {
myled = 1;
wait(2);
wait(0.2);
myled = 0;
wait(2);
wait(0.2);
}
}*/
}

View File

@ -971,7 +971,7 @@ TARGETS = [
BLE_SMURFS_OTA(),
HRM1017(), # nRF51822
RBLAB_NRF51822(),# nRF51822
RBLAB_BLENANO(),# nRF51822git
RBLAB_BLENANO(),# nRF51822
NRF51822_Y5_MBUG(),#nRF51822
WALLBOT_BLE(), # nRF51822
DELTA_DFCM_NNN40(), # nRF51822