Skip to content

Commit fb3fce5

Browse files
decsnyhenrikbrixandersen
authored andcommitted
drivers: pwm_mcux_tpm: support pause level feature
Support TPM devices with the pause level selection feature Signed-off-by: Declan Snyder <[email protected]>
1 parent 7152dc1 commit fb3fce5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/pwm/pwm_mcux_tpm.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,12 @@ static int mcux_tpm_init(const struct device *dev)
160160

161161
for (i = 0; i < config->channel_count; i++) {
162162
channel->chnlNumber = i;
163+
#if !(defined(FSL_FEATURE_TPM_HAS_PAUSE_LEVEL_SELECT) && FSL_FEATURE_TPM_HAS_PAUSE_LEVEL_SELECT)
163164
channel->level = kTPM_NoPwmSignal;
165+
#else
166+
channel->level = kTPM_HighTrue;
167+
channel->pauseLevel = kTPM_ClearOnPause;
168+
#endif
164169
channel->dutyCyclePercent = 0;
165170
#if defined(FSL_FEATURE_TPM_HAS_COMBINE) && FSL_FEATURE_TPM_HAS_COMBINE
166171
channel->firstEdgeDelayPercent = 0;

0 commit comments

Comments
 (0)