Commit 7bd55dca authored by schneider's avatar schneider
Browse files

fix(board): Turn off motor early

parent c2b23c56
......@@ -98,6 +98,16 @@ int Board_Init(void)
{
int err;
const gpio_cfg_t pins[] = {
{PORT_0, PIN_8, GPIO_FUNC_OUT, GPIO_PAD_NONE}, // Motor
{PORT_0, PIN_31, GPIO_FUNC_OUT, GPIO_PAD_NONE}, // ECG switch
};
const unsigned int num_pins = (sizeof(pins) / sizeof(gpio_cfg_t));
for (int i = 0; i < num_pins; i++) {
GPIO_OutClr(&pins[i]);
GPIO_Config(&pins[i]);
}
if ((err = Console_Init()) != E_NO_ERROR) {
MXC_ASSERT_FAIL();
return err;
......
......@@ -181,7 +181,7 @@ __weak void SystemInit(void)
MXC_GPIO1->vssel |= (1 << 14) | (1 << 15); // GPIO for RGB LEDs
#if BOARD_EVKIT
MXC_GPIO1->vssel |= (1 << 8) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 12); // TODO: TMP for devboard
MXC_GPIO1->vssel |= (1 << 8) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 12);
#endif
MXC_GPIO1->ps |= 0xFFFFFFFF;
......
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