KIM HyoengJun
/
mbed_fota_fan_control
Fan Control Demo
Fork of mbed_fota by
Diff: main.cpp
- Revision:
- 6:8dd20294b2aa
- Parent:
- 5:e11b23f9aacc
- Child:
- 7:3478c46cceef
diff -r e11b23f9aacc -r 8dd20294b2aa main.cpp --- a/main.cpp Mon Jul 13 06:32:05 2015 +0000 +++ b/main.cpp Fri Jul 17 14:04:12 2015 +0000 @@ -4,18 +4,37 @@ Serial hostpc(USBTX,USBRX); Serial device(p13,p14); - +LocalFileSystem local("local"); // Create the local filesystem DigitalOut myled(LED1); +DigitalOut myled2(LED2); +DigitalOut myled3(LED3); +DigitalOut myled4(LED4); using namespace sevencore_fota; -int main() { - +void led_setting_zero(void){ + myled = 1; + myled2 = 1; + myled3 = 1; + myled4 = 1; +} + +void led_setting_one(void){ + myled = 0; + myled2 = 0; + myled3 = 0; + myled4 = 0; +} + +int main() { + led_setting_one(); + hostpc.baud(9600); device.baud(115200); - device.set_flow_control(device.RTS,p12,p12); + device.set_flow_control(device.RTSCTS,P2_7,p12); BleMsgHandler myfota(&device,&hostpc); + myfota.PrintTitle(); app_rst_gap(&myfota);