Deleted Added
full compact
joy.c (5993) joy.c (5998)
1/*-
2 * Copyright (c) 1995 Jean-Marc Zucconi
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 38 unchanged lines hidden (view full) ---

47 * if button 1 (resp 2, 3, 4) is pressed, the bit 4 (resp 5, 6, 7) is set to 0
48 * to get the value of a resistor, write the value 0xff at port and
49 * wait until the corresponding bit returns to 0.
50 */
51
52
53/* the formulae below only work if u is ``not too large''. See also
54 * the discussion in microtime.s */
1/*-
2 * Copyright (c) 1995 Jean-Marc Zucconi
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 38 unchanged lines hidden (view full) ---

47 * if button 1 (resp 2, 3, 4) is pressed, the bit 4 (resp 5, 6, 7) is set to 0
48 * to get the value of a resistor, write the value 0xff at port and
49 * wait until the corresponding bit returns to 0.
50 */
51
52
53/* the formulae below only work if u is ``not too large''. See also
54 * the discussion in microtime.s */
55#define usec2ticks(u) ((u) * 19549)>>14
56#define ticks2usec(u) ((u) * 3433)>>12
55#define usec2ticks(u) (((u) * 19549)>>14)
56#define ticks2usec(u) (((u) * 3433)>>12)
57
58
59#define joypart(d) minor(d)&1
60#define UNIT(d) minor(d)>>1&3
61#ifndef JOY_TIMEOUT
62#define JOY_TIMEOUT 2000 /* 2 milliseconds */
63#endif
64

--- 142 unchanged lines hidden ---
57
58
59#define joypart(d) minor(d)&1
60#define UNIT(d) minor(d)>>1&3
61#ifndef JOY_TIMEOUT
62#define JOY_TIMEOUT 2000 /* 2 milliseconds */
63#endif
64

--- 142 unchanged lines hidden ---