[an error occurred while processing this directive]
|
Только что отправил ответ для check, где пожалоаля на инструментарий :)). USBVerify уже попробовал, эта прога говорит "The USB device context could not be obtained. Certain features may be disabled for this node". И не знаю почему...
Вот мой обработчик SET_CONF:
setConfiguration:
lds r17, cRX0Buf + 2
cpi r17, 0
breq stc_dis
CONSTtoRAM cDtapid, 0
CONSTtoRAM cStalld, 0
FLUSHTX1
USB_WRITE EPC1, EP_EN + 1 ; EP1 at adr 1
FLUSHRX1
USB_WRITE EPC2, EP_EN + 2 ; EP2 at adr 2
USB_WRITE RXC1, RX_EN ; RX1 enable
ret
stc_dis:
USB_WRITE EPC1, 0
USB_WRITE EPC2, 0
ret
;==================================
Вот оригинал от NS:
/**********************************************************************/
/* The SET_CONFIGURATION request is done here */
/**********************************************************************/
void setconfiguration(void)
{
usb_cfg = usb_buf[2]; /*set the configuration # */
if (usb_buf[2]!=0) /*set the configuration */
{
dtapid = 0; /*FIRST PID is DATA0 */
stalld = 0; /*nothing stalled */
FLUSHTX1; /*flush TX1 and disable */
write_usb(EPC1,EP_EN+01); /*enable EP1 at adr 1 */
FLUSHRX1; /*flush RX1 and disable */
write_usb(EPC2,EP_EN+02); /*enable EP2 at adr 2 */
write_usb(RXC1,RX_EN); /*enable RX1 */
FLUSHTX3; /*flush TX1 and disable */
write_usb(EPC5,EP_EN+05); /*enable EP5 at adr 5 */
FLUSHRX3; /*flush RX3 and disable */
write_usb(EPC6,EP_EN+06); /*enable EP6 at adr 6 */
write_usb(RXC3,RX_EN); /*enable RX3 */
}
else /*unconfigure the device */
{
write_usb(EPC1,0); /*disable EP1 */
write_usb(EPC2,0); /*disable EP2 */
write_usb(EPC5,0); /*disable EP5 */
write_usb(EPC6,0); /*disable EP6 */
}
}
;=====================================
В этом обработчике контроллер не затрагивается!
Да и в W2k и W98 всё работает :(((.
E-mail: info@telesys.ru