7 #ifndef __MSP430WARE_ADC10_B_H__ 8 #define __MSP430WARE_ADC10_B_H__ 10 #include "inc/hw_memmap.h" 12 #ifdef __MSP430_HAS_ADC10_B__ 31 #define ADC10_B_CLOCKSOURCE_ADC10OSC (ADC10SSEL_0) 32 #define ADC10_B_CLOCKSOURCE_ACLK (ADC10SSEL_1) 33 #define ADC10_B_CLOCKSOURCE_MCLK (ADC10SSEL_2) 34 #define ADC10_B_CLOCKSOURCE_SMCLK (ADC10SSEL_3) 42 #define ADC10_B_CLOCKDIVIDER_1 (ADC10DIV_0 + ADC10PDIV_0) 43 #define ADC10_B_CLOCKDIVIDER_2 (ADC10DIV_1 + ADC10PDIV_0) 44 #define ADC10_B_CLOCKDIVIDER_3 (ADC10DIV_2 + ADC10PDIV_0) 45 #define ADC10_B_CLOCKDIVIDER_4 (ADC10DIV_3 + ADC10PDIV_0) 46 #define ADC10_B_CLOCKDIVIDER_5 (ADC10DIV_4 + ADC10PDIV_0) 47 #define ADC10_B_CLOCKDIVIDER_6 (ADC10DIV_5 + ADC10PDIV_0) 48 #define ADC10_B_CLOCKDIVIDER_7 (ADC10DIV_6 + ADC10PDIV_0) 49 #define ADC10_B_CLOCKDIVIDER_8 (ADC10DIV_7 + ADC10PDIV_0) 50 #define ADC10_B_CLOCKDIVIDER_12 (ADC10DIV_2 + ADC10PDIV_1) 51 #define ADC10_B_CLOCKDIVIDER_16 (ADC10DIV_3 + ADC10PDIV_1) 52 #define ADC10_B_CLOCKDIVIDER_20 (ADC10DIV_4 + ADC10PDIV_1) 53 #define ADC10_B_CLOCKDIVIDER_24 (ADC10DIV_5 + ADC10PDIV_1) 54 #define ADC10_B_CLOCKDIVIDER_28 (ADC10DIV_6 + ADC10PDIV_1) 55 #define ADC10_B_CLOCKDIVIDER_32 (ADC10DIV_7 + ADC10PDIV_1) 56 #define ADC10_B_CLOCKDIVIDER_64 (ADC10DIV_0 + ADC10PDIV_2) 57 #define ADC10_B_CLOCKDIVIDER_128 (ADC10DIV_1 + ADC10PDIV_2) 58 #define ADC10_B_CLOCKDIVIDER_192 (ADC10DIV_2 + ADC10PDIV_2) 59 #define ADC10_B_CLOCKDIVIDER_256 (ADC10DIV_3 + ADC10PDIV_2) 60 #define ADC10_B_CLOCKDIVIDER_320 (ADC10DIV_4 + ADC10PDIV_2) 61 #define ADC10_B_CLOCKDIVIDER_384 (ADC10DIV_5 + ADC10PDIV_2) 62 #define ADC10_B_CLOCKDIVIDER_448 (ADC10DIV_6 + ADC10PDIV_2) 63 #define ADC10_B_CLOCKDIVIDER_512 (ADC10DIV_7 + ADC10PDIV_2) 71 #define ADC10_B_SAMPLEHOLDSOURCE_SC (ADC10SHS_0) 72 #define ADC10_B_SAMPLEHOLDSOURCE_1 (ADC10SHS_1) 73 #define ADC10_B_SAMPLEHOLDSOURCE_2 (ADC10SHS_2) 74 #define ADC10_B_SAMPLEHOLDSOURCE_3 (ADC10SHS_3) 82 #define ADC10_B_MULTIPLESAMPLESDISABLE (!(ADC10MSC)) 83 #define ADC10_B_MULTIPLESAMPLESENABLE (ADC10MSC) 91 #define ADC10_B_CYCLEHOLD_4_CYCLES (ADC10SHT_0) 92 #define ADC10_B_CYCLEHOLD_8_CYCLES (ADC10SHT_1) 93 #define ADC10_B_CYCLEHOLD_16_CYCLES (ADC10SHT_2) 94 #define ADC10_B_CYCLEHOLD_32_CYCLES (ADC10SHT_3) 95 #define ADC10_B_CYCLEHOLD_64_CYCLES (ADC10SHT_4) 96 #define ADC10_B_CYCLEHOLD_96_CYCLES (ADC10SHT_5) 97 #define ADC10_B_CYCLEHOLD_128_CYCLES (ADC10SHT_6) 98 #define ADC10_B_CYCLEHOLD_192_CYCLES (ADC10SHT_7) 99 #define ADC10_B_CYCLEHOLD_256_CYCLES (ADC10SHT_8) 100 #define ADC10_B_CYCLEHOLD_384_CYCLES (ADC10SHT_9) 101 #define ADC10_B_CYCLEHOLD_512_CYCLES (ADC10SHT_10) 102 #define ADC10_B_CYCLEHOLD_768_CYCLES (ADC10SHT_11) 103 #define ADC10_B_CYCLEHOLD_1024_CYCLES (ADC10SHT_12) 111 #define ADC10_B_INPUT_A0 (ADC10INCH_0) 112 #define ADC10_B_INPUT_A1 (ADC10INCH_1) 113 #define ADC10_B_INPUT_A2 (ADC10INCH_2) 114 #define ADC10_B_INPUT_A3 (ADC10INCH_3) 115 #define ADC10_B_INPUT_A4 (ADC10INCH_4) 116 #define ADC10_B_INPUT_A5 (ADC10INCH_5) 117 #define ADC10_B_INPUT_A6 (ADC10INCH_6) 118 #define ADC10_B_INPUT_A7 (ADC10INCH_7) 119 #define ADC10_B_INPUT_VEREF_P (ADC10INCH_8) 120 #define ADC10_B_INPUT_VEREF_N (ADC10INCH_9) 121 #define ADC10_B_INPUT_TEMPSENSOR (ADC10INCH_10) 122 #define ADC10_B_INPUT_BATTERYMONITOR (ADC10INCH_11) 123 #define ADC10_B_INPUT_A12 (ADC10INCH_12) 124 #define ADC10_B_INPUT_A13 (ADC10INCH_13) 125 #define ADC10_B_INPUT_A14 (ADC10INCH_14) 126 #define ADC10_B_INPUT_A15 (ADC10INCH_15) 135 #define ADC10_B_VREFPOS_AVCC (!(ADC10SREF0 + ADC10SREF1)) 136 #define ADC10_B_VREFPOS_EXT (ADC10SREF1) 137 #define ADC10_B_VREFPOS_INT (ADC10SREF0) 146 #define ADC10_B_VREFNEG_AVSS (!(ADC10SREF2)) 147 #define ADC10_B_VREFNEG_EXT (ADC10SREF2) 155 #define ADC10_B_OVIE (ADC10OVIE) 156 #define ADC10_B_TOVIE (ADC10TOVIE) 157 #define ADC10_B_HIIE (ADC10HIIE) 158 #define ADC10_B_LOIE (ADC10LOIE) 159 #define ADC10_B_INIE (ADC10INIE) 160 #define ADC10_B_IE0 (ADC10IE0) 169 #define ADC10_B_OVIFG (ADC10OVIFG) 170 #define ADC10_B_TOVIFG (ADC10TOVIFG) 171 #define ADC10_B_HIIFG (ADC10HIIFG) 172 #define ADC10_B_LOIFG (ADC10LOIFG) 173 #define ADC10_B_INIFG (ADC10INIFG) 174 #define ADC10_B_IFG0 (ADC10IFG0) 183 #define ADC10_B_SINGLECHANNEL (ADC10CONSEQ_0) 184 #define ADC10_B_SEQOFCHANNELS (ADC10CONSEQ_1) 185 #define ADC10_B_REPEATED_SINGLECHANNEL (ADC10CONSEQ_2) 186 #define ADC10_B_REPEATED_SEQOFCHANNELS (ADC10CONSEQ_3) 194 #define ADC10_B_COMPLETECONVERSION false 195 #define ADC10_B_PREEMPTCONVERSION true 203 #define ADC10_B_RESOLUTION_8BIT (!(ADC10RES)) 204 #define ADC10_B_RESOLUTION_10BIT (ADC10RES) 212 #define ADC10_B_NONINVERTEDSIGNAL (!(ADC10ISSH)) 213 #define ADC10_B_INVERTEDSIGNAL (ADC10ISSH) 221 #define ADC10_B_UNSIGNED_BINARY (!(ADC10DF)) 222 #define ADC10_B_SIGNED_2SCOMPLEMENT (ADC10DF) 230 #define ADC10_B_MAXSAMPLINGRATE_200KSPS (!(ADC10SR)) 231 #define ADC10_B_MAXSAMPLINGRATE_50KSPS (ADC10SR) 239 #define ADC10_B_NOTBUSY 0x00 240 #define ADC10_B_BUSY (ADC10BUSY) 316 uint16_t sampleHoldSignalSourceSelect,
317 uint8_t clockSourceSelect,
318 uint16_t clockSourceDivider);
394 uint16_t clockCycleHoldCount,
395 uint16_t multipleSamplesEnabled);
468 uint8_t inputSourceSelect,
469 uint8_t positiveRefVoltageSourceSelect,
470 uint8_t negativeRefVoltageSourceSelect);
503 uint8_t interruptMask);
536 uint8_t interruptMask);
569 uint8_t interruptFlagMask);
600 uint8_t interruptFlagMask);
647 uint8_t conversionSequenceModeSelect);
716 uint8_t resolutionSelect);
742 uint16_t invertedSignal);
767 uint16_t readBackFormat);
823 uint16_t samplingRateSelect);
844 uint16_t highThreshold,
845 uint16_t lowThreshold);
888 #endif // __MSP430WARE_ADC10_B_H__ uint8_t ADC10_B_isBusy(uint16_t baseAddress)
Returns the busy status of the ADC10B core.
Definition: adc10_b.c:224
void ADC10_B_clearInterrupt(uint16_t baseAddress, uint8_t interruptFlagMask)
Clears ADC10B selected interrupt flags.
Definition: adc10_b.c:121
void ADC10_B_enable(uint16_t baseAddress)
Enables the ADC10B block.
Definition: adc10_b.c:51
void ADC10_B_disableReferenceBurst(uint16_t baseAddress)
Disables the reference buffer's burst ability.
Definition: adc10_b.c:197
void ADC10_B_disableConversions(uint16_t baseAddress, bool preempt)
Disables the ADC from converting any more signals.
Definition: adc10_b.c:145
bool ADC10_B_init(uint16_t baseAddress, uint16_t sampleHoldSignalSourceSelect, uint8_t clockSourceSelect, uint16_t clockSourceDivider)
Initializes the ADC10B Module.
Definition: adc10_b.c:21
void ADC10_B_enableInterrupt(uint16_t baseAddress, uint8_t interruptMask)
Enables selected ADC10B interrupt sources.
Definition: adc10_b.c:109
void ADC10_B_setReferenceBufferSamplingRate(uint16_t baseAddress, uint16_t samplingRateSelect)
Use to set the reference buffer's sampling rate.
Definition: adc10_b.c:202
void ADC10_B_setWindowComp(uint16_t baseAddress, uint16_t highThreshold, uint16_t lowThreshold)
Sets the high and low threshold for the window comparator feature.
Definition: adc10_b.c:211
void ADC10_B_disable(uint16_t baseAddress)
Disables the ADC10B block.
Definition: adc10_b.c:57
void ADC10_B_enableReferenceBurst(uint16_t baseAddress)
Enables the reference buffer's burst ability.
Definition: adc10_b.c:192
void ADC10_B_configureMemory(uint16_t baseAddress, uint8_t inputSourceSelect, uint8_t positiveRefVoltageSourceSelect, uint8_t negativeRefVoltageSourceSelect)
Configures the controls of the selected memory buffer.
Definition: adc10_b.c:88
void ADC10_B_disableInterrupt(uint16_t baseAddress, uint8_t interruptMask)
Disables selected ADC10B interrupt sources.
Definition: adc10_b.c:115
void ADC10_B_setupSamplingTimer(uint16_t baseAddress, uint16_t clockCycleHoldCount, uint16_t multipleSamplesEnabled)
Sets up and enables the Sampling Timer Pulse Mode.
Definition: adc10_b.c:63
void ADC10_B_startConversion(uint16_t baseAddress, uint8_t conversionSequenceModeSelect)
Enables/Starts an Analog-to-Digital Conversion.
Definition: adc10_b.c:133
void ADC10_B_setSampleHoldSignalInversion(uint16_t baseAddress, uint16_t invertedSignal)
Use to invert or un-invert the sample/hold signal.
Definition: adc10_b.c:173
void ADC10_B_setResolution(uint16_t baseAddress, uint8_t resolutionSelect)
Use to change the resolution of the converted data.
Definition: adc10_b.c:164
uint8_t ADC10_B_getInterruptStatus(uint16_t baseAddress, uint8_t interruptFlagMask)
Returns the status of the selected memory interrupt flags.
Definition: adc10_b.c:127
uint16_t ADC10_B_getResults(uint16_t baseAddress)
Returns the raw contents of the specified memory buffer.
Definition: adc10_b.c:159
uint32_t ADC10_B_getMemoryAddressForDMA(uint16_t baseAddress)
Returns the address of the memory buffer for the DMA module.
Definition: adc10_b.c:219
void ADC10_B_setDataReadBackFormat(uint16_t baseAddress, uint16_t readBackFormat)
Use to set the read-back format of the converted data.
Definition: adc10_b.c:183
void ADC10_B_disableSamplingTimer(uint16_t baseAddress)
Disables Sampling Timer Pulse Mode.
Definition: adc10_b.c:80