Verified Commit 0fa3702a authored by Rahix's avatar Rahix
Browse files

fix(libcard10): Initialize GPIO before PMIC



pmic_init() uses the GPIO API internally to set up the PMIC
interrupt handler.  This does not work properly if called before
GPIO_Init() and will lead to the power-button never interrupting
Epicardium.

Fixes #83.

Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent e111ec69
......@@ -41,6 +41,8 @@ void card10_init(void)
I2C_Shutdown(MXC_I2C1_BUS0);
I2C_Init(MXC_I2C1_BUS0, I2C_FAST_MODE, NULL);
GPIO_Init();
pmic_init();
pmic_set_led(0, 0);
pmic_set_led(1, 0);
......@@ -48,8 +50,6 @@ void card10_init(void)
portexpander_init();
GPIO_Init();
PB_Init();
TMR_Delay(MXC_TMR0, MSEC(1000), 0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment