AnsweredAssumed Answered

Using gpio on k22f

Question asked by Jeff Verive on Oct 28, 2014
Latest reply on Oct 22, 2015 by amin iman

Hi all. I have had success controlling the on-board multi-color LED using kGpioLED1, kGpioLED2, and kGpioLED3, but I have a project that requires the use of several (16) GPIO pins. I've tried to follow the information in the API reference manual at C:\Freescale\KSDK_1.0.0\doc\Kinetis SDK API Reference Manual, but I'm not really understanding all that is necessary to handle GPIO pins.

 

What is needed to assign names to GPIO pins and set them up as general inputs or outputs? I'd like to use  GPIO_DRV_SetPinDir(pinName, value) and GPIO_DRV_WritePinOutput(pinName, value) to set input/output mode and to read/write pin values, but I'm open to using other functions/methods if need be.

 

Thanks,

Jeff

Outcomes