Since not all ports that enable the machine module have the pin HAL functions.
The C implementation is taken from the DHT driver.