[ECOS] USB slave
wavecom wavecom
wavecomw@yahoo.com
Fri Sep 7 06:52:00 GMT 2007
Hi All,
I have theoretical question about behavior usb-slave
implementation in eCos:
I have implemented my_class_control_fn:
#define MY_DEF_REQEST 20
usbs_control_return
my_class_control_fn(usbs_control_endpoint* endpoint)
{
usbs_control_return result =
USBS_CONTROL_RETURN_UNKNOWN;
usb_devreq* req = (usb_devreq*)
endpoint->control_buffer;
int length;
int direction;
int recipient;
length = (req->length_hi << 8) |
req->length_lo;
direction = req->type &
USB_DEVREQ_DIRECTION_MASK;
recipient = req->type &
USB_DEVREQ_RECIPIENT_MASK;
if (MY_DEF_REQEST == req->request) {
result = USBS_CONTROL_RETURN_HANDLED;
} else {
result = USBS_CONTROL_RETURN_UNKNOWN;
}
return result;
}
Than:
usbs_at91_ep0.class_control_fn = my_class_control_fn;
My question is what eCos should do, when have received
request with bmRequestType CLASS and bRequest = =
MY_DEF_REQEST?
Would it send ACK, STALL, or would it be other action?
Thanks,
Regards,
Pete
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list