Transplant RCC & GPIO configuration to lib file