File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
features/unsupported/USBDevice/USBSerial Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,10 @@ bool USBCDC::send(uint8_t * buffer, uint32_t size) {
127
127
return USBDevice::write (EPBULK_IN, buffer, size, MAX_CDC_REPORT_SIZE);
128
128
}
129
129
130
+ bool USBCDC::send_NB (uint8_t * buffer, uint32_t size) {
131
+ return USBDevice::writeNB (EPBULK_IN, buffer, size, MAX_CDC_REPORT_SIZE);
132
+ }
133
+
130
134
bool USBCDC::readEP (uint8_t * buffer, uint32_t * size) {
131
135
if (!USBDevice::readEP (EPBULK_OUT, buffer, size, MAX_CDC_REPORT_SIZE))
132
136
return false ;
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ class USBCDC: public USBDevice {
70
70
virtual const uint8_t * configurationDesc ();
71
71
72
72
/*
73
- * Send a buffer
73
+ * Send a buffer. Warning: blocking
74
74
*
75
75
* @param endpoint endpoint which will be sent the buffer
76
76
* @param buffer buffer to be sent
@@ -79,6 +79,16 @@ class USBCDC: public USBDevice {
79
79
*/
80
80
bool send (uint8_t * buffer, uint32_t size);
81
81
82
+ /*
83
+ * Send a buffer. Warning: non blocking
84
+ *
85
+ * @param endpoint endpoint which will be sent the buffer
86
+ * @param buffer buffer to be sent
87
+ * @param size length of the buffer
88
+ * @returns true if successful
89
+ */
90
+ bool send_NB (uint8_t * buffer, uint32_t size);
91
+
82
92
/*
83
93
* Read a buffer from a certain endpoint. Warning: blocking
84
94
*
You can’t perform that action at this time.
0 commit comments