Improvement idea on BusyADC10() of PIC32 ADC peripheral library
Currently, BusyADC10 looks like this in the PIC32 C Compilers v2.00's ADC peripheral library:
#define BusyADC10() (AD1CON1bits.DONE)
I think the semantics are inverted and it does not capture when the ADC is during acquisition. How about the following?
#define BusyADC10() (!AD1CON1bits.DONE || AD1CON1bits.SAMP)
It captures acquisition and conversion times.