9 years, 8 months ago.

Does the GPIO library work differently on the K64F vs other boards?

The GPIO object type gpio_t seems to be defined differently when I select the K64F Platform, and I get the following error (only when I select the K64F platform):

Error: Class "gpio_t" has no member "reg_set" in "PololuLedStrip/PololuLedStrip.cpp", Line: 52, Col: 44 Error: Class "gpio_t" has no member "reg_clr" in "PololuLedStrip/PololuLedStrip.cpp", Line: 52, Col: 58 Error: Class "gpio_t" has no member "mask" in "PololuLedStrip/PololuLedStrip.cpp", Line: 52, Col: 72

Project at: http://mbed.org/users/michaeljkoster/code/PololuLedStrip/

Thanks!

Question relating to:

The Freedom-K64F is an ultra-low-cost development platform for Kinetis K64, K63, and K24 MCUs.

1 Answer

9 years, 8 months ago.

reg_set, reg_clr, etc are target specific names. Now most targets use them, since the gpio of most microcontrollers use similar registers. But not all. The k64F specifically not since it uses the standard freescale library code, which only requires the pin name (and is probably very slow).

Isn't the timing overhead of DigitalOut sufficiently small? Okay on the K64F it might very well not be. but generally those pulse based interfaces have quite a bit of error margin. You could use FastIO, if you first add support for the K64F to the FastIO lib :P. And since it is a template lib, it would mean your lib would also need to be a template.

Accepted Answer