- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I'm trying to use the library "altera_up_ps2_mouse.h" to use a ps2 mouse on a DE1 board. I can not find any example about how to use this library. In the project I'm realizing, I would use the mouse to move a pointer on the screen (through VGA). Does anyone have any example or resource to suggest? To initialize the ps2 device and read the data, I try to do like follow:
alt_up_ps2_dev * ps2_dev;
ps2_dev = alt_up_ps2_open_dev("/dev/ps2");
alt_up_ps2_clear_fifo(ps2_dev);
alt_up_ps2_init(ps2_dev);
unsigned char byte1, byte2, byte3;
while(1){
alt_up_ps2_read_data_byte(ps2_dev, byte1);//read 1 byte
alt_up_ps2_read_data_byte(ps2_dev, byte2);
alt_up_ps2_read_data_byte(ps2_dev, byte3);
}
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page