diff options
| author | David Madison <dmadison@users.noreply.github.com> | 2019-02-15 14:44:45 -0500 | 
|---|---|---|
| committer | David Madison <dmadison@users.noreply.github.com> | 2019-02-17 17:06:52 -0500 | 
| commit | 3364c6f736a77e60f26273af0bb021f4507dd1b9 (patch) | |
| tree | 9b94c85506ed829a0deede10f9cdd220bf888699 /cores/arduino/USBCore.cpp | |
| parent | 2307486942f246aca947d770849b5d05822d7d17 (diff) | |
Removed USB CDC Serial
This will compile but will NOT enumerate properly without a config descriptor. You've been warned...
Diffstat (limited to 'cores/arduino/USBCore.cpp')
| -rw-r--r-- | cores/arduino/USBCore.cpp | 54 | 
1 files changed, 7 insertions, 47 deletions
| diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index b5a2be3..6146954 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -327,12 +327,10 @@ int USB_Send(u8 ep, const void* d, int len)  u8 _initEndpoints[USB_ENDPOINTS] =  { -	0,                      // Control Endpoint -	 -	EP_TYPE_INTERRUPT_IN,   // CDC_ENDPOINT_ACM -	EP_TYPE_BULK_OUT,       // CDC_ENDPOINT_OUT -	EP_TYPE_BULK_IN,        // CDC_ENDPOINT_IN - +	0,                         // Control Endpoint +	// EP_TYPE_INTERRUPT_IN,   // CDC_ENDPOINT_ACM +	// EP_TYPE_BULK_OUT,       // CDC_ENDPOINT_OUT +	// EP_TYPE_BULK_IN,        // CDC_ENDPOINT_IN  	// Following endpoints are automatically initialized to 0  }; @@ -369,21 +367,6 @@ void InitEndpoints()  	UERST = 0;  } -//	Handle CLASS_INTERFACE requests -static -bool ClassInterfaceRequest(USBSetup& setup) -{ -	u8 i = setup.wIndex; - -	if (CDC_ACM_INTERFACE == i) -		return CDC_Setup(setup); - -#ifdef PLUGGABLE_USB_ENABLED -	return PluggableUSB().setup(setup); -#endif -	return false; -} -  static int _cmark;  static int _cend;  void InitControl(int end) @@ -462,34 +445,14 @@ int USB_RecvControl(void* d, int len)  	return len;  } -static u8 SendInterfaces() -{ -	u8 interfaces = 0; - -	CDC_GetInterface(&interfaces); - -#ifdef PLUGGABLE_USB_ENABLED -	PluggableUSB().getInterface(&interfaces); -#endif - -	return interfaces; -} -  //	Construct a dynamic configuration descriptor  //	This really needs dynamic endpoint allocation etc  //	TODO  static  bool SendConfiguration(int maxlen)  { -	//	Count and measure interfaces -	InitControl(0); -	u8 interfaces = SendInterfaces(); -	ConfigDescriptor config = D_CONFIG(_cmark + sizeof(ConfigDescriptor),interfaces); - -	//	Now send them -	InitControl(maxlen); -	USB_SendControl(0,&config,sizeof(ConfigDescriptor)); -	SendInterfaces(); +	// InitControl(maxlen); +	// USB_SendControl( * Config Descriptor Here * );  	return true;  } @@ -632,8 +595,7 @@ ISR(USB_COM_vect)  	}  	else  	{ -		InitControl(setup.wLength);		//	Max length of transfer -		ok = ClassInterfaceRequest(setup); +		ok = true;  	}  	if (ok) @@ -754,8 +716,6 @@ ISR(USB_GEN_vect)  	//	Start of Frame - happens every millisecond so we use it for TX and RX LED one-shot timing, too  	if (udint & (1<<SOFI))  	{ -		USB_Flush(CDC_TX);				// Send a tx frame if found -		  		// check whether the one-shot period has elapsed.  if so, turn off the LED  		if (TxLEDPulse && !(--TxLEDPulse))  			TXLED0; | 
