adding pins and task class
This commit is contained in:
@@ -80,31 +80,86 @@
|
||||
#define SPARK_PIN_B34 2
|
||||
|
||||
// =====================
|
||||
// PCA9555 (I2C EXPANDER)
|
||||
// PCA9555 I/O EXPANDER BOX_A
|
||||
// =====================
|
||||
|
||||
// --- RESET LINES ---
|
||||
#define RST_EXT_PEAK_DETECT_A 0
|
||||
#define RST_EXT_SAMPLE_HOLD_A 1
|
||||
#define RST_EXT_PEAK_DETECT_B 2
|
||||
#define RST_EXT_SAMPLE_HOLD_B 3
|
||||
#define BTN_3 4
|
||||
#define BTN_4 5
|
||||
#define BTN_5 6
|
||||
#define BTN_6 7
|
||||
#define EXPANDER_A_ADDR 0x010101
|
||||
|
||||
// --- DIGITAL POT CHIP SELECT LINES ---
|
||||
#define POT_CS_A12 0
|
||||
#define POT_CS_A34 1
|
||||
|
||||
// --- SOFT START FORCE LINES ---
|
||||
#define SS_FORCE_A 2
|
||||
#define SS_INIBHIT_A12 3
|
||||
#define SS_INHIBIT_A34 4
|
||||
|
||||
// --- SAMPLE AND HOLD ARM AND DISCHARGE ---
|
||||
#define SH_DISCH_A12 5
|
||||
#define SH_DISCH_A34 6
|
||||
#define SH_ARM_A12 7
|
||||
#define SH_ARM_A34 8
|
||||
|
||||
// --- RELAY ---
|
||||
#define EXT_RELAY_A 8
|
||||
#define EXT_RELAY_B 9
|
||||
#define RELAY_IN_A12 9
|
||||
#define RELAY_OUT_A12 10
|
||||
#define RELAY_IN_A34 11
|
||||
#define RELAY_OUT_A34 12
|
||||
|
||||
// --- STATUS / BUTTON ---
|
||||
#define BTN_7 10
|
||||
#define BTN_8 11
|
||||
#define STA_1 12
|
||||
#define STA_2 13
|
||||
#define STA_3 14
|
||||
#define STA_4 15
|
||||
|
||||
// =====================
|
||||
// PCA9555 I/O EXPANDER BOX_B
|
||||
// =====================
|
||||
|
||||
#define EXPANDER_B_ADDR 0x101010
|
||||
|
||||
// --- DIGITAL POT CHIP SELECT LINES ---
|
||||
#define POT_CS_B12 0
|
||||
#define POT_CS_B34 1
|
||||
|
||||
// --- SOFT START FORCE LINES ---
|
||||
#define SS_FORCE_A 2
|
||||
#define SS_INIBHIT_B12 3
|
||||
#define SS_INHIBIT_B34 4
|
||||
|
||||
// --- SAMPLE AND HOLD ARM AND DISCHARGE ---
|
||||
#define SH_DISCH_B12 5
|
||||
#define SH_DISCH_B34 6
|
||||
#define SH_ARM_B12 7
|
||||
#define SH_ARM_B34 8
|
||||
|
||||
// --- RELAY ---
|
||||
#define RELAY_IN_B12 9
|
||||
#define RELAY_OUT_B12 10
|
||||
#define RELAY_IN_B34 11
|
||||
#define RELAY_OUT_B34 12
|
||||
|
||||
// --- STATUS / BUTTON ---
|
||||
#define STA_2 13
|
||||
#define STA_3 14
|
||||
#define STA_4 15
|
||||
|
||||
// =====================
|
||||
// PCA9555 I/O EXPANDER INPUTS A+B
|
||||
// =====================
|
||||
|
||||
#define EXPANDER_IN_ADDR 0x0a0a0a
|
||||
|
||||
#define SS_A12_ON
|
||||
#define SS_A12_OFF
|
||||
#define SS_A34_ON
|
||||
#define SS_A34_OFF
|
||||
|
||||
#define SS_B12_ON
|
||||
#define SS_B12_OFF
|
||||
#define SS_B34_ON
|
||||
#define SS_B34_OFF
|
||||
|
||||
|
||||
// Init Pin Functions
|
||||
inline void initTriggerPinsInputs()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user