You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: STM32F1/cores/maple/usb_serial.h
+22-13Lines changed: 22 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -44,41 +44,50 @@ class USBSerial : public Stream {
44
44
45
45
voidbegin(void);
46
46
47
-
// Roger Clark. Added dummy function so that existing Arduino sketches which specify baud rate will compile.
48
-
voidbegin(unsignedlong);
49
-
voidbegin(unsignedlong, uint8_t);
47
+
// Roger Clark. Added dummy function so that existing Arduino sketches which specify baud rate will compile.
48
+
voidbegin(unsignedlong);
49
+
voidbegin(unsignedlong, uint8_t);
50
50
voidend(void);
51
51
52
-
operatorbool() { returntrue; } // Roger Clark. This is needed because in cardinfo.ino it does if (!Serial) . It seems to be a work around for the Leonardo that we needed to implement just to be compliant with the API
53
-
54
52
virtualintavailable(void);// Changed to virtual
55
53
56
54
uint32 read(uint8 * buf, uint32 len);
57
-
// uint8 read(void);
55
+
// uint8 read(void);
58
56
59
-
// Roger Clark. added functions to support Arduino 1.0 API
57
+
// Roger Clark. added functions to support Arduino 1.0 API
60
58
virtualintpeek(void);
61
59
virtualintread(void);
62
60
intavailableForWrite(void);
63
61
virtualvoidflush(void);
64
-
65
-
62
+
63
+
66
64
size_twrite(uint8);
67
65
size_twrite(constchar *str);
68
66
size_twrite(const uint8*, uint32);
69
67
70
68
uint8 getRTS();
71
69
uint8 getDTR();
72
-
uint8 isConnected();
73
70
uint8 pending();
74
71
72
+
/* SukkoPera: This is the Arduino way to check if an USB CDC serial
73
+
* connection is open.
74
+
75
+
* Used for instance in cardinfo.ino.
76
+
*/
77
+
operatorbool();
78
+
79
+
/* Old libmaple way to check for serial connection.
0 commit comments