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.

为什么MSP430FR5969 ADC12_B_startConversion()函数不能在除了main.c文件之外的其他文件中调用呢?

Other Parts Discussed in Thread: MSP430FR5969

我在使用MSP430FR5969的库函数时发现,   ADC12_B_startConversion()函数不能在除了main.c文件之外的其他文件中调用呢。比如,我定义了一个函数 void fun{

     ADC12_B_startConversion( );

},

只能讲fun的声明和定义都放在main.c文件里面才能使ADC转换出正确的结果,而当将fun函数的定义或者声明放在另外一个文件,比如 myfun.c文件中,然后在main.c中包含myfun.c ,编译正确 ,这时候再使用fun函数,ADC模块就不能正确转换。