Tset program for SoftSerial library. Only for F446RE & L432KC.
Dependencies: BufferedSoftSerial
Revision 1:14d1cec89444, committed 2020-05-12
- Comitter:
- kenjiArai
- Date:
- Tue May 12 05:42:35 2020 +0000
- Parent:
- 0:98865e300cd5
- Commit message:
- updated library
Changed in this revision
3_main.cpp | Show annotated file Show diff for this revision Revisions of this file |
BufferedSoftSerial.lib | Show annotated file Show diff for this revision Revisions of this file |
diff -r 98865e300cd5 -r 14d1cec89444 3_main.cpp --- a/3_main.cpp Sun May 10 08:15:36 2020 +0000 +++ b/3_main.cpp Tue May 12 05:42:35 2020 +0000 @@ -10,7 +10,7 @@ * http://www7b.biglobe.ne.jp/~kenjia/ * https://os.mbed.com/users/kenjiArai/ * Created: May 9th, 2020 - * Revised: May 10th, 2020 + * Revised: May 11th, 2020 */ /* @@ -33,17 +33,22 @@ #error "Cannot run on OS2" #endif +#define BAUD 9600 +//#define BAUD 14400 +//#define BAUD 19200 // No continuous transmission +//#define BAUD 38400 // NOT SUCCESS!! + // Constructor ---------------------------------------------------------------- #if defined(TARGET_NUCLEO_L432KC) DigitalOut test_point(D12); -Serial ser(D5, D4, 9600); +Serial ser(D5, D4, BAUD); BufferedSoftSerial dev(D6,D3); #elif defined(TARGET_NUCLEO_F446RE) DigitalOut test_point(A0); -Serial ser(D8, D2, 9600); +Serial ser(D8, D2, BAUD); BufferedSoftSerial dev(D4,D3); #endif -Serial pc(USBTX,USBRX, 9600); +Serial pc(USBTX,USBRX, BAUD); // RAM ------------------------------------------------------------------------ @@ -61,6 +66,7 @@ int main() { + dev.baud(BAUD); // Start tasks osThreadCreate(osThread(pc2dev), NULL); osThreadCreate(osThread(dev2pc), NULL);
diff -r 98865e300cd5 -r 14d1cec89444 BufferedSoftSerial.lib --- a/BufferedSoftSerial.lib Sun May 10 08:15:36 2020 +0000 +++ b/BufferedSoftSerial.lib Tue May 12 05:42:35 2020 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/kenjiArai/code/BufferedSoftSerial/#f186cc69acdf +https://os.mbed.com/users/kenjiArai/code/BufferedSoftSerial/#7ab9ab7210e7