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.

[参考译文] EK-TM4C1294XL:针对 ADC 的 GPIOPinConfigure

Guru**** 2482105 points
Other Parts Discussed in Thread: TM4C1294NCPDT

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/707150/ek-tm4c1294xl-gpiopinconfigure-for-adc

器件型号:EK-TM4C1294XL
主题中讨论的其他器件:TM4C1294NCPDT

我找不到一个宏来将 PE2或 PE3用作 GPIOPinConfigure()的 pin_map.h 中的 ADC,这是否意味着我要正确配置引脚,我只需要使用 GPIOPinTypeADC()或者我是否缺少什么?

这是我在 TM4C1294NCPDT 的 PE2或 PE3的 pin_map.h 文件中找到的内容:

#define GPIO_PE2_U1DCD 0x00040801

#define GPIO_PE3_U1DTR 0x00040C01

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好、Hisham、
    例如、如果您想在 PE3上使用 AIN0、您将执行以下操作。 另请参阅下面的 TivaWare 示例 /examples/peripherals/adc.

    SysCtlPeripheralEnable (SYSCTL_Periph_ADC0);
    SysCtlPeripheralEnable (SYSCTL_Periph_GPIOE);
    GPIOPinTypeADC (GPIO_Porte _BASE、GPIO_PIN_3);