Reduced cyclomatic complexity of stack/pico_device.c