source: rtems/testsuites/libtests/mouse01/msmouse.c @ 7cb170b3

4.115
Last change on this file since 7cb170b3 was 7cb170b3, checked in by Ralf Corsepius <ralf.corsepius@…>, on 09/29/11 at 15:54:09

2011-09-29 Ralf Corsépius <ralf.corsepius@…>

  • mouse01/init.c, mouse01/msmouse.c, mouse01/serial_mouse_config.c: Add HAVE_CONFIG_H.
  • Property mode set to 100644
File size: 1022 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#ifdef HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <sys/types.h>
17
18const char *Mouse_Type_Long = "Microsoft Mouse";
19const char *Mouse_Type_Short = "ms";
20
21#define PRESSED     1
22#define NOT_PRESSED 0
23
24#define MS_MOUSE_BYTES( _lb, _rb, _x, _y ) \
25  (0x40 | ((_lb) ? 0x20 : 0x00) | ((_rb) ? 0x10 : 0x00) | \
26     ((_y & 0xC) >> 4) | (_x >> 6)), \
27  (_x & 0x3F), \
28  (_y & 0x3F)
29
30const unsigned char Mouse_Actions[] = {
31  MS_MOUSE_BYTES(     PRESSED, NOT_PRESSED,    1,    2),
32  MS_MOUSE_BYTES( NOT_PRESSED, PRESSED,        1,    2),
33  MS_MOUSE_BYTES( NOT_PRESSED, NOT_PRESSED, 0xff,    2),
34  MS_MOUSE_BYTES( NOT_PRESSED, NOT_PRESSED,    1, 0xff)
35};
36
37const size_t Mouse_Actions_Size = sizeof(Mouse_Actions);
38const size_t Mouse_Actions_Per_Iteration = 3;
39
Note: See TracBrowser for help on using the repository browser.