implement by HAL on STM32
- Config a timer which has frequency of 10^6 Hz, Period to maximum number(2^32)
- Call DHT_init() in "USER CODE 2" and pass the pointer to the timer in step 1 as a parameter
- Call DHT_EXTI() in HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) callback function
- Call DHT_read() whenever you need to get the sensor value
- DHT_getTemperature() and DHT_getHumidity() return sensor value