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.

[参考译文] CCS/TMS570LS1224:关闭用户 LED 的方法

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/851991/ccs-tms570ls1224-the-way-to-turn-off-user-leds

器件型号:TMS570LS1224

工具/软件:Code Composer Studio

您好!

是否有人告诉我如何  关闭用户 LED (GIOB_1和 GIOB_2 )

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

    您好!

    1.从驱动程序启用选项卡中启用 GIO 驱动程序;
    2.从 PINMUX 选项卡中选中 GIOB 复选框(清除所有冲突(如果可用);
    3.从 GIO->Port B 选项卡将 GIOB[1]设置为输出;
    4.从 GIO->Port B 选项卡中将 GIOB[2]设置为输出;
    4.生成代码

    5.在 CCS sys_main.c 中:包含 gio.h
    6.在 main()中:调用 gioInit();
    7.在 main()中:

    调用 gioToggleBit (gioPORTB、1);切换 LED2  
    调用 gioToggleBit (gioPORTB、2);以切换 LED3

    调用 gioSetBit (gioPORTB、1、0);将 LED2设置为关闭
    调用 gioSetBit (gioPORTB、2、0);将 LED3设置为关闭