File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed 
hardware/digistump/avr/libraries/DigisparkCDC Expand file tree Collapse file tree 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)
1616
1717uchar              sendEmptyFrame;
1818static  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
2019
2120DigiCDCDevice::DigiCDCDevice (void ){}
2221
@@ -40,13 +39,10 @@ void DigiCDCDevice::flush(){
4039void  DigiCDCDevice::begin (){
4140
4241    usbBegin ();
42+     DigiCDCDevice::delay (500 );// delay to allow enumeration and such
4343
4444}
45- void  DigiCDCDevice::setDelay (uint8_t  delay){
4645
47-     cdcDelay = delay;
48- 
49- }
5046size_t  DigiCDCDevice::write (uint8_t  c)
5147{
5248    if (RingBuffer_IsFull (&txBuf))
@@ -57,7 +53,7 @@ size_t DigiCDCDevice::write(uint8_t c)
5753    else 
5854    {
5955        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 
6157        return  1 ;
6258    }
6359
Original file line number Diff line number Diff line change @@ -38,7 +38,6 @@ class DigiCDCDevice  : public Stream {
3838    public: 
3939        DigiCDCDevice ();
4040        void  begin (), begin(unsigned  long  x);
41-         void  setDelay (uint8_t  delay);
4241        void  end ();
4342        void  refresh ();
4443        void  task ();
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments