请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMS570LS3137-EP 主题中讨论的其他器件:HALCOGEN
您好!
您能否将"Hercules 指南教程:12位 ADC"中使用的代码发送给我、因为 由于清晰度不佳、我无法从视频中读取该代码。
非常感谢、
Shiromini
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.
您好!
您能否将"Hercules 指南教程:12位 ADC"中使用的代码发送给我、因为 由于清晰度不佳、我无法从视频中读取该代码。
非常感谢、
Shiromini
void main (void){ adcData_t adc_data;//ADC 数据结构 adcData_t * adc_data_ptr =&adc_data;// ADC DAT 指针 无符号 int NumberOfChars、value;//变量 sciInit(); adcInit(); while (1) { adcStartConversion (adcREG1、 adcGROUP1);//启动 ADC 转换 while (!adcIsConversionComplete (adcREG1、adcGROUP1));//等待 ADC 转换 adcGetData (adcREG1、adcGROUP1、adc_data_ptr);//将转换存储到 ADC 指针 值=(int)((adcREG1、adcROUP1、adc_data_intr); (unsigned Number_char);( *) (unsigned char *)"0x"); sciSend (scilinREG、NumberOfChars、command); sciSend (scilinREG、 2、(unsigned char *)"\r\n"); }
您不必编写通知函数、因为它们包含在由 HalCoGen 自动生成的 notification.c 文件中。