Re: FRDM-K64 GPIO driver name


Tomasz Bursztyka
 

Hi Anders,

According to arch/arm/soc/fsl_frdm_k64f/Kconfig GPIO and GPIO_K64 are
set by default.
Verify you get these in your output/.config

The name you should use is GPIO_K64_<X>_DEV_NAME (where X can be A, B,
C, D or E)
(so you should set #define GPIO_DRV_NAME CONFIG_K64_<X>_DEV_NAME in
your code I guess)

Tomasz

Hi,

I am trying to use GPIO on my Freescale FRDM-K64 board. However, I cannot seem to find the driver name. It from this page that the driver name should be something like CONFIG_GPIO_<VENDOR_<MCU>_PORTn_DEV_NAME but nothing matches the FRDM-K64.
https://www.zephyrproject.org/doc/reference/kconfig/index.html

This is the code I'm trying to use (where GPIO_DRV_NAME should be what I need):
gpio_dev = device_get_binding(GPIO_DRV_NAME);
if (!gpio_dev) {
PRINT("Cannot find %s!\n", GPIO_DRV_NAME);
}

Got it from the GPIO example.

Any hints?

/Anders

Join devel@lists.zephyrproject.org to automatically receive all group messages.