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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

529 Views
bosleymusic_com
Contributor IV

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...

 

 

 

Labels (1)
0 Kudos
0 Replies