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.

CC2640的IO口推挽输出和上拉输入如何设置

/**
* 函数功能: 使DHT11-DATA引脚变为上拉输入模式
* 输入参数: 无
* 返 回 值: 无
* 说 明:无
*/
static void DHT11_Mode_IPU(void)
{

PIN_setConfig(MotorIoHandle,PIN_BM_ALL,USER_CTL_DHT_IO|PIN_INPUT_EN|PIN_PULLUP );

}
/**
* 函数功能: 使DHT11-DATA引脚变为推挽输出模式
* 输入参数: 无
* 返 回 值: 无
* 说 明:无
*/
static void DHT11_Mode_Out_PP(void)
{
PIN_setConfig(MotorIoHandle,PIN_BM_ALL,USER_CTL_DHT_IO|PIN_GPIO_OUTPUT_EN|PIN_PUSHPULL);

}

请问如果我这样设置推挽输出和上拉输入对吗