[libhid-discuss] HID_Interrupt_write reports OK, but no action on device..
Charles Lepple
clepple at ghz.cc
Tue Sep 1 11:33:52 UTC 2009
On Sep 1, 2009, at 5:28 AM, Neil Sutton wrote:
> On Tue, Sep 1, 2009 at 12:02 AM, Charles Lepple <clepple at ghz.cc>
> wrote:
>
> On Aug 31, 2009, at 4:24 PM, Neil Sutton wrote:
>
> In Windows I successfully control the device using VB and issue the
> commands to control the relays using Convert.ToByte(Int)
> The board has 4 relays and by issuing Convert.ToByte(6) for example
> I can open a single relay, Convert.ToByte(5) closes the relay.
> (7) and (8) control another relay.. you get the idea.
>
> In that case, you probably want to send 6 and 5, or 7 and 8.
>
> > Would just sending 0x35 via libhid be the equivilent of
> using .net's Convert.ToByte(5) ?
> > I have really confused myself with how the data should be
> presented to libhid..
I would assume that if the argument to Convert.ToByte() is an integer
less than 255, then the C equivalent would be that same integer. I
think you would only use 0x35 if you were passing a string "5" to
Convert.ToByte(). Someone who actually knows .NET can feel free to
correct me, though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20090901/084aa4bb/attachment.htm>
More information about the libhid-discuss
mailing list