#defineDS18B20_DQ_PULLUP() GPIO_SetPullUp(GPIO_Port_3, GPIO_Pin_5, HAL_State_ON) #defineDS18B20_DQ_INPUT() GPIO_P3_SetMode(GPIO_Pin_5, GPIO_Mode_Input_HIP) #defineDS18B20_DQ_OUTPUT() GPIO_P3_SetMode(GPIO_Pin_5, GPIO_Mode_InOut_OD) #defineDS18B20_DQ_LOW() DS18B20_DQ=RESET #def...
The GPIO mode must be set to one of the following strings: IN: input-only mode. OUT: output-only mode. OUTOD: output-only mode with open-drain. INOUTOD: input/output mode with open-drain. INOUT: input/output mode. param cfg An optional table with the following options: pullup: Enab...
// 头文件相对路径:rt-thread/components/drivers/include/drivers/pin.h#define PIN_MODE_OUTPUT 0x00// 输出#define PIN_MODE_INPUT 0x01// 输入#define PIN_MODE_INPUT_PULLUP 0x02// 上拉输入#define PIN_MODE_OUTPUT_OD 0x04// 开漏输出