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:44a3005d4f20, 2018-11-24 (annotated)
- Committer:
- mfwic
- Date:
- Sat Nov 24 18:22:31 2018 +0000
- Revision:
- 0:44a3005d4f20
- Child:
- 1:9f8583ba2431
1st commit after starting minor edits from base code. Major sections will be deleted in this version.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mfwic | 0:44a3005d4f20 | 1 | #ifndef SERIAL_H |
| mfwic | 0:44a3005d4f20 | 2 | #define SERIAL_H |
| mfwic | 0:44a3005d4f20 | 3 | |
| mfwic | 0:44a3005d4f20 | 4 | #include "mbed.h" |
| mfwic | 0:44a3005d4f20 | 5 | |
| mfwic | 0:44a3005d4f20 | 6 | #define MAXRXBUF 80 |
| mfwic | 0:44a3005d4f20 | 7 | #define CR 0x0d |
| mfwic | 0:44a3005d4f20 | 8 | |
| mfwic | 0:44a3005d4f20 | 9 | extern struct serialStatusBits serialStatus; |
| mfwic | 0:44a3005d4f20 | 10 | |
| mfwic | 0:44a3005d4f20 | 11 | struct serialStatusBits |
| mfwic | 0:44a3005d4f20 | 12 | { |
| mfwic | 0:44a3005d4f20 | 13 | unsigned int command:1; // command available flag |
| mfwic | 0:44a3005d4f20 | 14 | unsigned int repeat:1; // repeat flag |
| mfwic | 0:44a3005d4f20 | 15 | unsigned int computer:1; // computer flag |
| mfwic | 0:44a3005d4f20 | 16 | unsigned int command2:1; // command available flag on serial 2 |
| mfwic | 0:44a3005d4f20 | 17 | unsigned int spare:12; |
| mfwic | 0:44a3005d4f20 | 18 | }; |
| mfwic | 0:44a3005d4f20 | 19 | |
| mfwic | 0:44a3005d4f20 | 20 | extern char strbuf[100]; |
| mfwic | 0:44a3005d4f20 | 21 | extern char rxbuf[MAXRXBUF+1]; |
| mfwic | 0:44a3005d4f20 | 22 | extern volatile unsigned int bufloc; |
| mfwic | 0:44a3005d4f20 | 23 | extern Serial pc; |
| mfwic | 0:44a3005d4f20 | 24 | |
| mfwic | 0:44a3005d4f20 | 25 | void initSerial(void); |
| mfwic | 0:44a3005d4f20 | 26 | void sendSerial(char *buf); |
| mfwic | 0:44a3005d4f20 | 27 | void sendCRLF(void); |
| mfwic | 0:44a3005d4f20 | 28 | |
| mfwic | 0:44a3005d4f20 | 29 | #endif |