24 uint8_t
PL2303::Init(uint8_t parent, uint8_t port,
bool lowspeed) {
27 uint8_t buf[constBufSize];
127 goto FailSetDevTblEntry;
131 for(uint8_t i = 0; i < num_of_conf; i++) {
138 goto FailGetConfDescr;
143 goto FailGetConfDescr;
161 goto FailSetConfDescr;
165 vendorRead( 0x84, 0x84, 0, buf );
166 vendorWrite( 0x04, 0x04, 0 );
167 vendorRead( 0x84, 0x84, 0, buf );
168 vendorRead( 0x83, 0x83, 0, buf );
169 vendorRead( 0x84, 0x84, 0, buf );
170 vendorWrite( 0x04, 0x04, 1 );
171 vendorRead( 0x84, 0x84, 0, buf);
172 vendorRead( 0x83, 0x83, 0, buf);
173 vendorWrite( 0, 0, 1 );
174 vendorWrite( 1, 0, 0 );
176 vendorWrite( 2, 0, 0x44 );
177 vendorWrite( 0x06, 0x06, 0 );
180 vendorWrite( 2, 0, 0x24 );
197 #ifdef DEBUG_USB_HOST
203 #ifdef DEBUG_USB_HOST
209 #ifdef DEBUG_USB_HOST
215 #ifdef DEBUG_USB_HOST
221 #ifdef DEBUG_USB_HOST
225 #ifdef DEBUG_USB_HOST
uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr)
#define USB_ERROR_EPINFO_IS_NULL
virtual uint8_t OnInit(ACM *pacm)
uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
PL2303(USB *pusb, CDCAsyncOper *pasync)
uint8_t setConf(uint8_t addr, uint8_t ep, uint8_t conf_value)
EpInfo epInfo[ACM_MAX_ENDPOINTS]
#define NotifyFailGetDevDescr(...)
uint8_t setEpInfoEntry(uint8_t addr, uint8_t epcount, EpInfo *eprecord_ptr)
virtual void FreeAddress(uint8_t addr)=0
virtual UsbDevice * GetUsbDevicePtr(uint8_t addr)=0
uint8_t setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr)
#define NotifyFailGetConfDescr(...)
virtual uint8_t AllocAddress(uint8_t parent, bool is_hub=false, uint8_t port=0)=0
#define USB_ERROR_CLASS_INSTANCE_ALREADY_IN_USE
#define USB_ERROR_ADDRESS_NOT_FOUND_IN_POOL
#define USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED
uint8_t bNumConfigurations
#define USB_ERROR_OUT_OF_ADDRESS_SPACE_IN_POOL
AddressPool & GetAddressPool()
#define NotifyFailSetConfDescr(...)
uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
defined(USB_METHODS_INLINE)
#define NotifyFailSetDevTblEntry(...)