MultiSerialのテストコード
Dependencies: MultiSerial mbed
main.cpp
- Committer:
- Hatter
- Date:
- 2014-08-28
- Revision:
- 3:ad45842c796b
- Parent:
- 0:21b4f45cdcde
- Child:
- 4:3286f2bc90f7
File content as of revision 3:ad45842c796b:
#include"mbed.h" #include"MultiSerial.h" DigitalOut check1(LED1); DigitalOut check2(LED2); 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;} } }