216 #ifndef ti_drivers_PWM__include   217 #define ti_drivers_PWM__include   229 #define PWM_DUTY_FRACTION_MAX        ((uint32_t) ~0)   242 #define PWM_CMD_RESERVED             (32)   256 #define PWM_STATUS_RESERVED          (-32)   265 #define PWM_STATUS_SUCCESS           (0)   273 #define PWM_STATUS_ERROR             (-1)   282 #define PWM_STATUS_UNDEFINEDCMD      (-2)   290 #define PWM_STATUS_INVALID_PERIOD    (-3)   298 #define PWM_STATUS_INVALID_DUTY      (-4)   454 extern void PWM_close(PWM_Handle handle);
   475 extern int_fast16_t 
PWM_control(PWM_Handle handle, uint_fast16_t cmd,
   540 extern int_fast16_t 
PWM_setDuty(PWM_Handle handle, uint32_t duty);
   561 extern int_fast16_t 
PWM_setPeriod(PWM_Handle handle, uint32_t period);
   573 extern void PWM_start(PWM_Handle handle);
   586 extern void PWM_stop(PWM_Handle handle);
 struct PWM_Params_ PWM_Params
PWM Parameters. 
PWM_InitFxn initFxn
Definition: PWM.h:413
int_fast16_t PWM_control(PWM_Handle handle, uint_fast16_t cmd, void *arg)
Function performs implementation specific features on a given PWM_Handle. 
uint32_t dutyValue
Definition: PWM.h:341
void PWM_close(PWM_Handle handle)
Function to close a PWM instance specified by the PWM handle. 
struct PWM_Config_ * PWM_Handle
A handle that is returned from a PWM_open() call. 
Definition: PWM.h:350
PWM_Duty_Units dutyUnits
Definition: PWM.h:340
PWM_IdleLevel_
Idle output level when PWM is not running (stopped / not started). 
Definition: PWM.h:324
PWM_Handle PWM_open(uint_least8_t index, PWM_Params *params)
This function opens a given PWM instance and sets the period, duty and idle level to those specified ...
uint32_t periodValue
Definition: PWM.h:339
PWM_SetDutyFxn setDutyFxn
Definition: PWM.h:417
PWM_Duty_Units_
PWM duty cycle unit definitions. Refer to device specific implementation if using PWM_DUTY_COUNTS (ra...
Definition: PWM.h:315
PWM Global configuration. 
Definition: PWM.h:433
PWM_Period_Units_
PWM period unit definitions. Refer to device specific implementation if using PWM_PERIOD_COUNTS (raw ...
Definition: PWM.h:304
void PWM_init(void)
This function initializes the PWM module. 
The definition of a PWM function table that contains the required set of functions to control a speci...
Definition: PWM.h:407
int_fast16_t(* PWM_ControlFxn)(PWM_Handle handle, uint_fast16_t cmd, void *arg)
A function pointer to a driver specific implementation of PWM_control(). 
Definition: PWM.h:362
void(* PWM_CloseFxn)(PWM_Handle handle)
A function pointer to a driver specific implementation of PWM_close(). 
Definition: PWM.h:356
PWM_Period_Units periodUnits
Definition: PWM.h:338
PWM_StartFxn startFxn
Definition: PWM.h:421
void(* PWM_StopFxn)(PWM_Handle handle)
A function pointer to a driver specific implementation of PWM_stop(). 
Definition: PWM.h:400
PWM_IdleLevel idleLevel
Definition: PWM.h:342
int_fast16_t(* PWM_SetDutyFxn)(PWM_Handle handle, uint32_t duty)
A function pointer to a driver specific implementation of PWM_setDuty(). 
Definition: PWM.h:380
PWM Parameters. 
Definition: PWM.h:337
enum PWM_Period_Units_ PWM_Period_Units
PWM period unit definitions. Refer to device specific implementation if using PWM_PERIOD_COUNTS (raw ...
void * object
Definition: PWM.h:437
void const  * hwAttrs
Definition: PWM.h:439
PWM_StopFxn stopFxn
Definition: PWM.h:423
void(* PWM_StartFxn)(PWM_Handle handle)
A function pointer to a driver specific implementation of PWM_start(). 
Definition: PWM.h:394
PWM_FxnTable const  * fxnTablePtr
Definition: PWM.h:435
void PWM_Params_init(PWM_Params *params)
Function to initialize the PWM_Params structure to default values. 
PWM_Handle(* PWM_OpenFxn)(PWM_Handle handle, PWM_Params *params)
A function pointer to a driver specific implementation of PWM_open(). 
Definition: PWM.h:374
PWM_ControlFxn controlFxn
Definition: PWM.h:411
int_fast16_t PWM_setDuty(PWM_Handle handle, uint32_t duty)
Function to set the duty cycle of the specified PWM handle. PWM instances run in active high output m...
void(* PWM_InitFxn)(PWM_Handle handle)
A function pointer to a driver specific implementation of PWM_init(). 
Definition: PWM.h:368
struct PWM_Config_ PWM_Config
PWM Global configuration. 
enum PWM_IdleLevel_ PWM_IdleLevel
Idle output level when PWM is not running (stopped / not started). 
PWM_SetPeriodFxn setPeriodFxn
Definition: PWM.h:419
int_fast16_t PWM_setPeriod(PWM_Handle handle, uint32_t period)
Function to set the period of the specified PWM handle. This API can be called while the PWM is runni...
int_fast16_t(* PWM_SetPeriodFxn)(PWM_Handle handle, uint32_t period)
A function pointer to a driver specific implementation of PWM_setPeriod(). 
Definition: PWM.h:387
void * custom
Definition: PWM.h:343
PWM_CloseFxn closeFxn
Definition: PWM.h:409
struct PWM_FxnTable_ PWM_FxnTable
The definition of a PWM function table that contains the required set of functions to control a speci...
PWM_OpenFxn openFxn
Definition: PWM.h:415
void PWM_stop(PWM_Handle handle)
Function to stop the specified PWM handle. Output will set to the idle level specified by params in P...
void PWM_start(PWM_Handle handle)
Function to start the specified PWM handle with current settings. 
enum PWM_Duty_Units_ PWM_Duty_Units
PWM duty cycle unit definitions. Refer to device specific implementation if using PWM_DUTY_COUNTS (ra...