Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Accessing Mouse

Altera_Forum
Honored Contributor II
1,191 Views

I have got a USB Mouse working (I tested by doing an "cat /dev/input/mice", and moving the mouse around). However, I now need to access the mouse in one of my programs. Any suggestions on how to do this? i cannot find how to use the /dev/input/mice entry to read the co-ordinates.

0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
305 Views

I would start by looking at the source for gpm (http://linux.schottelius.org/gpm/), a console-based hid handler. It should be a lot easier than piling through some X.org stuff anyway. 

 

Cheers, 

 

- slacker
0 Kudos
Altera_Forum
Honored Contributor II
305 Views

I did, but the thing is GPM even looks way too complex for me. Maybe I was just tired and didn&#39;t feel like decoding it, but I will revisit it if no one here has any little code snippets http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif

0 Kudos
Altera_Forum
Honored Contributor II
305 Views

 

--- Quote Start ---  

originally posted by jdhar@Jun 6 2006, 07:42 AM 

i did, but the thing is gpm even looks way too complex for me. maybe i was just tired and didn&#39;t feel like decoding it, but i will revisit it if no one here has any little code snippets http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/smile.gif  

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=15929) 

--- quote end ---  

 

--- Quote End ---  

 

Hi J, 

You may check uClinux-dist user/microwin/src/drivers/mou_ser.c .
0 Kudos
Altera_Forum
Honored Contributor II
305 Views

This looks much more readable. As usual, thanks for coming to the rescue http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif

0 Kudos
Reply