eFlexPwm
Arduino eFlexPwm library for Teensy 4.x
|
Configuration. More...
#include <eFlexPwmConfig.h>
Public Member Functions | |
Config () | |
Construct a new Config object with the default settings. More... | |
void | setPwmFreqHz (uint32_t pwmFreqHz) |
Set the PWM signal frequency in Hz. | |
uint32_t | pwmFreqHz () const |
PWM signal frequency in Hz, default 5000. | |
void | setMode (pwm_mode_t mode) |
Set the PWM operation mode. | |
pwm_mode_t | mode () const |
PWM operation mode, default CenterAligned . | |
void | setReloadSelect (pwm_reload_source_select_t reloadSelect) |
Set the reload source select. | |
pwm_reload_source_select_t | reloadSelect () const |
Option to initialize the counter, default kPWM_LocalReload . | |
void | setClockSource (pwm_clock_source_t clockSource) |
Select the Clock source for the counter. | |
pwm_clock_source_t | clockSource () const |
Clock source for the counter, default kPWM_BusClock . | |
void | setPrescale (pwm_clock_prescale_t prescale) |
Set the Pre-scaler to divide down the clock. | |
pwm_clock_prescale_t | prescale () const |
Pre-scaler to divide down the clock, default kPWM_Prescale_Divide_1 . | |
void | setInitializationControl (pwm_init_source_t initializationControl) |
Set the Option to initialize the counter. | |
pwm_init_source_t | initializationControl () const |
Reload source select, default kPWM_Initialize_LocalSync . | |
void | setForceTrigger (pwm_force_output_trigger_t forceTrigger) |
Specify which signal will trigger a FORCE_OUT. | |
pwm_force_output_trigger_t | forceTrigger () const |
Specify which signal will trigger a FORCE_OUT, default kPWM_Force_Local . | |
void | setReloadFrequency (pwm_load_frequency_t reloadFrequency) |
Specifies when to reload. | |
pwm_load_frequency_t | reloadFrequency () const |
Specifies when to reload, default kPWM_LoadEveryOportunity . More... | |
void | setReloadLogic (pwm_register_reload_t reloadLogic) |
Set the PWM Reload logic setup. | |
pwm_register_reload_t | reloadLogic () const |
PWM Reload logic setup, default kPWM_ReloadImmediate . | |
void | setPairOperation (pwm_chnl_pair_operation_t pairOperation) |
Set the channel pair in indepedent or complementary mode. | |
pwm_chnl_pair_operation_t | pairOperation () const |
Channel pair in indepedent or complementary mode, default kPWM_Independent . | |
void | enableDebugMode (bool enable) |
enable Debug Mode More... | |
bool | debugModeEnabled () const |
Debug mode, default false. More... | |
void | enableWaitMode (bool enable) |
enable Wait Mode More... | |
bool | waitModeEnabled () const |
Wait mode, default false. More... | |
Configuration.
Definition at line 20 of file eFlexPwmConfig.h.
eFlex::Config::Config | ( | ) |
Construct a new Config object with the default settings.
The default values are:
pwmFreqHz()
= 5000mode()
= CenterAligneddebugModeEnabled()
= falsewaitModeEnabled()
= falsereloadSelect()
= kPWM_LocalReloadclockSource()
= kPWM_BusClockprescale()
= kPWM_Prescale_Divide_1initializationControl()
= kPWM_Initialize_LocalSyncforceTrigger()
= kPWM_Force_LocalreloadFrequency()
= kPWM_LoadEveryOportunityreloadLogic()
= kPWM_ReloadImmediatepairOperation()
= kPWM_Independent
|
inline |
Debug mode, default false.
Definition at line 220 of file eFlexPwmConfig.h.
|
inline |
enable Debug Mode
enable | true PWM continues to run in debug mode, false PWM is paused in debug mode |
Definition at line 209 of file eFlexPwmConfig.h.
|
inline |
enable Wait Mode
enable | true PWM is paused in debug mode, false PWM is paused in WAIT mode |
Definition at line 230 of file eFlexPwmConfig.h.
References _pwm_config::enableWait.
|
inline |
Specifies when to reload, default kPWM_LoadEveryOportunity
.
used when user's choice is not immediate reload
Definition at line 167 of file eFlexPwmConfig.h.
References _pwm_config::reloadFrequency.
Referenced by setReloadFrequency().
|
inline |
Wait mode, default false.
Definition at line 241 of file eFlexPwmConfig.h.
References _pwm_config::enableWait.