This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2642R1F:ADC例程编译出错



我按照以下连接的例程,基于Project_zero做了一个ADCBUF的demo

file:///home/rose/ti/simplelink_cc13x2_26x2_sdk_4_20_01_04/docs/tidrivers/doxygen/html/_a_d_c_buf_8h.html

// Import ADCBuf Driver definitions
#include <ti/drivers/ADCBuf.h>
// Define name for ADCBuf channel index
#define PIEZOMETER_OUT    0
// Create buffer for samples
#define ADCBUFFERSIZE     10
uint16_t buffer[ADCBUFFERSIZE];
uint32_t microvoltBuffer[ADCBUFFERSIZE];
// One time init of ADCBuf driver
ADCBuf_Handle adcBuf;
void blower_adc_init()
{

    ADCBuf_init();
    // Initialize optional ADCBuf parameters
    ADCBuf_Params params;
    ADCBuf_Params_init(&params);
    params.returnMode = ADCBuf_RETURN_MODE_BLOCKING;
    params.recurrenceMode = ADCBuf_RECURRENCE_MODE_ONE_SHOT;
    // Open ADCBuf driver
    adcBuf = ADCBuf_open(0, &params);
    // Setup conversion structure
    ADCBuf_Conversion conversion = {0};
    conversion.samplesRequestedCount = ADCBUFFERSIZE;
    conversion.sampleBuffer = buffer;
    conversion.adcChannel = PIEZOMETER_OUT;
    // Start ADCBuf conversion
    ADCBuf_convert(adcBuf, &conversion, 1);
    // Adjust raw ADC values and convert them to microvolts
    ADCBuf_adjustRawValues(adcBuf, buffer, ADCBUFFERSIZE, PIEZOMETER_OUT);
    ADCBuf_convertAdjustedToMicroVolts(adcBuf, PIEZOMETER_OUT, buffer,
                                       microvoltBuffer, ADCBUFFERSIZE);
    // Close ADCBuf driver
    ADCBuf_close(adcBuf);
}

他总是会出错:

unresolved symbol ADCBuf_config, first referenced in /home/rose/ti/simplelink_cc13x2_26x2_sdk_4_20_01_04/source/ti/drivers/lib/drivers_cc26x2.aem4f<ADCBuf.oem4f>

unresolved symbol ADCBuf_count, first referenced in /home/rose/ti/simplelink_cc13x2_26x2_sdk_4_20_01_04/source/ti/drivers/lib/drivers_cc26x2.aem4f<ADCBuf.oem4f>

但我不明白这错误从何而来,我只是基于Project_zero基础上添加了上述代码而已