#qi-hardware IRC log for Monday, 2013-01-07

qi-bot[commit] Werner Almesberger: libubb/Makefile: build also a shared version of libubb; better cleanup (master) http://qi-hw.com/p/ben-blinkenlights/64c14fb11:25
qi-bot[commit] Werner Almesberger: ubbctl/Makefile: make default build shared; add target "static" (master) http://qi-hw.com/p/ben-blinkenlights/7b8a2e111:25
qi-bot[commit] Werner Almesberger: ubbctl/Makefile: add copyright header (master) http://qi-hw.com/p/ben-blinkenlights/b557adf11:25
wpwrakkyak: i added the shared library build process for libubb. does it look good ? been a while since i did that the last time.11:26
qi-bot[commit] Werner Almesberger: ubblib/Makefile: don't generate the versioned shared library (master) http://qi-hw.com/p/ben-blinkenlights/2004d8c14:48
wpwrakgit rewrite-history s/ubblib/libubb/14:49
LunaVoraxI realized that Qi-Hw had no news for over a year15:48
LunaVoraxNo on-going projects?15:48
kyakwpwrak: lemme check16:21
kyakwpwrak: make[3]: *** No rule to make target `mmcclk.o', needed by `libubb.a'.  Stop.16:24
kyaki don't see mmcclk.c either16:24
kyakubb/mmclk.h is also not there16:25
kyakhey, it seems we revealed your next secret project :)16:26
kyakbtw, you probably already noticed, but naming of source and header (mmcclk.c/mmclk.h) is not consistent16:32
whitequarkkyak: how did you make that letter bold, you wizard?!16:33
kyakheh :) depends on your client, in irssi it's ^B16:34
whitequarkoh cool.16:34
kyakoh, wonder how it looks like in your web logs :)16:34
kyakdoes it support formatting?16:35
whitequarklike *this*, yes it does16:35
whitequarkmy eyes16:35
whitequarkwell I never knew about this formatting, so it doesn't16:36
whitequarkplus larsc's colored text breaks the underlying library I use16:36
-kyak:#qi-hardware- just a stupid test16:37
kyakah, this one appears as message16:37
whitequarkwhat was that?16:38
kyakit's called notice :)16:38
kristianpaulpurple :)16:54
wpwrak(mmcclk.c) oh crap. that's WIP. lemme unleak it ...17:19
wpwrakkyak: not very secret, though :)17:20
qi-bot[commit] Werner Almesberger: libubb/Makefile: unleak mmcclk.o and mis-typed mmclk.h (master) http://qi-hw.com/p/ben-blinkenlights/a593da017:21
wpwrakwolfspraul: btw, each push still produces "ssh: Could not resolve hostname fidelio.qi-hardware.com: No address associated with hostname"17:21
wpwrakfollowed by "error: hooks/post-receive exited with error code 255"17:21
wpwraksooner or later someone will overlook a real error after getting used to not paying attention to git push complaints17:22
wolfspraulok great, I finally found the old hostname in a script file18:18
wolfspraullet's see whether the problem is gone now, after your next commit we know...18:18
wpwraklet's see ...18:20
qi-bot[commit] Werner Almesberger: libubb/mmcclk.c: helper functions for selecting and configuring the MMC bus clock (master) http://qi-hw.com/p/ben-blinkenlights/1eb8e6418:20
wpwrakhmm, the error changed :)18:21
kyakwpwrak: 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 Makefile18:33
kyakwpwrak: perhaps another option would be to use the soname without $(LIBVERSION)18:43
wpwrakhmm, 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 ?18:52
wpwrakor eliminate the version entirely ? in this case, how would ldconfig know what to do ?18:52
wolfspraulargh :-)18:52
wolfspraulwpwrak: made another change, let's see :-)18:52
wpwrakpreparing another commit ...18:55
qi-bot[commit] Werner Almesberger: libubb/include/ubb/regs4740.h: add CPCCR (clock control register) (master) http://qi-hw.com/p/ben-blinkenlights/2f4e1bd19:15
wpwrakvictory ! no errors19:16
wpwrakwolfspraul: thanks a lot !19:16
wpwrakdid 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)19:19
wpwrakeither that, or i always got the UBB-VGA clock calculations wrong19:20
kyakwpwrak: 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.019:21
kyakcurrently soname is libubb.so.0.0.0, but libubb.so.0.0.0 is not provided19:22
kyakjust the libubb.so is provided19:22
wpwrakhow does ldconfig know the version if neither file nor soname has it ?19:23
wpwrakor are you saying i can just omit the version completely ?19:23
kyakhmm, dunno, i'm not sure if it possible to omit the version completely :)19:24
kyaki'm just guessing it should work19:24
kyakand yeah, that's what i meant - omit the version completely19:25
wpwrakseems to work. kewl. less bureaucracy ;-)19:26
kyakyeah, just tried it, too.. And you don't need ldconfig in this case19:26
wpwrakeven better :)19:27
wpwrakwhat do i put into "suggested by ..." ? your real name doesn't seem to be on record :)19:30
kyakdon't bother :)19:31
qi-bot[commit] Werner Almesberger: libubb/mmcclk.c (mmcclk_first): base clock calculation on state of CPCCR.PCS (master) http://qi-hw.com/p/ben-blinkenlights/b18d68819:33
qi-bot[commit] Werner Almesberger: libubb/Makefile: get rid of version bureaucracy (suggested by Kyak) (master) http://qi-hw.com/p/ben-blinkenlights/127e18d19:33
wpwrak"kyak" it is then19:33
wolfspraulno problem, thanks for insisting on the bug report19:34
wolfspraulsometimes I do hope bugs go away 'by themselves', but then most of the time it's not like that :-)19:34
wpwrakyeah, that could have been a lazy DNS19:36
qi-bot[commit] kyak: libubb: initial package (master) http://qi-hw.com/p/openwrt-packages/971cadb19:38
qi-bot[commit] kyak: ubbctl: initial package (master) http://qi-hw.com/p/openwrt-packages/66d3d0f19:38
kyakwpwrak: you can download built packages from http://downloads.qi-hardware.com/people/kyak/tmp/libubb_20130107-1_xburst.ipk and http://downloads.qi-hardware.com/people/kyak/tmp/ubbctl_20130107-1_xburst.ipk19:38
kyakthey should work, if you have the latest image (2012-10-24)19:40
wpwrakgreat, thanks a lot ! let's see what installs ...19:43
wpwrakkewl. works like a charm19:45
kyaknice! and thank you19:45
kyakwpwrak: what does "keep" argument do for ubb_open and ubb_close?19:51
wpwrakfor ubb_open it specified which GPIOs should be left in the state they have. e.g., don't change them to GPIO, etc.19:52
kyakalso, just wondering, why do use well-defined datatypes (like uint32_t), but sometimes use ill-defined (like int)?19:53
wpwrakfor ubb_close it specifies which GPIOs should not be reset to the state before calling ubb_open19:53
wpwraki use uint32_t when it's machine registers and such19:53
kyakah, ok, so it's like an exception mask.. 19:53
wpwrakint/unsigned for all the rest ;-)19:53
kyakkeep = 0 means "act upon all pins"19:54
kyakok, thanks for explanation :)19:55
kyak..also, i should read README more carefully..19:59
wpwrakyeah, it's all there ;-)20:02
qi-bot[commit] Werner Almesberger: ubb-patgen/hw/: schematics of a pattern generator based on UBB (master) http://qi-hw.com/p/ben-blinkenlights/ed91f6220:02
qi-bot[commit] Werner Almesberger: ubb-patgen/hw/labels.fig: cut-out labels for the wires (master) http://qi-hw.com/p/ben-blinkenlights/7c1f06520:02
qi-bot[commit] Werner Almesberger: ubb-patgen/: UBB-based pattern generator (WIP) (master) http://qi-hw.com/p/ben-blinkenlights/52ce19420:02
kyakwpwrak: what happens if i try to SET pin that is IN?20:02
wpwrakand this is the secret new project :)20:02
wpwrakit'll remember the "1" until you turn it into an output20:03
wpwrakimportant for avoiding glitches20:03
larscnot so secret anymore ;)20:03
kyakwpwrak: 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)?20:07
wpwrakwould there be a problem in your application if the pin transitions first to input ?20:10
wpwrakbtw, 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.20:10
kyakwell, 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 initialization20:11
kyakyeah, these macros accept masks, that's great20:12
kyakalso 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 hood20:13
wpwrakthere are many protocols that switch the direction of pins. not everything is SPI or UART ;-)20:15
kyakok thne :)20:16
wpwrakubb_write would be tricky because it would be non-atomic20:16
wpwrakthat is, unless you set them all to the same value20:16
kyakindeed.. why is it a problem?20:17
wpwrakbeing non-atomic ? well, people may assume operations are atomic. and if they aren't, you get races20:17
kyakhm, right..20:18
kyakwpwrak: does PIN accept mask as well?20:26
kyaki can't decrypt the (!!(PDPIN & (mask)))  --)20:26
wpwrakit says so, doesn't it ? ;-)20:26
wpwrakwhat happens is that you get 0 if ALL pins in the mask are 0. else, you get 1.20:27
kyakthat's what i thought20:27
kyakbut what if i want individual statuses of all pins?20:27
wpwrak!! is simply a normalization. 0 stays 0, everything else becomes 120:27
wpwrakthat's why the registers are available as well :)20:28
wpwrakSET, PIN, etc. are just simplifications for basic tasks20:28
wpwrakif you need something more complicated, you use PDxxx20:28
wpwrakif you still want more, there's a bunch of additional registers to play with20:29
kyakyeah, i understand, but i'm trying to think from a library point of view :)20:29
kyakif i have a function that does (PDPIN & (mask)) and returns the result as a mask, would it be atomic?20:30
kyakok, then it is ubb_read :)20:32
viric!0 is 1 ?20:39
wpwrakviric: yup20:45
--- Tue Jan 8 201300:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!