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.
Dependencies: mbed NetServicesMin
common/leds.cpp
- Committer:
- recotana
- Date:
- 2012-03-22
- Revision:
- 0:e5342390978b
File content as of revision 0:e5342390978b:
#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 onLedDevice(void)
{
ledDev=1;
}
void ledTcpConnect(bool isConnect)
{
if(isConnect) ledTcpCon=1;
else ledTcpCon=0;
}