168 #ifndef ti_drivers_PWM__include
169 #define ti_drivers_PWM__include
195 #define PWM_CMD_RESERVED 32
209 #define PWM_STATUS_RESERVED -32
224 #define PWM_STATUS_SUCCESS 0
232 #define PWM_STATUS_ERROR -1
241 #define PWM_STATUS_UNDEFINEDCMD -2
403 extern void PWM_close(PWM_Handle handle);
442 extern int PWM_control(PWM_Handle handle,
unsigned int cmd,
void *arg);
518 extern void PWM_setDuty(PWM_Handle handle, uint32_t duty);
PWM_Polarity
Definitions for various PWM output polarity.
Definition: PWM.h:277
PWM_GetPeriodMicroSecsFxn getPeriodMicroSecsFxn
Definition: PWM.h:360
void PWM_close(PWM_Handle handle)
Function to close a PWM peripheral specified by the PWM handle.
uint32_t period
Definition: PWM.h:291
PWM Global configuration.
Definition: PWM.h:383
PWM_OpenFxn openFxn
Definition: PWM.h:366
PWM_SetDutyFxn setDutyFxn
Definition: PWM.h:369
PWM_FxnTable const * fxnTablePtr
Definition: PWM.h:385
PWM_DutyMode dutyMode
Definition: PWM.h:292
PWM_Polarity polarity
Definition: PWM.h:293
PWM_Handle PWM_open(unsigned int index, PWM_Params *params)
This function opens a given PWM peripheral.
uintptr_t custom
Definition: PWM.h:294
struct PWM_Config PWM_Config
PWM Global configuration.
PWM_CloseFxn closeFxn
Definition: PWM.h:351
void(* PWM_SetDutyFxn)(PWM_Handle handle, uint32_t duty)
A function pointer to a driver specific implementation of PWM_setDuty().
Definition: PWM.h:341
void * object
Definition: PWM.h:388
void PWM_init(void)
This function initializes the PWM module.
PWM_GetPeriodCountsFxn getPeriodCountsFxn
Definition: PWM.h:357
struct PWM_Params PWM_Params
PWM Parameters.
void(* PWM_CloseFxn)(PWM_Handle handle)
A function pointer to a driver specific implementation of PWM_close().
Definition: PWM.h:302
int PWM_control(PWM_Handle handle, unsigned int cmd, void *arg)
Function performs implementation specific features on a given PWM_Handle.
The definition of a PWM function table that contains the required set of functions to control a speci...
Definition: PWM.h:349
struct PWM_Config * PWM_Handle
A handle that is returned from a PWM_open() call.
Definition: PWM.h:261
void const * hwAttrs
Definition: PWM.h:391
void PWM_setDuty(PWM_Handle handle, uint32_t duty)
Function to set the duty cycle of the specified PWM handle.
struct PWM_FxnTable PWM_FxnTable
The definition of a PWM function table that contains the required set of functions to control a speci...
void PWM_Params_init(PWM_Params *params)
Function to initialize the PWM_Params struct to its defaults.
PWM_Handle(* PWM_OpenFxn)(PWM_Handle handle, PWM_Params *params)
A function pointer to a driver specific implementation of PWM_open().
Definition: PWM.h:334
PWM Parameters.
Definition: PWM.h:290
unsigned int PWM_getPeriodMicroSecs(PWM_Handle handle)
Get the PWM handle period in microseconds.
void(* PWM_InitFxn)(PWM_Handle handle)
A function pointer to a driver specific implementation of PWM_init().
Definition: PWM.h:328
int(* PWM_ControlFxn)(PWM_Handle handle, unsigned int cmd, void *arg)
A function pointer to a driver specific implementation of PWM_control().
Definition: PWM.h:308
unsigned int(* PWM_GetPeriodCountsFxn)(PWM_Handle handle)
A function pointer to a driver specific implementation of PWM_getPeriodCounts().
Definition: PWM.h:316
PWM_ControlFxn controlFxn
Definition: PWM.h:354
PWM_DutyMode
Definitions for various units for specifying the PWM duty.
Definition: PWM.h:267
unsigned int(* PWM_GetPeriodMicroSecsFxn)(PWM_Handle handle)
A function pointer to a driver specific implementation of PWM_getPeriodMicroSecs().
Definition: PWM.h:322
unsigned int PWM_getPeriodCounts(PWM_Handle handle)
Get the PWM handle period in timer counts.
PWM_InitFxn initFxn
Definition: PWM.h:363