Hi everybody, I want to write to I/O port by vendor command. But it doennot work. The firmware is like this:
case VR_WRITE_PORTA: //0xD5 while(EP0CS & bmEPBUSY); OEA = 0xff; SYNCDELAY; IOA = EP0BUF[0]; SYNCDELAY; EP0BCH = 0x00; SYNCDELAY; EP0BCL = 0x01; // Arm endpoint with # bytes to transfer SYNCDELAY; EP0CS |= bmHSNAK; // Acknowledge handshake phase of device request SYNCDELAY; break;