![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
server/client
Dependencies: mbed NetServicesMin
Diff: leds.cpp
- Revision:
- 1:6e61ee662fd3
diff -r 432b571e11a3 -r 6e61ee662fd3 leds.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/leds.cpp Thu Feb 23 02:38:05 2012 +0000 @@ -0,0 +1,43 @@ +#include "mbed.h" +#include "leds.h" + +Timeout led_ether; +Timeout led_xbee; +Timeout led_device; + +DigitalOut ledXb(LED1); +DigitalOut ledDev(LED2); +DigitalOut ledTcpCon(LED3); +DigitalOut ledEt(LED4); + +void offEther(void){ + ledEt=0; +} +void offXBee(void){ + ledXb=0; +} +void offDevice(void){ + ledDev=0; +} + +void ledEther(void) +{ + ledEt=1; + led_ether.attach(&offEther,kLedOnTime); +} +void ledXBee(void) +{ + ledXb=1; + led_xbee.attach(&offXBee,kLedOnTime); +} +void ledDevice(void) +{ + ledDev=1; + led_device.attach(&offDevice,kLedOnTime); +} + +void ledTcpConnect(bool isConnect) +{ + if(isConnect) ledTcpCon=1; + else ledTcpCon=0; +} \ No newline at end of file