//------------ADC0_InSeq3------------ // Busy-wait Analog to digital conversion initiates SS3 and // calls the user function provided in the initialization with // the results of the conversion in the parameters. // UserTask3(AIN7); // Input: none // Output: none // Samples ADC7 // 125k max sampling // software trigger, busy-wait sampling void ADC0_InSeq3(void){ uint32_t microphone; ADC0_PSSI_R = 0x0008; // 1) initiate SS3 while((ADC0_RIS_R&0x08)==0){};// 2) wait for conversion done // 3) read 12-bit result from AIN7 (PD0) microphone = ADC0_SSFIFO3_R&0xFFF; UserTask3(microphone); // 4) call the user function ADC0_ISC_R = 0x0008; // 5) acknowledge completion }
void ADC0Seq3_Handler(void){ uint32_t microphone; microphone = ADC0_SSFIFO3_R&0xFFF;// 12-bit result from AIN7 (PD0) UserTask3(microphone); ADC0_ISC_R = 0x0008; // acknowledge ADC sequence 3 completion }
void ADC0Seq1_Handler(void){ ADC0_ISC_R |= 0x02; // acknowledge ADC sequence 2 completion UserTask3(ADC0_SSFIFO1_R); // 12-bit result pushed out to user task }