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.

[参考译文] LAUNCHXL-F28377S:如何设置 GPIO 及其中断

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/593698/launchxl-f28377s-how-to-set-up-gpio-and-its-interrupt

器件型号:LAUNCHXL-F28377S

大家好、

我想知道如何设置 GPIO 及其中断以实现以下目的;

GPIO 用于检测光发射。

GPIO 通过 ADC 或直接输入一些信号。

GPIO 触发一个中断、中断服务例程使用一些持续时间计算。

我可能完全理解如何设置、但我不理解如何详细编写此类代码。

请告诉我编码的分步说明。

此致、

Takano

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

    您可以参考基于配置为外部中断的 GPIO 的示例代码。 您可以在此处找到相同的内容:
    C:\ti\c2000Ware_1_00_00_00\device_support\f2837xs\examples\cpu1\external_interrupt

    此致、
    Gautam
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    Takano-San、
    Gautam 指出的示例代码具有您所需的所有代码。 您可以使用该示例作为起点、并轻松地对其进行修改。