nxp-mcuxpresso / mcux-sdk

MCUXpresso SDK
BSD 3-Clause "New" or "Revised" License
301 stars 136 forks source link

drivers: ftm: fix compiler warning when clocks disabled #155

Closed manuargue closed 6 months ago

manuargue commented 6 months ago

Add missing guards to avoid compilation warnings when building with clock control driver disabled.

Prerequisites

Describe the pull request Add missing guards to avoid compilation warnings when building FTM driver with clock control driver disabled. Example of warning without this patch:

Building C object modules/hal_nxp...dir/mcux/mcux-sdk/drivers/ftm/fsl_ftm.c.obj
/home/user/zephyrproject/modules/hal/nxp/mcux/mcux-sdk/drivers/ftm/fsl_ftm.c:72:17: warning: 'FTM_GetInstance' defined but not used [-Wunused-function]
   72 | static uint32_t FTM_GetInstance(FTM_Type *base)
      |

Type of change

Tests