-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLEDAccessoryBoard.h
More file actions
60 lines (47 loc) · 2.79 KB
/
LEDAccessoryBoard.h
File metadata and controls
60 lines (47 loc) · 2.79 KB
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
#define LED_UPDATE_FRAME_PERIOD_IN_MS 30
#define MACHINE_STATE_OFF 0
#define MACHINE_STATE_ATTRACT_MODE 1
#define MACHINE_STATE_GAME_MODE 2
#define SETTINGS_MODE_OFF 0
#ifdef LED_BACKLIGHT_INO
#endif
/***************************************************************
* These definitions are for the Accessory Lamp Board V1.0
*/
#define STRIP_1_CONTROL 30
#define STRIP_2_CONTROL 31
#define STRIP_3_CONTROL 29
#define STRIP_4_CONTROL 28
#define STRIP_5_CONTROL 27
#define NON_ADDRESSABLE_RGB_RED_PIN 8
#define NON_ADDRESSABLE_RGB_GREEN_PIN 9
#define NON_ADDRESSABLE_RGB_BLUE_PIN 10
/***************************************************************
* These functions are supplied by the game file
*/
//int GetNumberOfLEDsInStrip();
boolean LightingNeedsToWatchI2C();
boolean LightingNeedsToCheckMachineFor5V();
boolean LightingNeedsToCheckMachineForFlipperActivity();
boolean ALBSupportsPlayfieldLamps();
byte IncomingI2CDeviceAddress();
void InitializeAllStrips();
void InitializeRGBValues();
boolean HandleI2CMessage( unsigned long lastMessageSeenTime, byte lastMessage, byte lastParameter,
byte lastRed, byte lastGreen, byte lastBlue, short lastDuration );
boolean UpdateStripsBasedOnInputs(unsigned long *lastInputSeenTime, unsigned long currentTime, unsigned long currentAnimationFrame, byte machineState, unsigned long machineStateChangedTime);
boolean UpdateRGBBasedOnInputs(unsigned long *lastInputSeenTime, unsigned long currentTime, unsigned long currentAnimationFrame, byte machineState, unsigned long machineStateChangedTime);
boolean UpdateStripsBasedOnI2C( unsigned long lastMessageSeenTime, byte lastMessage, byte lastParameter,
byte lastRed, byte lastGreen, byte lastBlue, short lastDuration,
unsigned long currentTime, unsigned long currentAnimationFrame, byte machineState, unsigned long machineStateChangedTime);
boolean UpdateRGBBasedOnI2C( unsigned long lastMessageSeenTime, byte lastMessage, byte lastParameter,
byte lastRed, byte lastGreen, byte lastBlue, short lastDuration,
unsigned long currentTime, unsigned long currentAnimationFrame, byte machineState, unsigned long machineStateChangedTime);
boolean UpdateStripsBasedOnLampBus(unsigned long currentTime, unsigned long currentAnimationFrame, byte machineState, unsigned long machineStateChangedTime);
byte GetSettingValue(byte settingNum);
boolean ReadSettings();
boolean WriteSettings();
byte AdvanceSettingsMode(byte oldSettingsMode);
boolean ShowSettingsMode(byte settingsMode, unsigned long currentAnimationFrame);
boolean IncreaseBrightness(byte settingsMode);
boolean DecreaseBrightness(byte settingsMode);