![]() |
Dataflow Runtime API
3.0.3.0
|
Enumerations | |
| enum | PwmModuleAddress { PwmModuleAddress_Pwm0 = SOC_EPWM_0_REGS , PwmModuleAddress_Pwm1 = SOC_EPWM_1_REGS , PwmModuleAddress_Pwm2 = SOC_EPWM_2_REGS } |
| Enhanced PWM (ePWM) peripheral module. More... | |
| enum | PwmOutChannel { PwmOutChannel_A = 0 , PwmOutChannel_B } |
| Id's of the available PWM output channels. More... | |
Functions | |
| void | PWM_Init (const PwmModuleAddress moduleBaseAddress, const PwmOutChannel channel, const uint32_t frequency, const bool isOutputInverted, const uint16_t initialDutyCycle) |
| Initializes the PWM output according to the specified parameters. More... | |
| void | PWM_SetDutyCycle (const PwmModuleAddress moduleBaseAddress, const PwmOutChannel channel, uint16_t dutyCycle) |
| Sets the duty cycle for a specific channel. More... | |
| enum PwmModuleAddress |
| enum PwmOutChannel |
| void PWM_Init | ( | const PwmModuleAddress | moduleBaseAddress, |
| const PwmOutChannel | channel, | ||
| const uint32_t | frequency, | ||
| const bool | isOutputInverted, | ||
| const uint16_t | initialDutyCycle | ||
| ) |
Initializes the PWM output according to the specified parameters.
| moduleBaseAddress | |
| channel | |
| frequency | |
| isOutputInverted | |
| initialDutyCycle |
| void PWM_SetDutyCycle | ( | const PwmModuleAddress | moduleBaseAddress, |
| const PwmOutChannel | channel, | ||
| uint16_t | dutyCycle | ||
| ) |
Sets the duty cycle for a specific channel.
| moduleBaseAddress | |
| channel | |
| dutyCycle | - 0 means fully closed, 5000 means fully open. If > 5000, it's limited to 5000 |