Re: Ucb1x00 direct access

"K. Reid Wightman" <[email protected]> 13 Aug 2002 19:41:07 -0400
Newsgroups gmane.comp.handhelds.zaurus.devel
Message-ID <1029282068.677.27.camel@kant>
Hi Neil - 
I've been playing with the kernel driver lately, figuring out a good way
to get better (or rather more) random number data for the zaurus, so
that it might be used for doing better crypto (right now it only
generates random number data off the keypad, which kind of sucks for
your average manager who will only be using the touchscreen).  If you
really want direct access you could steal the interrupt from the kernel
(I dunno how to do this myself yet but will probably know in the next
couple of days).  For starters try looking in
<kernel_source_home>/drivers/char/ucb1200_ts.c in the kernel source
available at the sharp developer's site (I think it's from the Japanese
one).  If you can't find the source lemme know and I'll put a copy up on
my webserver. 
The touchscreen sends out an interrupt (not sure which irq but that's
easy to figure out, just put a printk("%d",irq) in the
ucb1200_ts_interrupt() and keep an eye on your syslog) every cycle that
it's down.  So if you hold down the pen for 300 refresh cycles on the
touchscreen, it sends 300 interrupts to the cpu.  This is a little bit
annoying because then I can't just use timing for random data but
ohwell.  Anyway figuring out the irq number should let you steal the
interrupt, then you can get all the info you want directly from the
screen in user-land.  ucb1200_ts_interrupt() should tell you how to get
all this data from the screen, it should all be in the source.  Would
really dig hearing back from you to see what you're planning on doing
with it.  Who knows, maybe you'll hit on something that could be useful
for me and my quest for unpredictable numbers.... 

Cheers, 
Reid 

Key fingerprint = B836 CB87 E70A FD50 705F  A572 2512 E19A 02D7 7DD6 
(key available from gpg.dtype.org, funny I thought most of the
keyservers were pooling their public key data these days but I guess
not) 

On Tue, 2002-08-13 at 17:46, Neil Horlock wrote: 
> Has anyone had any luck accessing the ucb1200 AtoD directly? Any scraps
> of code would be of interest. Any warnings of dire consequences that lie
> along that way would also be good :-)
> 
> Neil
> 
> Neil Horlock
> PGP public key available http://www.zyxt.org/nhorlock.asc
> or http://www.keyserver.net
> Fingerprint: 337A 5258 559A 9C04 3E54  2A01 42B1 E768 DAA7 5CBD
>
signature.asc (application/pgp-signature, 232 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA9WZkTJRLhmgLXfdYRAtkeAJ9LO0HIPm1MYDKOZhvExW73xKRhwQCfRDCn
peoqu19uFVqc14xQpwyJNp4=
=vmka
-----END PGP SIGNATURE-----