/************************************************************************** * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file InternalADC.h * * @author (last) Sean * @date (last) 28-Feb-2020 * * @author (original) Sean Nash * @date (original) 08-Nov-2019 * ***************************************************************************/ #ifndef __INT_ADC_H__ #define __INT_ADC_H__ #include "HDCommon.h" // ********** public definitions ********** #define INT_ADC_BITS_PER_CHANNEL 12 #define INT_ADC_FULL_SCALE_BITS 4096 #define INT_ADC_ZERO 1998 #ifndef BREADBOARD_TARGET #define INT_ADC_REF_V 3.0 #else #define INT_ADC_REF_V 3.3 #endif typedef enum Int_ADC_Channels { INT_ADC_NOT_USED = 0, INT_ADC_BLOOD_PUMP_SPEED, INT_ADC_BLOOD_PUMP_MOTOR_CURRENT, INT_ADC_DIAL_IN_PUMP_SPEED, INT_ADC_DIAL_IN_PUMP_MOTOR_CURRENT, INT_ADC_DIAL_OUT_PUMP_SPEED, INT_ADC_DIAL_OUT_PUMP_MOTOR_CURRENT, NUM_OF_INT_ADC_CHANNELS } INT_ADC_CHANNEL_T; // ********** public function prototypes ********** void initInternalADC( void ); void execInternalADC( void ); U16 getIntADCReading( INT_ADC_CHANNEL_T channel ); #endif