Skip to content

Commit 60c1c50

Browse files
michal-smolacarlescufi
authored andcommitted
drivers: pwm: Fix NXP TPM without combine channel feature
TMP variant without combine channel feature is used in some NXP SoCs. Build error occurs for such socs because of accessing unavailable struct member in hal. Fix it by adding #if directive to check the feature presence. Signed-off-by: Michal Smola <[email protected]>
1 parent 42602e6 commit 60c1c50

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/pwm/pwm_mcux_tpm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ static int mcux_tpm_init(const struct device *dev)
162162
channel->chnlNumber = i;
163163
channel->level = kTPM_NoPwmSignal;
164164
channel->dutyCyclePercent = 0;
165+
#if defined(FSL_FEATURE_TPM_HAS_COMBINE) && FSL_FEATURE_TPM_HAS_COMBINE
165166
channel->firstEdgeDelayPercent = 0;
167+
#endif
166168
channel++;
167169
}
168170

0 commit comments

Comments
 (0)