We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 64c5599 + eeb82bf commit bdf2c8eCopy full SHA for bdf2c8e
Tutorial 25 - DHT22 Temperature Sensor/MY_DHT22.c
@@ -51,7 +51,7 @@ void DHT22_Init(GPIO_TypeDef* DataPort, uint16_t DataPin)
51
static void ONE_WIRE_PinMode(OnePinMode_Typedef mode)
52
{
53
GPIO_InitTypeDef GPIO_InitStruct;
54
- GPIO_InitStruct.Pin = GPIO_PIN_9;
+ GPIO_InitStruct.Pin = oneWire_PIN;
55
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
56
GPIO_InitStruct.Pull = GPIO_NOPULL;
57
@@ -67,7 +67,7 @@ static void ONE_WIRE_PinMode(OnePinMode_Typedef mode)
67
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
68
}
69
70
- HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
+ HAL_GPIO_Init(oneWire_PORT, &GPIO_InitStruct);
71
72
//One Wire pin HIGH/LOW Write
73
static void ONE_WIRE_Pin_Write(bool state)
0 commit comments