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: mbed
inc/serial.h@0:b3410a1e9843, 2022-01-27 (annotated)
- Committer:
- Slord2142
- Date:
- Thu Jan 27 21:58:14 2022 +0000
- Revision:
- 0:b3410a1e9843
This is the newest version I am playing around with
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Slord2142 | 0:b3410a1e9843 | 1 | #ifndef SERIAL_H |
Slord2142 | 0:b3410a1e9843 | 2 | #define SERIAL_H |
Slord2142 | 0:b3410a1e9843 | 3 | |
Slord2142 | 0:b3410a1e9843 | 4 | #include "mbed.h" |
Slord2142 | 0:b3410a1e9843 | 5 | |
Slord2142 | 0:b3410a1e9843 | 6 | #define MAXRXBUF 80 |
Slord2142 | 0:b3410a1e9843 | 7 | #define CR 0x0d |
Slord2142 | 0:b3410a1e9843 | 8 | |
Slord2142 | 0:b3410a1e9843 | 9 | extern struct serialStatusBits serialStatus; |
Slord2142 | 0:b3410a1e9843 | 10 | |
Slord2142 | 0:b3410a1e9843 | 11 | struct serialStatusBits |
Slord2142 | 0:b3410a1e9843 | 12 | { |
Slord2142 | 0:b3410a1e9843 | 13 | unsigned int command:1; // command available flag |
Slord2142 | 0:b3410a1e9843 | 14 | unsigned int repeat:1; // repeat flag |
Slord2142 | 0:b3410a1e9843 | 15 | unsigned int computer:1; // computer flag |
Slord2142 | 0:b3410a1e9843 | 16 | unsigned int command2:1; // command available flag on serial 2 |
Slord2142 | 0:b3410a1e9843 | 17 | unsigned int spare:12; |
Slord2142 | 0:b3410a1e9843 | 18 | }; |
Slord2142 | 0:b3410a1e9843 | 19 | |
Slord2142 | 0:b3410a1e9843 | 20 | extern char strbuf[150]; |
Slord2142 | 0:b3410a1e9843 | 21 | extern char rxbuf[MAXRXBUF+1]; |
Slord2142 | 0:b3410a1e9843 | 22 | extern volatile unsigned int bufloc; |
Slord2142 | 0:b3410a1e9843 | 23 | extern Serial pc; |
Slord2142 | 0:b3410a1e9843 | 24 | |
Slord2142 | 0:b3410a1e9843 | 25 | void initSerial(void); |
Slord2142 | 0:b3410a1e9843 | 26 | void sendSerial(char *buf); |
Slord2142 | 0:b3410a1e9843 | 27 | void sendCRLF(void); |
Slord2142 | 0:b3410a1e9843 | 28 | void showRangeError(int , int , float ); |
Slord2142 | 0:b3410a1e9843 | 29 | |
Slord2142 | 0:b3410a1e9843 | 30 | #endif |