source: rtems/testsuites/libtests/mouse01/msmouse.c @ 78d1190

4.115
Last change on this file since 78d1190 was 3d4f749, checked in by Joel Sherrill <joel.sherrill@…>, on 03/14/11 at 16:18:10

2011-03-14 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, configure.ac: Add test for Mouse Parser Engine (Microsoft Mouse paths) and Serial Mouse Driver.
  • mouse01/.cvsignore, mouse01/Makefile.am, mouse01/init.c, mouse01/mouse01.doc, mouse01/mouse01.scn, mouse01/msmouse.c, mouse01/serial_mouse_config.c: New files.
  • Property mode set to 100644
File size: 973 bytes
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#include <sys/types.h>
13
14const char *Mouse_Type_Long = "Microsoft Mouse";
15const char *Mouse_Type_Short = "ms";
16
17#define PRESSED     1
18#define NOT_PRESSED 0
19
20#define MS_MOUSE_BYTES( _lb, _rb, _x, _y ) \
21  (0x40 | ((_lb) ? 0x20 : 0x00) | ((_rb) ? 0x10 : 0x00) | \
22     ((_y & 0xC) >> 4) | (_x >> 6)), \
23  (_x & 0x3F), \
24  (_y & 0x3F)
25
26const unsigned char Mouse_Actions[] = {
27  MS_MOUSE_BYTES(     PRESSED, NOT_PRESSED,    1,    2),
28  MS_MOUSE_BYTES( NOT_PRESSED, PRESSED,        1,    2),
29  MS_MOUSE_BYTES( NOT_PRESSED, NOT_PRESSED, 0xff,    2),
30  MS_MOUSE_BYTES( NOT_PRESSED, NOT_PRESSED,    1, 0xff)
31};
32
33const size_t Mouse_Actions_Size = sizeof(Mouse_Actions);
34const size_t Mouse_Actions_Per_Iteration = 3;
35
Note: See TracBrowser for help on using the repository browser.