* [ECOS] USB slave
@ 2007-09-07 6:52 wavecom wavecom
0 siblings, 0 replies; only message in thread
From: wavecom wavecom @ 2007-09-07 6:52 UTC (permalink / raw)
To: ecos-discuss
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-09-07 6:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-07 6:52 [ECOS] USB slave wavecom wavecom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).