File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
hardware/digistump/avr/libraries/DigisparkCDC Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ and Digistump LLC (digistump.com)
16
16
17
17
uchar sendEmptyFrame;
18
18
static uchar intr3Status; /* used to control interrupt endpoint transmissions */
19
-
19
+ uint8_t cdcDelay = 45 ; // 9 works if sending short strings only or not using F() - set with setDelay
20
20
21
21
DigiCDCDevice::DigiCDCDevice (void ){}
22
22
@@ -41,6 +41,11 @@ void DigiCDCDevice::begin(){
41
41
42
42
usbBegin ();
43
43
44
+ }
45
+ void DigiCDCDevice::setDelay (uint8_t delay){
46
+
47
+ cdcDelay = delay;
48
+
44
49
}
45
50
size_t DigiCDCDevice::write (uint8_t c)
46
51
{
@@ -52,7 +57,7 @@ size_t DigiCDCDevice::write(uint8_t c)
52
57
else
53
58
{
54
59
RingBuffer_Insert (&txBuf,c);
55
- DigiCDCDevice::delay (45 ); // ouch its slow but it ensures it will work no matter how long of a string is thrown at it
60
+ DigiCDCDevice::delay (cdcDelay ); // ouch its slow but it ensures it will work no matter how long of a string is thrown at it
56
61
return 1 ;
57
62
}
58
63
@@ -384,4 +389,4 @@ void usbFunctionWriteOut( uchar *data, uchar len )
384
389
} // extern "C"
385
390
#endif
386
391
387
- DigiCDCDevice SerialUSB;
392
+ DigiCDCDevice SerialUSB;
You can’t perform that action at this time.
0 commit comments