Topic for #qi-hardware is now Copyleft hardware - http://qi-hardware.com | hardware hackers join here to discuss Ben NanoNote, atben / atusb 802.15.4 wireless, and other community driven hw projects | public logging at http://en.qi-hardware.com/irclogs
wej has joined #qi-hardware
wej has quit [Ping timeout: 260 seconds]
nikias has joined #qi-hardware
wej has joined #qi-hardware
wej has quit [Ping timeout: 264 seconds]
urandom__ has quit [Quit: Konversation terminated!]
<kyak>
wpwrak: we are almost there. Openwrt is too smart, and complains that ubbctl is missing dependency for libubb.so.0.0.0. This is because libubb package only provides libubb.so. I can install the symlink from package, but probably it's better done in Makefile
<kyak>
wpwrak: perhaps another option would be to use the soname without $(LIBVERSION)
jekhor has quit [Ping timeout: 276 seconds]
LunaVorax has joined #qi-hardware
jekhor has joined #qi-hardware
megha has joined #qi-hardware
<wpwrak>
hmm, you mean call the file libubb.so.0.0.0 (instead of libubb.so) and change the soname from ibubb.so.0.0.0 to libubb.so ?
<wpwrak>
or eliminate the version entirely ? in this case, how would ldconfig know what to do ?
<wolfspraul>
argh :-)
<wolfspraul>
wpwrak: made another change, let's see :-)
<wpwrak>
did CPCCR.PCS change from 1 to 0 in the last year or so ? (i.e., that the clock that drives MSC and such is now PLL/2 instead of PLL/1)
<wpwrak>
either that, or i always got the UBB-VGA clock calculations wrong
<kyak>
wpwrak: name the file libubb.so and set soname to libubb.so, or provide libubb.so and libubb.so.0.0.0 (symlink) and change soname to libubb.so.0.0.0
<kyak>
currently soname is libubb.so.0.0.0, but libubb.so.0.0.0 is not provided
<kyak>
just the libubb.so is provided
<wpwrak>
how does ldconfig know the version if neither file nor soname has it ?
<wpwrak>
or are you saying i can just omit the version completely ?
<kyak>
hmm, dunno, i'm not sure if it possible to omit the version completely :)
<kyak>
i'm just guessing it should work
<kyak>
and yeah, that's what i meant - omit the version completely
<wpwrak>
seems to work. kewl. less bureaucracy ;-)
megha has joined #qi-hardware
<kyak>
yeah, just tried it, too.. And you don't need ldconfig in this case
<wpwrak>
even better :)
<wpwrak>
what do i put into "suggested by ..." ? your real name doesn't seem to be on record :)
<kyak>
wpwrak: what happens if i try to SET pin that is IN?
<wpwrak>
and this is the secret new project :)
<wpwrak>
it'll remember the "1" until you turn it into an output
<wpwrak>
important for avoiding glitches
<larsc>
not so secret anymore ;)
<kyak>
wpwrak: just a suggestion, what if we could pass an argument to ubb_open to initiailize chosen pins as outputs (the rest are initialized as inputs)?
<wpwrak>
would there be a problem in your application if the pin transitions first to input ?
<wpwrak>
btw, you can set any number of pins at the same time with IN, OUT, SET, CLR. you don't have to do it one by one.
<kyak>
well, i believe that it's unlikely someone will change the pin from input to output or vice versa at runtime, so it makes sense to do that once during initialization
<kyak>
yeah, these macros accept masks, that's great
<kyak>
also i was thinking about ubb_write function, that would accept mask of pins to write and a value to write and call SET or CLR under the hood
<wpwrak>
there are many protocols that switch the direction of pins. not everything is SPI or UART ;-)
<kyak>
ok thne :)
<wpwrak>
ubb_write would be tricky because it would be non-atomic
<wpwrak>
that is, unless you set them all to the same value
<kyak>
indeed.. why is it a problem?
<wpwrak>
being non-atomic ? well, people may assume operations are atomic. and if they aren't, you get races
<kyak>
hm, right..
<kyak>
wpwrak: does PIN accept mask as well?
<kyak>
i can't decrypt the (!!(PDPIN & (mask))) --)
<wpwrak>
it says so, doesn't it ? ;-)
<wpwrak>
what happens is that you get 0 if ALL pins in the mask are 0. else, you get 1.
<kyak>
that's what i thought
<kyak>
but what if i want individual statuses of all pins?
<wpwrak>
!! is simply a normalization. 0 stays 0, everything else becomes 1
<wpwrak>
that's why the registers are available as well :)
<wpwrak>
SET, PIN, etc. are just simplifications for basic tasks
<wpwrak>
if you need something more complicated, you use PDxxx
<wpwrak>
if you still want more, there's a bunch of additional registers to play with
<kyak>
yeah, i understand, but i'm trying to think from a library point of view :)
<kyak>
if i have a function that does (PDPIN & (mask)) and returns the result as a mask, would it be atomic?