Commit 6e29ad8 1 parent 7f0e412 commit 6e29ad8 Copy full SHA for 6e29ad8
File tree 2 files changed +2
-7
lines changed
hardware/digistump/avr/libraries/DigisparkCDC
2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ and Digistump LLC (digistump.com)
16
16
17
17
uchar sendEmptyFrame;
18
18
static uchar intr3Status; /* used to control interrupt endpoint transmissions */
19
- uint8_t cdcDelay = 45 ; // 9 works if sending short strings only or not using F() - set with setDelay
20
19
21
20
DigiCDCDevice::DigiCDCDevice (void ){}
22
21
@@ -40,13 +39,10 @@ void DigiCDCDevice::flush(){
40
39
void DigiCDCDevice::begin (){
41
40
42
41
usbBegin ();
42
+ DigiCDCDevice::delay (500 );// delay to allow enumeration and such
43
43
44
44
}
45
- void DigiCDCDevice::setDelay (uint8_t delay){
46
45
47
- cdcDelay = delay;
48
-
49
- }
50
46
size_t DigiCDCDevice::write (uint8_t c)
51
47
{
52
48
if (RingBuffer_IsFull (&txBuf))
@@ -57,7 +53,7 @@ size_t DigiCDCDevice::write(uint8_t c)
57
53
else
58
54
{
59
55
RingBuffer_Insert (&txBuf,c);
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
+ DigiCDCDevice::delay (5 ); // gives 4.2-4.7ms per character for usb transfer at low speed
61
57
return 1 ;
62
58
}
63
59
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ class DigiCDCDevice : public Stream {
38
38
public:
39
39
DigiCDCDevice ();
40
40
void begin (), begin(unsigned long x);
41
- void setDelay (uint8_t delay);
42
41
void end ();
43
42
void refresh ();
44
43
void task ();
You can’t perform that action at this time.
0 commit comments