Other Parts Discussed in Thread: C2000WARE
调用库的版本为C2000Ware_3_04_00_00_Software,F2837xD_Gpio.c中,void InitGpio()的注释为将GPIO配置为输入引脚,并且使能内部上拉,而实际配置寄存器时,好像没有配置内部上拉的步骤,是我理解上有问题还是注释有错误
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.
调用库的版本为C2000Ware_3_04_00_00_Software,F2837xD_Gpio.c中,void InitGpio()的注释为将GPIO配置为输入引脚,并且使能内部上拉,而实际配置寄存器时,好像没有配置内部上拉的步骤,是我理解上有问题还是注释有错误
How I understand it is that the first comment says that all GPIO pins are by default set to input with pull-ups enabled. The second comment seems to be referring to the fact that there's a way to avoid doing this for all pins, or a 'hack', which is for when the user maybe does not want pull-ups enabled by default. Looking at the code in the file, it seems you can change the default to something else within that for-loop. I have not tested it before, but that's what it appears to be.