1.8.14.5 1.25.13.5 1.26.12.5 1.27.13.5 1.28.16.5 1.34.11.5 1.41.13.5 1.42.11.5 PWMx_ChannelPeriodGet Function

C

/* x = PWM instance number */

uint32_t PWMx_ChannelPeriodGet (PWM_CHANNEL_NUM channel);

uint16_t PWMx_ChannelPeriodGet (PWM_CHANNEL_NUM channel);

Summary

Reads the period value of given PWM channel

Description

This function reads the period value of given PWM channel.

Precondition

PWMx_Initialize() function must have been called first for the associated instance.

Parameters

Param Description
channel PWM channel

Returns

The PWM channel's period value. Refer the generated header file for the exact return value type.

Example

uint16_t period;
PWM0_Initialize();
period = PWM0_ChannelPeriodGet(PWM_CHANNEL_0);

Remarks

Refer the generated header file for the exact function signature