Tasks, ISR, Pin refactoring and renaming
This commit is contained in:
@@ -65,40 +65,40 @@
|
||||
// =====================
|
||||
// TRIGGER INPUT INTERRUPTS
|
||||
// =====================
|
||||
#define TRIG_A12P 18
|
||||
#define TRIG_A12N 21
|
||||
#define TRIG_A34P 33
|
||||
#define TRIG_A34N 34
|
||||
#define TRIG_B12P 38
|
||||
#define TRIG_B12N 39
|
||||
#define TRIG_B34P 40
|
||||
#define TRIG_B34N 41
|
||||
#define TRIG_PIN_A12P 18
|
||||
#define TRIG_PIN_A12N 21
|
||||
#define TRIG_PIN_A34P 33
|
||||
#define TRIG_PIN_A34N 34
|
||||
#define TRIG_PIN_B12P 38
|
||||
#define TRIG_PIN_B12N 39
|
||||
#define TRIG_PIN_B34P 40
|
||||
#define TRIG_PIN_B34N 41
|
||||
|
||||
// =====================
|
||||
// SPARK DETECT INPUTS
|
||||
// =====================
|
||||
#define SPARK_A12 42
|
||||
#define SPARK_A34 45 // OK (strapping ma consentito)
|
||||
#define SPARK_B12 46 // OK (strapping ma consentito)
|
||||
#define SPARK_B34 47
|
||||
#define SPARK_PIN_A12 42
|
||||
#define SPARK_PIN_A34 45 // OK (strapping ma consentito)
|
||||
#define SPARK_PIN_B12 46 // OK (strapping ma consentito)
|
||||
#define SPARK_PIN_B34 47
|
||||
|
||||
// =====================
|
||||
// PCA9555 (I2C EXPANDER)
|
||||
// =====================
|
||||
|
||||
// --- RESET LINES ---
|
||||
#define RST_A12P 0
|
||||
#define RST_A12N 1
|
||||
#define RST_A34P 2
|
||||
#define RST_A34N 3
|
||||
#define RST_B12P 4
|
||||
#define RST_B12N 5
|
||||
#define RST_B34P 6
|
||||
#define RST_B34N 7
|
||||
#define RST_EXT_A12P 0
|
||||
#define RST_EXT_A12N 1
|
||||
#define RST_EXT_A34P 2
|
||||
#define RST_EXT_A34N 3
|
||||
#define RST_EXT_B12P 4
|
||||
#define RST_EXT_B12N 5
|
||||
#define RST_EXT_B34P 6
|
||||
#define RST_EXT_B34N 7
|
||||
|
||||
// --- RELAY ---
|
||||
#define A_RELAY 8
|
||||
#define B_RELAY 9
|
||||
#define A_EXT_RELAY 8
|
||||
#define B_EXT_RELAY 9
|
||||
|
||||
// --- STATUS / BUTTON ---
|
||||
#define BTN_3 10
|
||||
@@ -111,20 +111,20 @@
|
||||
// Init Pin Functions
|
||||
inline void initTriggerPinsInputs()
|
||||
{
|
||||
pinMode(TRIG_A12P, INPUT);
|
||||
pinMode(TRIG_A12N, INPUT);
|
||||
pinMode(TRIG_A34P, INPUT);
|
||||
pinMode(TRIG_A34N, INPUT);
|
||||
pinMode(TRIG_B12P, INPUT);
|
||||
pinMode(TRIG_B12N, INPUT);
|
||||
pinMode(TRIG_B34P, INPUT);
|
||||
pinMode(TRIG_B34N, INPUT);
|
||||
pinMode(TRIG_PIN_A12P, INPUT_PULLDOWN);
|
||||
pinMode(TRIG_PIN_A12N, INPUT_PULLDOWN);
|
||||
pinMode(TRIG_PIN_A34P, INPUT_PULLDOWN);
|
||||
pinMode(TRIG_PIN_A34N, INPUT_PULLDOWN);
|
||||
pinMode(TRIG_PIN_B12P, INPUT_PULLDOWN);
|
||||
pinMode(TRIG_PIN_B12N, INPUT_PULLDOWN);
|
||||
pinMode(TRIG_PIN_B34P, INPUT_PULLDOWN);
|
||||
pinMode(TRIG_PIN_B34N, INPUT_PULLDOWN);
|
||||
}
|
||||
|
||||
inline void initSparkPinInputs()
|
||||
{
|
||||
pinMode(SPARK_A12, INPUT);
|
||||
pinMode(SPARK_A34, INPUT);
|
||||
pinMode(SPARK_B12, INPUT);
|
||||
pinMode(SPARK_B34, INPUT);
|
||||
pinMode(SPARK_PIN_A12, INPUT_PULLDOWN);
|
||||
pinMode(SPARK_PIN_A34, INPUT_PULLDOWN);
|
||||
pinMode(SPARK_PIN_B12, INPUT_PULLDOWN);
|
||||
pinMode(SPARK_PIN_B34, INPUT_PULLDOWN);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user