AnsweredAssumed Answered

When I type these codes in Kinetis Design Studio, I am getting Syntax error. Can anyone debug the errors ?

Question asked by Ganesh Ramachandran on Mar 24, 2016
Latest reply on Mar 29, 2016 by Ganesh Ramachandran

There is syntax error in each line. How to resolve it ? The controller which I work on is MKE02Z64VLD2 and the IDE which I use is Kinetis Design Studio.

(void)BitIoLdd1_Init(NULL); /* initialize the port pin PTB1 */

  /* enable internal pull-up on PTB1 */

  PORT_PDD_SetPinPullSelect(PORTB_BASE_PTR, 1, PORT_PDD_PULL_UP);

  PORT_PDD_SetPinPullEnable(PORTB_BASE_PTR, 1, PORT_PDD_PULL_ENABLE);

  WAIT1_Waitms(5); /* wait get pull-up a chance to pull-up */

 

  if (!BL_SW_GetVal()) { /* button pressed (has pull-up!) */

    WAIT1_Waitms(50); /* wait to debounce */

    if (!BL_SW_GetVal()) { /* still pressed */

      return TRUE; /* go into bootloader mode */

    }

  }

  /* BTLD switch not pressed, and we have a valid user application vector */

  return FALSE; /* do not enter bootloader mode */

}

Outcomes