generalize blink1-lib interface with blink1raw-lib backend #1

Closed
wants to merge 11 commits into
from

Conversation

Projects
None yet
2 participants
@dylex

dylex commented Dec 6, 2012

This allows some programs using blink1-lib to use the hidraw backend without the need for libusb. I plan to add more functionality to the blink1raw-lib interface in the future, but this was enough to build blink1raw against. So far this is not tested because I don't have my blink(1) yet, but it at least builds.

There are other ways of doing this and this is just a quick hack, but it would be nice if the blink1-lib code that knows how to generate the commands and only depends on a read() and write() interface were independent of the particular libusb backend, so that it could be used in other situations.

dylex added some commits Dec 7, 2012

Fix incorrect time value "dms % 0xFF"
The time is meant to be split into separate bytes, so these should be "dms &
0xFF" or "dms % 0x100".
Fix blink1raw help message.
Had stray comma and unescaped percent.  Use fputs instead since it's a fixed
string.
generalize blink1-lib interface with blink1-common and add compatible…
… blink1raw-lib, which blink1raw now uses

This allows some programs using blink1-lib to use the hidraw backend without
the need for libusb.  I plan to add more functionality to the blink1raw-lib
interface.  So far this is not tested because I don't have my blink(1) yet, but
it at least builds.
@dylex

This comment has been minimized.

Show comment
Hide comment
@dylex

dylex Dec 7, 2012

The first few commits also include some simple fixes of obviously incorrect code, including "dms % 0xFF".

dylex commented Dec 7, 2012

The first few commits also include some simple fixes of obviously incorrect code, including "dms % 0xFF".

blink1raw: simple implementation of blink1_open
Uses /sys/bus/hid/devices to find first matching hidraw device in /dev.
@todbot

This comment has been minimized.

Show comment
Hide comment
@todbot

todbot Dec 7, 2012

Owner

This looks really great, thanks! I'll need to see how (if at all) this impacts all the downstream users and archs of blink1-lib, and I won't be able to get to that until late December I think.

Owner

todbot commented Dec 7, 2012

This looks really great, thanks! I'll need to see how (if at all) this impacts all the downstream users and archs of blink1-lib, and I won't be able to get to that until late December I think.

todbot added a commit that referenced this pull request Jun 24, 2014

@ellson ellson referenced this pull request Jan 9, 2015

Open

Kernel crash on Linux #198

vlow pushed a commit to vlow/blink1 that referenced this pull request Apr 3, 2016

Merge pull request #1 from piohhmy/missing-init
Adding missing __init__.py file

@dylex dylex closed this Aug 15, 2017

todbot added a commit that referenced this pull request Jan 17, 2018

todbot added a commit that referenced this pull request Jan 17, 2018

todbot added a commit that referenced this pull request Jan 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment