V1
Dependencies: BufferedSerial sn7544
Fork of GPG_motor by
Revision 0:dde6e4d8c301, committed 2019-05-09
- Comitter:
- kangmingyo
- Date:
- Thu May 09 11:27:32 2019 +0000
- Child:
- 1:1d18a2e8ce45
- Commit message:
- aa
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-os.lib | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu May 09 11:27:32 2019 +0000 @@ -0,0 +1,30 @@ +#include "mbed.h" + +Serial pc(USBTX,USBRX,115200); +DigitalOut led(LED2); + +void rx_cn(void){ + + while(true){ + char ch; + ch =pc.getc(); + pc.putc(ch); + + if(ch ==0x0D){ + pc.putc(0x0A); + } + + } + +} + + + +int main(){ + pc.attach(&rx_cn); + while(1){ + wait(1); + led = !led; + + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Thu May 09 11:27:32 2019 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#949cb49ab0a144da0e3b04b6af46db0cd2a20d75