Arduino Libraries/USBHost/src/adk.cpp
/**
 * \brief ADK class constructor.
 */
\brief ADK class constructor.
\ brief ADK class constructor .
ADK::ADK(USBHost *p, const char* pmanufacturer,
				const char* pmodel,
				const char* pdescription,
				const char* pversion,
				const char* puri,
				const char* pserial) :
		manufacturer(pmanufacturer),
		model(pmodel),
		description(pdescription),
		version(pversion),
		uri(puri),
		serial(pserial),
		pUsb(p),
		bAddress(0),
		bNumEP(1),
		ready(false)
{
	for (uint32_t i = 0; i < ADK_MAX_ENDPOINTS; ++i)
	{
		epInfo[i].deviceEpNum	= 0;
		epInfo[i].hostPipeNum	= 0;
		epInfo[i].maxPktSize	= (i) ? 0 : 8;
		epInfo[i].epAttribs		= 0;
		epInfo[i].bmNakPower  	= (i) ? USB_NAK_NOWAIT : USB_NAK_MAX_POWER;
	}
	if (pUsb)
	{
		pUsb->RegisterDeviceClass(this);
	}
}
ADK :: ADK ( USBHost * p , const char * pmanufacturer , const char * pmodel , const char * pdescription , const char * pversion , const char * puri , const char * pserial ) : manufacturer ( pmanufacturer ) , model ( pmodel ) , description ( pdescription ) , version ( pversion ) , uri ( puri ) , serial ( pserial ) , pUsb ( p ) , bAddress ( 0 ) , bNumEP ( 1 ) , ready ( false ) { for ( uint32_t i = 0 ; i < ADK_MAX_ENDPOINTS ; ++ i ) { epInfo [ i ] . deviceEpNum = 0 ; epInfo [ i ] . hostPipeNum = 0 ; epInfo [ i ] . maxPktSize = ( i ) ? 0 : 8 ; epInfo [ i ] . epAttribs = 0 ; epInfo [ i ] . bmNakPower = ( i ) ? USB_NAK_NOWAIT : USB_NAK_MAX_POWER ; } if ( pUsb ) { pUsb -> RegisterDeviceClass ( this ) ; } }
\brief ADK class constructor.
\ brief ADK class constructor .
// Initialize endpoint data structures // Register in USB subsystem