65 #include <inc/hw_types.h>
66 #include <inc/hw_memmap.h>
67 #include <inc/hw_event.h>
68 #include <inc/hw_adi.h>
69 #include <inc/hw_adi_4_aux.h>
70 #include <inc/hw_aux_anaif.h>
87 #define AUXADCDisable NOROM_AUXADCDisable
88 #define AUXADCEnableAsync NOROM_AUXADCEnableAsync
89 #define AUXADCEnableSync NOROM_AUXADCEnableSync
90 #define AUXADCDisableInputScaling NOROM_AUXADCDisableInputScaling
91 #define AUXADCFlushFifo NOROM_AUXADCFlushFifo
92 #define AUXADCReadFifo NOROM_AUXADCReadFifo
93 #define AUXADCPopFifo NOROM_AUXADCPopFifo
94 #define AUXADCGetAdjustmentGain NOROM_AUXADCGetAdjustmentGain
95 #define AUXADCGetAdjustmentOffset NOROM_AUXADCGetAdjustmentOffset
96 #define AUXADCValueToMicrovolts NOROM_AUXADCValueToMicrovolts
97 #define AUXADCMicrovoltsToValue NOROM_AUXADCMicrovoltsToValue
98 #define AUXADCAdjustValueForGainAndOffset NOROM_AUXADCAdjustValueForGainAndOffset
99 #define AUXADCUnadjustValueForGainAndOffset NOROM_AUXADCUnadjustValueForGainAndOffset
141 #define AUXADC_SAMPLE_TIME_2P7_US 3
142 #define AUXADC_SAMPLE_TIME_5P3_US 4
143 #define AUXADC_SAMPLE_TIME_10P6_US 5
144 #define AUXADC_SAMPLE_TIME_21P3_US 6
145 #define AUXADC_SAMPLE_TIME_42P6_US 7
146 #define AUXADC_SAMPLE_TIME_85P3_US 8
147 #define AUXADC_SAMPLE_TIME_170_US 9
148 #define AUXADC_SAMPLE_TIME_341_US 10
149 #define AUXADC_SAMPLE_TIME_682_US 11
150 #define AUXADC_SAMPLE_TIME_1P37_MS 12
151 #define AUXADC_SAMPLE_TIME_2P73_MS 13
152 #define AUXADC_SAMPLE_TIME_5P46_MS 14
153 #define AUXADC_SAMPLE_TIME_10P9_MS 15
160 #define AUXADC_FIXED_REF_VOLTAGE_NORMAL 4300000
161 #define AUXADC_FIXED_REF_VOLTAGE_UNSCALED 1478500
263 extern void AUXADCEnableSync(uint32_t refSource, uint32_t sampleTime, uint32_t trigger);
323 __STATIC_INLINE uint32_t
517 #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
519 #ifdef ROM_AUXADCDisable
521 #define AUXADCDisable ROM_AUXADCDisable
523 #ifdef ROM_AUXADCEnableAsync
524 #undef AUXADCEnableAsync
525 #define AUXADCEnableAsync ROM_AUXADCEnableAsync
527 #ifdef ROM_AUXADCEnableSync
528 #undef AUXADCEnableSync
529 #define AUXADCEnableSync ROM_AUXADCEnableSync
531 #ifdef ROM_AUXADCDisableInputScaling
532 #undef AUXADCDisableInputScaling
533 #define AUXADCDisableInputScaling ROM_AUXADCDisableInputScaling
535 #ifdef ROM_AUXADCFlushFifo
536 #undef AUXADCFlushFifo
537 #define AUXADCFlushFifo ROM_AUXADCFlushFifo
539 #ifdef ROM_AUXADCReadFifo
540 #undef AUXADCReadFifo
541 #define AUXADCReadFifo ROM_AUXADCReadFifo
543 #ifdef ROM_AUXADCPopFifo
545 #define AUXADCPopFifo ROM_AUXADCPopFifo
547 #ifdef ROM_AUXADCGetAdjustmentGain
548 #undef AUXADCGetAdjustmentGain
549 #define AUXADCGetAdjustmentGain ROM_AUXADCGetAdjustmentGain
551 #ifdef ROM_AUXADCGetAdjustmentOffset
552 #undef AUXADCGetAdjustmentOffset
553 #define AUXADCGetAdjustmentOffset ROM_AUXADCGetAdjustmentOffset
555 #ifdef ROM_AUXADCValueToMicrovolts
556 #undef AUXADCValueToMicrovolts
557 #define AUXADCValueToMicrovolts ROM_AUXADCValueToMicrovolts
559 #ifdef ROM_AUXADCMicrovoltsToValue
560 #undef AUXADCMicrovoltsToValue
561 #define AUXADCMicrovoltsToValue ROM_AUXADCMicrovoltsToValue
563 #ifdef ROM_AUXADCAdjustValueForGainAndOffset
564 #undef AUXADCAdjustValueForGainAndOffset
565 #define AUXADCAdjustValueForGainAndOffset ROM_AUXADCAdjustValueForGainAndOffset
567 #ifdef ROM_AUXADCUnadjustValueForGainAndOffset
568 #undef AUXADCUnadjustValueForGainAndOffset
569 #define AUXADCUnadjustValueForGainAndOffset ROM_AUXADCUnadjustValueForGainAndOffset
582 #endif // __AUX_ADC_H__
int32_t AUXADCAdjustValueForGainAndOffset(int32_t adcValue, int32_t gain, int32_t offset)
Performs ADC value gain and offset adjustment.
int32_t AUXADCGetAdjustmentGain(uint32_t refSource)
Returns the gain value used when adjusting for ADC gain/offset.
void AUXADCEnableAsync(uint32_t refSource, uint32_t trigger)
Enables the ADC for asynchronous operation.
void AUXADCDisable(void)
Disables the ADC.
static void AUXADCGenManualTrigger(void)
Generates a single manual ADC trigger.
int32_t AUXADCMicrovoltsToValue(int32_t fixedRefVoltage, int32_t microvolts)
Converts a number of microvolts to corresponding "adjusted" ADC value.
static uint32_t AUXADCGetFifoStatus(void)
Returns flags indicating the status of the ADC FIFO.
int32_t AUXADCUnadjustValueForGainAndOffset(int32_t adcValue, int32_t gain, int32_t offset)
Performs the inverse of the ADC value gain and offset adjustment.
uint32_t AUXADCPopFifo(void)
Returns the first sample in the ADC FIFO, without waiting.
#define HapiSelectADCCompBInput(a)
void AUXADCEnableSync(uint32_t refSource, uint32_t sampleTime, uint32_t trigger)
Enables the ADC for synchronous operation.
void AUXADCDisableInputScaling(void)
Disables scaling of the ADC input.
int32_t AUXADCValueToMicrovolts(int32_t fixedRefVoltage, int32_t adcValue)
Converts an "adjusted" ADC value to microvolts.
static void AUXADCSelectInput(uint32_t input)
Selects internal or external input for the ADC.
int32_t AUXADCGetAdjustmentOffset(uint32_t refSource)
Returns the offset value used when adjusting for ADC gain/offset.
void AUXADCFlushFifo(void)
Flushes the ADC FIFO.
uint32_t AUXADCReadFifo(void)
Waits for and returns the first sample in the ADC FIFO.