/* Get GPIOs logic state. 
Get logic level of GPIO given by GPIO number according to MUX list. Reading a GPIO value is possible even if the port is not muxed for GPIO. */
bool gpio_get(uint32_t gpio)
/* Get GPIOs logic state. 
Get logic level of GPIO given by GPIO number according to MUX list. Reading a GPIO value is possible even if the port is not muxed for GPIO. */
bool gpio_get(uint32_t gpio)
{
	uint32_t port = GPIO(gpio / 32);
	return !!(GPIO_PDIR(port) & GPIO_OFFSET(gpio));
}