テストモード追加、LED有効化 left -> SerialRX, Data Recieve Complete , Serial Tx , Light Tx

Dependencies:   XBee mbed NetServicesMin

Committer:
recotana
Date:
Thu Mar 22 12:40:48 2012 +0000
Revision:
0:42adca80439c
Child:
1:36eb173eb52b

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
recotana 0:42adca80439c 1 #include "mbed.h"
recotana 0:42adca80439c 2 #include "leds.h"
recotana 0:42adca80439c 3
recotana 0:42adca80439c 4 Timeout led_ether;
recotana 0:42adca80439c 5 Timeout led_xbee;
recotana 0:42adca80439c 6 Timeout led_device;
recotana 0:42adca80439c 7
recotana 0:42adca80439c 8 DigitalOut ledXb(LED1);
recotana 0:42adca80439c 9 DigitalOut ledDev(LED2);
recotana 0:42adca80439c 10 DigitalOut ledTcpCon(LED3);
recotana 0:42adca80439c 11 DigitalOut ledEt(LED4);
recotana 0:42adca80439c 12
recotana 0:42adca80439c 13 void offEther(void){
recotana 0:42adca80439c 14 ledEt=0;
recotana 0:42adca80439c 15 }
recotana 0:42adca80439c 16 void offXBee(void){
recotana 0:42adca80439c 17 ledXb=0;
recotana 0:42adca80439c 18 }
recotana 0:42adca80439c 19 void offDevice(void){
recotana 0:42adca80439c 20 ledDev=0;
recotana 0:42adca80439c 21 }
recotana 0:42adca80439c 22
recotana 0:42adca80439c 23 void ledEther(void)
recotana 0:42adca80439c 24 {
recotana 0:42adca80439c 25 ledEt=1;
recotana 0:42adca80439c 26 led_ether.attach(&offEther,kLedOnTime);
recotana 0:42adca80439c 27 }
recotana 0:42adca80439c 28 void ledXBee(void)
recotana 0:42adca80439c 29 {
recotana 0:42adca80439c 30 ledXb=1;
recotana 0:42adca80439c 31 led_xbee.attach(&offXBee,kLedOnTime);
recotana 0:42adca80439c 32 }
recotana 0:42adca80439c 33 void ledDevice(void)
recotana 0:42adca80439c 34 {
recotana 0:42adca80439c 35 ledDev=1;
recotana 0:42adca80439c 36 led_device.attach(&offDevice,kLedOnTime);
recotana 0:42adca80439c 37 }
recotana 0:42adca80439c 38 void onLedDevice(void)
recotana 0:42adca80439c 39 {
recotana 0:42adca80439c 40 ledDev=1;
recotana 0:42adca80439c 41 }
recotana 0:42adca80439c 42
recotana 0:42adca80439c 43 void ledTcpConnect(bool isConnect)
recotana 0:42adca80439c 44 {
recotana 0:42adca80439c 45 if(isConnect) ledTcpCon=1;
recotana 0:42adca80439c 46 else ledTcpCon=0;
recotana 0:42adca80439c 47 }