MultiSerialのテストコード

Dependencies:   MultiSerial mbed

main.cpp

Committer:
Hatter
Date:
2014-08-28
Revision:
4:3286f2bc90f7
Parent:
3:ad45842c796b
Child:
5:34512440248f

File content as of revision 4:3286f2bc90f7:

#include"mbed.h"
#include"MultiSerial.h"
    
BusOut check(LED3,LED4);

uint8_t send_data[2]={0,0xF};
uint8_t get_data[2];
MultiSerial send(p9,p10);
MultiSerial get(p28,p27);

int main(){

    send.write(send_data,0x0A);
    get.read(get_data,0x0A);

    for(int i=1;;i++){

        check = get_data[i];
        wait(0.1);
        if(i==2){i=0;}
    
    }
}