45 extern void usDelay(uint32_t Count);
93 uint_least8_t regNumber = intNumber >> 1;
101 adc->
INTSELxNy[regNumber] &= (~clearValue);
160 uint_least8_t regNumber = intNumber >> 1;
279 uint_least8_t regNumber = intNumber >> 1;
282 uint16_t setValue = intMode << lShift;
288 adc->
INTSELxNy[regNumber] &= ~(clearValue);
323 uint_least8_t regNumber = intNumber >> 1;
326 uint16_t setValue = intSrc << lShift;
333 adc->
INTSELxNy[regNumber] &= ~(clearValue);
571 uint16_t lShift_socsel1 = socNumber << 1;
580 setValue = intTrigSrc << lShift_socsel1;
591 setValue = intTrigSrc << lShift_socsel2;
volatile uint16_t ADCINTSOCSEL2
ADC Interrupt Trigger SOC Select 2 Register.
ADC_SocTrigSrc_e
Enumeration to define the start of conversion (SOC) trigger source.
void ADC_setSocTrigSrc(ADC_Handle adcHandle, const ADC_SocNumber_e socNumber, const ADC_SocTrigSrc_e trigSrc)
Sets the start-of-conversion (SOC) trigger source.
ADC_IntPulseGenMode_e
Enumeration to define the analog-to-digital converter (ADC) interrupt pulse generation mode...
#define DISABLE_PROTECTED_REGISTER_WRITE_MODE
Define to disable protected register writes.
void ADC_enableBandGap(ADC_Handle adcHandle)
Enables the analog-to-digital converter (ADC) band gap circuit.
void ADC_setOffTrim(ADC_Handle adcHandle, const uint16_t offtrim)
Sets the offset trim register.
#define ADC_INTSELxNy_INTE_BITS
Defines the location of the INTE bits in the INTSELxNy register.
ADC_SampleMode_e
Enumeration to define the analog-to-digital converter (ADC) sample modes.
ADC_SocNumber_e
Enumeration to define the start of conversion (SOC) numbers.
#define ADC_ADCCTL2_CLKDIV2EN_BITS
Defines the location of the CLKDIV2EN bits in the ADCTL2 register.
ADC_IntSrc_e
Enumeration to define the analog-to-digital converter (ADC) interrupt source.
#define ADC_ADCCTL1_ADCPWDN_BITS
Defines the location of the ADCPWDN bits in the ADCTL1 register.
void ADC_setSocFrcWord(ADC_Handle adcHandle, const uint16_t socFrc)
Sets the entire start of conversion (SOC) force register.
void ADC_setupSocTrigSrc(ADC_Handle adcHandle, const ADC_SocNumber_e socNumber, const ADC_IntTriggerSOC_e intTrigSrc)
Sets the start of conversion (SOC) trigger source.
ADC_TempSensorSrc_e
Enumeration to define the temperature sensor source.
volatile uint16_t ADCSOCFRC1
ADC SOC Force 1 Register.
ADC_SocFrc_e
Enumeration to define the soc force values.
void ADC_reset(ADC_Handle adcHandle)
Resets the analog-to-digital converter (ADC)
void ADC_setIntPulseGenMode(ADC_Handle adcHandle, const ADC_IntPulseGenMode_e pulseMode)
Sets the interrupt pulse generation mode.
void ADC_disableVoltRefLoConv(ADC_Handle adcHandle)
Disables conversion of the voltage reference low signal for calibration.
#define ADC_ADCSOCxCTL_ACQPS_BITS
Defines the location of the ACQPS bits in the ADCSOCxCTL register.
volatile uint16_t ADCSAMPLEMODE
ADC Sample Mode Register.
#define ADC_ADCCTL1_ADCENABLE_BITS
Defines the location of the ADCENABLE bits in the ADCTL1 register.
void ADC_enableVoltRefLoConv(ADC_Handle adcHandle)
Enables conversion of the voltage reference low signal for calibration.
#define ADC_INTSELxNy_INTSEL_BITS
Defines the location of the INTSEL bits in the INTSELxNy register.
#define ADC_ADCSOCxCTL_TRIGSEL_BITS
Defines the location of the TRIGSEL bits in the ADCSOCxCTL register.
void ADC_enableNoOverlapMode(ADC_Handle adcHandle)
Enables no overlap mode.
void ADC_setIntMode(ADC_Handle adcHandle, const ADC_IntNumber_e intNumber, const ADC_IntMode_e intMode)
Sets the interrupt mode.
ADC_DivideSelect_e ADC_getDivideSelect(ADC_Handle adcHandle)
Gets the analog-to-digital converter (ADC) divide select value.
void ADC_disableRefBuffers(ADC_Handle adcHandle)
Disables the analog-to-digital converter (ADC) reference buffers circuit.
void ADC_enable(ADC_Handle adcHandle)
Enables the analog-to-digital converter (ADC)
volatile uint16_t ADCCTL2
ADC Control Register 2.
Contains public interface to various functions related to the analog-to-digital converter (ADC) objec...
volatile uint16_t ADCSOCxCTL[16]
ADC SOCx Control Registers.
volatile uint16_t ADCCTL1
ADC Control Register 1.
ADC_DivideSelect_e
Enumeration to define the start of conversion (SOC) numbers.
ADC_IntTriggerSOC_e
Enumeration to define the analog-to-digital converter (ADC) input trigger SOC Select 1 Register group...
volatile uint16_t ADCINTSOCSEL1
ADC Interrupt Trigger SOC Select 1 Register.
void ADC_setSampleMode(ADC_Handle adcHandle, const ADC_SampleMode_e sampleMode)
Sets the sample mode.
void ADC_disableNoOverlapMode(ADC_Handle adcHandle)
Disables no overlap mode.
Defines the analog-to-digital converter (ADC) object.
#define ENABLE_PROTECTED_REGISTER_WRITE_MODE
Define to allow protected register writes.
struct _ADC_Obj_ * ADC_Handle
Defines the analog-to-digital converter (ADC) handle.
ADC_Handle ADC_init(void *pMemory, const size_t numBytes)
Initializes the analog-to-digital converter (ADC) object handle.
#define ADC_ADCCTL1_ADCREFPWD_BITS
Defines the location of the ADCREFPWD bits in the ADCTL1 register.
void ADC_disableBandGap(ADC_Handle adcHandle)
Disables the analog-to-digital converter (ADC) band gap circuit.
#define ADC_INTSELxNy_NUMBITS_PER_REG
Defines the number of bits per INTSELxNy register.
ADC_IntNumber_e
Enumeration to define the analog-to-digital converter (ADC) interrupt number.
void ADC_setVoltRefSrc(ADC_Handle adcHandle, const ADC_VoltageRefSrc_e voltSrc)
Sets the voltage reference source.
ADC_VoltageRefSrc_e
Enumeration to define the voltage reference source.
void ADC_enableInt(ADC_Handle adcHandle, const ADC_IntNumber_e intNumber)
Enables the analog-to-digital converter (ADC) interrupt.
void ADC_setSampleOverlapMode(ADC_Handle adcHandle, ADC_ADCCTL2_ADCNONOVERLAP_e OverLap)
#define ADC_ADCCTL1_ADCBGPWD_BITS
Defines the location of the ADCBGPWD bits in the ADCTL1 register.
#define ADC_INTSELxNy_INTCONT_BITS
Defines the location of the INTCONT bits in the INTSELxNy register.
#define ADC_ADCCTL1_RESET_BITS
Defines the location of the RESET bits in the ADCTL1 register.
volatile uint16_t INTSELxNy[5]
ADC Interrupt Select x and y Register.
Denotes Main Clock Prescaling of 0.
#define ADC_ADCSAMPLEMODE_SEPARATE_FLAG
Define for the channel separate flag.
#define ADC_ADCSOCxCTL_CHSEL_BITS
Defines the location of the CHSEL bits in the ADCSOCxCTL register.
ADC_SocSampleDelay_e
Enumeration to define the start of conversion (SOC) sample delays.
#define ADC_ADCCTL2_ADCNONOVERLAP_BITS
Defines the location of the ADCNONOVERLAP bits in the ADCTL2 register.
void ADC_setSocChanNumber(ADC_Handle adcHandle, const ADC_SocNumber_e socNumber, const ADC_SocChanNumber_e chanNumber)
Sets the start-of-conversion (SOC) channel number.
void ADC_enableRefBuffers(ADC_Handle adcHandle)
Enables the analog-to-digital converter (ADC) reference buffers circuit.
Denotes that sample and conversion overlap is allowed.
void ADC_powerDown(ADC_Handle adcHandle)
Powers down the analog-to-digital converter (ADC)
void ADC_setIntSrc(ADC_Handle adcHandle, const ADC_IntNumber_e intNumber, const ADC_IntSrc_e intSrc)
Sets the interrupt source.
void usDelay(uint32_t Count)
#define ADC_ADCINTSOCSELx_SOCx_BITS
Defines the location of the SOCx bits in the ADCINTSOCSELx register.
ADC_IntMode_e
Enumeration to define the analog-to-digital converter (ADC) interrupt mode.
ADC_SocChanNumber_e
Enumeration to define the start of conversion (SOC) channel numbers.
void ADC_setTempSensorSrc(ADC_Handle adcHandle, const ADC_TempSensorSrc_e sensorSrc)
Sets the temperature sensor source.
void ADC_setSocFrc(ADC_Handle adcHandle, const ADC_SocFrc_e socFrc)
Sets the start-of-conversion (SOC) force register.
volatile uint16_t ADCOFFTRIM
ADC Offset Trim Register.
#define ADC_INTSELxNy_LOG2_NUMBITS_PER_REG
Defines the log2() of the number of bits per INTSELxNy register.
ADC_ADCCTL2_ADCNONOVERLAP_e
Enumeration to define the analog-to-digital converter (ADC) sample and conversion overlap setting...
void ADC_powerUp(ADC_Handle adcHandle)
Powers up the analog-to-digital converter (ADC)
void ADC_disableInt(ADC_Handle adcHandle, const ADC_IntNumber_e intNumber)
Disables the analog-to-digital converter (ADC) interrupt.
#define ADC_ADCCTL1_INTPULSEPOS_BITS
Defines the location of the INTPULSEPOS bits in the ADCTL1 register.
#define ADC_ADCCTL2_CLKDIV4EN_BITS
Defines the location of the CLKDIV4EN bits in the ADCTL2 register.
void ADC_setSocSampleDelay(ADC_Handle adcHandle, const ADC_SocNumber_e socNumber, const ADC_SocSampleDelay_e sampleDelay)
Sets the start-of-conversion (SOC) sample delay.
#define ADC_ADCCTL1_TEMPCONV_BITS
Defines the location of the TEMPCONV bits in the ADCTL1 register.
#define ADC_ADCCTL1_ADCREFSEL_BITS
Defines the location of the ADCREFSEL bits in the ADCTL1 register.
void ADC_disable(ADC_Handle adcHandle)
Disables the analog-to-digital converter (ADC)
#define ADC_ADCCTL1_VREFLOCONV_BITS
Defines the location of the VREFLOCONV bits in the ADCTL1 register.
void ADC_setDivideSelect(ADC_Handle adcHandle, const ADC_DivideSelect_e divSelect)
Sets the analog-to-digital converter (ADC) divide select value.