2 * Copyright (C) 2006 Paul Davis
3 * Copyright (C) 2007 Michael Taht
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 /* This header file is basically where all the tranzport debuggable options go.
22 Try to only check it in with minimal debugging enabled so production
23 systems don't have to fiddle with it. */
25 /* Design notes: The tranzport is a unique device, basically a
26 20x2 character lcd gui with (almost) 22 shift keys and 8 blinking lights.
28 As such it has several unique constraints. In the libusb driver,
29 the device exerts flow control
30 by having a usb write fail. It is pointless to retry madly at that point,
31 the device is busy, and it's not going to become unbusy very quickly.
33 So writes need to be either "mandatory" or "unreliable", and therein
34 lies the rub, as the kernel can also drop writes, and missing an
35 interrupt in userspace is also generally bad.
37 However, the kernel driver retries writes for you and also buffers and
38 compresses incoming wheel events - it will rarely, if ever, drop data.
40 A more complex surface might have hundreds of lights and several displays.
45 #ifndef ardour_tranzport_base
46 #define ardour_tranzport_base
48 #define DEFAULT_USB_TIMEOUT 10
50 #define MAX_TRANZPORT_INFLIGHT 4
51 #define DEBUG_TRANZPORT 0
53 #ifndef HAVE_TRANZPORT_KERNEL_DRIVER
54 #define HAVE_TRANZPORT_KERNEL_DRIVER 0
57 #ifndef HAVE_TRANZPORT_MIDI_DRIVER
58 #define HAVE_TRANZPORT_MIDI_DRIVER 0
61 // for now, this is what the device is called
62 #define TRANZPORT_DEVICE "/dev/tranzport0"
64 #if DEBUG_TRANZPORT > 0
65 #define DEBUG_TRANZPORT_SCREEN 10
66 #define DEBUG_TRANZPORT_BITS 10
67 #define DEBUG_TRANZPORT_LIGHTS 10
68 #define DEBUG_TRANZPORT_STATE 10
70 #define DEBUG_TRANZPORT 0
71 #define DEBUG_TRANZPORT_BITS 0
72 #define DEBUG_TRANZPORT_SCREEN 0
73 #define DEBUG_TRANZPORT_LIGHTS 0
74 #define DEBUG_TRANZPORT_STATE 0
76 #endif /* ardour_tranzport_base */