Tasks, ISR, Pin refactoring and renaming
This commit is contained in:
@@ -6,26 +6,17 @@
|
||||
#include <Adafruit_SSD1306.h>
|
||||
#include <PCA95x5.h>
|
||||
|
||||
// ADC Channel mapping Ignition A
|
||||
#define IN_A12_P SING_0
|
||||
#define IN_A12_N SING_1
|
||||
#define IN_A34_P SING_2
|
||||
#define IN_A34_N SING_3
|
||||
#define OUT_A12_P SING_4
|
||||
#define OUT_A12_N SING_5
|
||||
#define OUT_A34_P SING_6
|
||||
#define OUT_A34_N SING_7
|
||||
|
||||
// ADC Channel mapping Ignition B
|
||||
#define IN_A12_P SING_0
|
||||
#define IN_A12_N SING_1
|
||||
#define IN_A34_P SING_2
|
||||
#define IN_A34_N SING_3
|
||||
#define OUT_A12_P SING_4
|
||||
#define OUT_A12_N SING_5
|
||||
#define OUT_A34_P SING_6
|
||||
#define OUT_A34_N SING_7
|
||||
// ADC Channel mapping
|
||||
#define ADC_CH_PEAK_12P_IN SING_0
|
||||
#define ADC_CH_PEAK_12N_IN SING_1
|
||||
#define ADC_CH_PEAK_34P_IN SING_2
|
||||
#define ADC_CH_PEAK_34N_IN SING_3
|
||||
#define ADC_CH_PEAK_12P_OUT SING_4
|
||||
#define ADC_CH_PEAK_12N_OUT SING_5
|
||||
#define ADC_CH_PEAK_34P_OUT SING_6
|
||||
#define ADC_CH_PEAK_34N_OUT SING_7
|
||||
|
||||
// Device Pointer structs for tasks
|
||||
struct Devices {
|
||||
AD5292 *pot_a = NULL, *pot_b = NULL;
|
||||
ADS1256 *adc_a = NULL, *adc_b = NULL;
|
||||
@@ -33,6 +24,7 @@ struct Devices {
|
||||
PCA9555* io = NULL;
|
||||
};
|
||||
|
||||
// Adc read channel wrapper to selet mux before reading
|
||||
inline float adcReadChannel(ADS1256* adc, const uint8_t ch){
|
||||
adc->setMUX(ch);
|
||||
// scarta 3 conversioni
|
||||
|
||||
Reference in New Issue
Block a user