Sub-IoT-Stack
Sub-IoT-Stack copied to clipboard
Auto disable GPIO clock using reference counting
The HAL-ed microcontroller's GPIO-modules should provide an interface for enabling and disabling the GPIO (clock) functionality: e.g. hw_gpio_enable and hw_gpio_disable. These should apply reference counting to track the modules that actively use the GPIO functionality, and if possible automagically actually disable e.g. the clock when no GPIO activity is required.