Digital Me

Random contributions to digital noise

Experimental HexWax expandIO-USB Library on Git

Saturday November 20, 2010 @ 12:19 PM (PST)

I have added experimental library for HexWax expandIO-USB to GitHub . It should work fine for official evaluation board as well as it works for mine custom made one. The library is still in early stage so some significant changes are to be expected to both code and code structure.

Read only repository is here: git://github.com/mlalevic/HexWax-expandIO-Python-Library.git

Nearly all commands from the firmware are covered, and I have added two examples – one single threaded and one multi-threaded – the same example – blinking LEDs.

See how simple it is:

All commands are created like SetBit(“TRISC”, 6, 0), method pack() is used to get byte array representation for sending to device. Unpacking is done by a corresponding unpack class – like SetBitUnpack, and it unpacks input packet into member attributes.

Here’s multi-threaded version which is even simpler:

UsbBackgroundRead spawns a thread to read data from USB device in background. This is useful if the device can have external events – interrupts.

Anyway, got to do some more documentation on it and add more examples soon.

Comments

New comment

required, won't be displayed

optional

Don't type anything here unless you're an evil robot:


And especially don't type anything here:

Basic XHTML (including links) is allowed, just don't try anything fishy. Your comment will be auto-formatted unless you use your own <p> tags for formatting. You're also welcome to use Textile.

Copyright © 2012 Mihailo Lalevic. All rights reserved.
Powered by Thoth.