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: MultiSerial mbed
Revision 5:34512440248f, committed 2014-09-02
- Comitter:
- Hatter
- Date:
- Tue Sep 02 06:49:58 2014 +0000
- Parent:
- 4:3286f2bc90f7
- Commit message:
- ;
Changed in this revision
| MultiSerial.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MultiSerial.lib Thu Aug 28 05:10:23 2014 +0000 +++ b/MultiSerial.lib Tue Sep 02 06:49:58 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/B/code/MultiSerial/#cfc53cc4914a +http://mbed.org/teams/B/code/MultiSerial/#26262b75f40b
--- a/main.cpp Thu Aug 28 05:10:23 2014 +0000
+++ b/main.cpp Tue Sep 02 06:49:58 2014 +0000
@@ -5,19 +5,17 @@
uint8_t send_data[2]={0,0xF};
uint8_t get_data[2];
-MultiSerial send(p9,p10);
-MultiSerial get(p28,p27);
+MultiSerial send(p9,p10,write);
+MultiSerial get(p28,p27,read);
int main(){
- send.write(send_data,0x0A);
- get.read(get_data,0x0A);
+ send.write_data(send_data,0x0A); //配列のアドレスを変更する場合、キーコードを変更する場合に呼び出す
+ get.read_data(get_data,0x0A);
- for(int i=1;;i++){
-
+ for(int i=0;;i++){
+ i %= 2;
check = get_data[i];
wait(0.1);
- if(i==2){i=0;}
-
}
}
\ No newline at end of file