-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h
98 lines (77 loc) · 3.05 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#ifndef __CONFIG
#define __CONFIG
#include "arduino.h"
#define SPORK_CONSOLE_V1 1
#define SPORK_CONSOLE_V2 2
#define AMEX_CONSOLE 3
#define ARCADE_CABINET 4
#define RGB_CONSOLE 5
#define HARDWARE RGB_CONSOLE
#define MAX_DISPLAY_PIXELS 200
#define AUDIO_ENABLED (HARDWARE == AMEX_CONSOLE)
#define BRIGHTNESS_ENABLED (HARDWARE == SPORK_CONSOLE_V2)
#define SHIFT_REGISTER_DISPLAY (HARDWARE == SPORK_CONSOLE_V1 || HARDWARE == SPORK_CONSOLE_V2 || HARDWARE == AMEX_CONSOLE)
#define LEFT_RIGHT_BUTTONS_ENABLED SHIFT_REGISTER_DISPLAY
#define DISPLAY_RCLK_PIN 0
#define DISPLAY_SRCLK_PIN 1
#define DISPLAY_SER_PIN 2
#define DISPLAY_OE_PIN 11
#define AUDIO_PIN 11 // Only audio or display OE can be enabled, not both
#define CONSOLE_LEFT_BUTTON_PIN 3
#define CONSOLE_RIGHT_BUTTON_PIN 4
#define CONTROLLER_SHLD_PIN 5
#define CONTROLLER_CLK_PIN 6
#define CONTROLLER_1_SER_PIN 7
#define CONTROLLER_1_CONN_PIN 8
#define CONTROLLER_2_SER_PIN 9
#define CONTROLLER_2_CONN_PIN 10
#define CONTROLLER_AUX_ENABLED 0
#define CONTROLLER_AUX_SHLD_PIN 11
#define CONTROLLER_AUX_CLK_PIN 12
#define CONTROLLER_AUX_SER_PIN 13
#define CONTROLLER_AUX_CONN_PIN 0
#define TONE_IF_ENABLED(note, duration) if (AUDIO_ENABLED) tone(AUDIO_PIN, note, duration)
/*
Settings for neopixel display; should match DISPLAY_NEOPIXEL_PIN:
*/
// These values depend on which pin your string is connected to and what board you are using
// More info on how to find these at http://www.arduino.cc/en/Reference/PortManipulation
// These values are for the pin that connects to the Data Input pin on the LED strip. They correspond to...
// Arduino Yun: Digital Pin 8
// DueMilinove/UNO: Digital Pin 12
// Arduino MeagL PWM Pin 4
// You'll need to look up the port/bit combination for other boards.
// Note that you could also include the DigitalWriteFast header file to not need to do this lookup.
#if HARDWARE == RGB_CONSOLE || HARDWARE == ARCADE_CABINET
#define DISPLAY_MAX_BRIGHTNESS 6
#define DISPLAY_INITIAL_BRIGHTNESS 1
#else
#define DISPLAY_MAX_BRIGHTNESS 255
#define DISPLAY_INITIAL_BRIGHTNESS 8
#endif
#if HARDWARE == RGB_CONSOLE
#define DISPLAY_NEOPIXEL_PIN 2
#define PIXEL_PORT PORTD
#define PIXEL_DDR DDRD
#define PIXEL_BIT 2
#else
// If arcade cabinet
#define DISPLAY_NEOPIXEL_PIN 12
#define PIXEL_PORT PORTB // Port of the pin the pixels are connected to
#define PIXEL_DDR DDRB // Port of the pin the pixels are connected to
#define PIXEL_BIT 4 // Bit of the pin the pixels are connected to
#endif
// Multi-console support
#define CONTROLLER_SHLD_IN_PIN PIND
#define CONTROLLER_SHLD_BIT 5
#define CONTROLLER_CLK_IN_PIN PIND
#define CONTROLLER_CLK_PORT PORTD
#define CONTROLLER_CLK_BIT 6
#define PERIPHERAL_PIXEL_PIN PIND
#define PERIPHERAL_PIXEL_PORT PORTD
#define PERIPHERAL_PIXEL_BIT 6
#define PERIPHERAL_SER_IN_PIN PIND
#define PERIPHERAL_SER_IN_BIT 7
#define PERIPHERAL_SER_OUT_PORT PORTB
#define PERIPHERAL_SER_OUT_BIT 1
#endif