Re: Castle USB API: Interrupt endpoints



In message <e8980cbf4d.davehigton@xxxxxxxxxxxxx>
Dave Higton <davehigton@xxxxxxxxxxxxx> wrote:

> In message <e7436cbd4d.davehigton@xxxxxxxxxxxxx>
> Dave Higton <davehigton@xxxxxxxxxxxxx> wrote:
>
> > Under the Castle USB API, how does one send bytes to an interrupt
> > endpoint?
> >
> > The output stream to the endpoint opens fine; I get a handle, and I can
> > find the buffer handle and interrogate the buffer. I can't send bytes
> > by BPUT# as there is an immediate error. I can put bytes into the
> > buffer by OS_Byte 138, and I can see bit 0 of the buffer's flags go
> > from 0 to 1; but the buffer never empties, and no bytes are sent to
> > the device.
> >
> > I haven't found any code examples for interrupt endpoints anywhere,
> > and there is no help whatsoever in Castle's API document.
>
> Is there any example code out there for transferring bytes to/from
> interrupt endpoints from an application? Surely I don't have to
> write a module to do it?

Reading is no problem - you appear to have experienced trouble writing,
which hasn't been tested as thoroughly.

This code works well for reading from a mouse (run from in a taskwindow):

10 : f%=0
20 : ON ERROR PROCerror
30 : f%=OPENIN"usb10#sleep;interrupt:"
40 : DIM buf% 8
50 : WHILE1
60 : SYS"OS_GBPB", 4, f%, buf%, 4
70 : PRINTbuf%?0;" ";buf%?1;" ";buf%?2;" ";buf%?3
80 : ENDWHILE
90 :
100 : DEFPROCerror
110 : IF f% <> 0 THEN CLOSE#f%
120 : ERROR EXT ERR, REPORT$+" at line "+STR$ERL
130 : END
140 : ENDPROC


--
Dan Ellis
.



Relevant Pages

  • Castle USB API: Interrupt endpoints
    ... Under the Castle USB API, how does one send bytes to an interrupt ... The output stream to the endpoint opens fine; I get a handle, ... find the buffer handle and interrogate the buffer. ... I haven't found any code examples for interrupt endpoints anywhere, ...
    (comp.sys.acorn.programmer)
  • Re: USB Status Pipe Strategy
    ... I guess what concerns me is how fast the host may actually poll. ... the time specification that is put on an interrupt endpoint is ... You're right in that this could be done as a Bulk Endpoint. ... I could continuously send an URB from the ...
    (microsoft.public.development.device.drivers)
  • USBEHCI.SYS bug with high-bandwidth interrupt endpoints
    ... I was investigating USB 2.0 high-bandwidth interrupt ... three transactions per microframe with a maximum packet size of 1024 ... bytes in the endpoint descriptor. ...
    (microsoft.public.development.device.drivers)
  • Re: Castle USB API: Interrupt endpoints
    ... > Under the Castle USB API, how does one send bytes to an interrupt ... > The output stream to the endpoint opens fine; I get a handle, ... > find the buffer handle and interrogate the buffer. ... > I haven't found any code examples for interrupt endpoints anywhere, ...
    (comp.sys.acorn.programmer)
  • Re: USB RNDIS Debug with USB Chief
    ... "one is that the INTERRUPT IN endpoint, used to notify the HOST of a new ... RndisMessage, is shows as not completed in the USB Chief. ... When XP send out RNDIS Write message through endpoint 0, ...
    (microsoft.public.windowsce.platbuilder)