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

Dependencies:   XBee mbed NetServicesMin

main.cpp

Committer:
recotana
Date:
2012-03-22
Revision:
0:42adca80439c
Child:
1:36eb173eb52b

File content as of revision 0:42adca80439c:

#include "mbed.h"

#include "config.h"
#include "layer_frame.h"



#include "serialRecieve.h"

DigitalIn din(p20);
extern bool isSend;
extern Payload sendedPayload;
extern bool isSendContinueous;
extern bool isSendContinued;

volatile uint16_t count;

int main(){
    
    din.mode(PullUp);
    initCarrierWave(); 
    
    wait(3);
    serialInit();

    
    Payload test;
    initTestPayloadData(&test);
      
    
    while(1){
    
        readProcess();

        
        if(isSendContinueous) sendPayload(&sendedPayload);
        else if(!din) sendPayload(&test); 
        else sendByteData(0x00);
        
        

        
    }
    
}