Donald Bosley

GPIO Port Name Update, wrong in Kinetis SDK 1.2 API Documentation?

Discussion created by Donald Bosley on May 26, 2015

If you're migrating a project that uses custom pin declarations, and you copy old "board" files, you're going to have a problem...

 

Make pin used to be :

kGpioLED2       = GPIO_MAKE_PIN(HW_GPIOB, 19U),  /* */

where HW_GPIOB set the port.

 

The documentation says something to the effect of HW_PORTB would be proper now...

// Feel free to change the pin names as what you want

enum _gpio_pins

{

  kGpioLED1 = GPIO_MAKE_PIN(HW_PORTC, 0x0), 

  kGpioLED2 = GPIO_MAKE_PIN(HW_PORTC, 0x1), 

  kGpioLED3 = GPIO_MAKE_PIN(HW_PORTC, 0x2), 

  kGpioLED4 = GPIO_MAKE_PIN(HW_PORTC, 0x3), 

};

 

But that fails to compile...

 

 

So I saw in the new gpio_pins.h file is this guy:

GPIOB_IDX

 

Which now compiles...

 

 

 

Outcomes