From 55125b49092f2149f3dcd932cd31cf8d15873285 Mon Sep 17 00:00:00 2001 From: mxmxmx Date: Mon, 25 Feb 2019 13:22:54 +0100 Subject: [PATCH] [ADC] FLIP_180 --- software/o_c_REV/OC_ADC.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/software/o_c_REV/OC_ADC.h b/software/o_c_REV/OC_ADC.h index 3529bc05..4bf443d6 100644 --- a/software/o_c_REV/OC_ADC.h +++ b/software/o_c_REV/OC_ADC.h @@ -3,6 +3,7 @@ #include "src/drivers/ADC/OC_util_ADC.h" #include "OC_config.h" +#include "OC_options.h" #include #include @@ -100,10 +101,13 @@ class ADC { /* * below: channel ids for the ADCx_SCA register: we have 4 inputs * CV1 (19) = A5 = 0x4C; CV2 (18) = A4 = 0x4D; CV3 (20) = A6 = 0x46; CV4 (17) = A3 = 0x49 - * for some reason the IDs must be in order: CV2, CV3, CV4, CV1 (as is, this will break the FLIP_180 option) + * for some reason the IDs must be in order: CV2, CV3, CV4, CV1 resp. (when flipped) CV3, CV2, CV1, CV4 */ - - static constexpr uint16_t SCA_CHANNEL_ID[DMA_NUM_CH] = { 0x4D, 0x46, 0x49, 0x4C }; + #ifdef FLIP_180 + static constexpr uint16_t SCA_CHANNEL_ID[DMA_NUM_CH] = { 0x46, 0x4D, 0x4C, 0x49 }; + #else + static constexpr uint16_t SCA_CHANNEL_ID[DMA_NUM_CH] = { 0x4D, 0x46, 0x49, 0x4C }; + #endif }; };