174 #ifndef ti_drivers_PWM__include
175 #define ti_drivers_PWM__include
195 #define PWM_CMD_RESERVED 32
209 #define PWM_STATUS_RESERVED -32
217 #define PWM_STATUS_SUCCESS 0
225 #define PWM_STATUS_ERROR -1
234 #define PWM_STATUS_UNDEFINEDCMD -2
381 extern void PWM_close(PWM_Handle handle);
402 extern int PWM_control(PWM_Handle handle,
unsigned int cmd,
void *arg);
478 extern void PWM_setDuty(PWM_Handle handle, uint32_t duty);
PWM_Polarity
Definitions for various PWM output polarity.
Definition: PWM.h:255
PWM_GetPeriodMicroSecsFxn getPeriodMicroSecsFxn
Definition: PWM.h:338
void PWM_close(PWM_Handle handle)
Function to close a PWM peripheral specified by the PWM handle.
uint32_t period
Definition: PWM.h:269
PWM Global configuration.
Definition: PWM.h:361
PWM_OpenFxn openFxn
Definition: PWM.h:344
PWM_SetDutyFxn setDutyFxn
Definition: PWM.h:347
PWM_FxnTable const * fxnTablePtr
Definition: PWM.h:363
PWM_DutyMode dutyMode
Definition: PWM.h:270
PWM_Polarity polarity
Definition: PWM.h:271
PWM_Handle PWM_open(unsigned int index, PWM_Params *params)
This function opens a given PWM peripheral.
struct PWM_Config PWM_Config
PWM Global configuration.
PWM_CloseFxn closeFxn
Definition: PWM.h:329
void(* PWM_SetDutyFxn)(PWM_Handle handle, uint32_t duty)
A function pointer to a driver specific implementation of PWM_setDuty().
Definition: PWM.h:319
void * object
Definition: PWM.h:366
void PWM_init(void)
This function initializes the PWM module.
PWM_GetPeriodCountsFxn getPeriodCountsFxn
Definition: PWM.h:335
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:280
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:327
struct PWM_Config * PWM_Handle
A handle that is returned from a PWM_open() call.
Definition: PWM.h:239
void const * hwAttrs
Definition: PWM.h:369
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:312
PWM Parameters.
Definition: PWM.h:268
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:306
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:286
unsigned int(* PWM_GetPeriodCountsFxn)(PWM_Handle handle)
A function pointer to a driver specific implementation of PWM_getPeriodCounts().
Definition: PWM.h:294
PWM_ControlFxn controlFxn
Definition: PWM.h:332
PWM_DutyMode
Definitions for various units for specifying the PWM duty.
Definition: PWM.h:245
unsigned int(* PWM_GetPeriodMicroSecsFxn)(PWM_Handle handle)
A function pointer to a driver specific implementation of PWM_getPeriodMicroSecs().
Definition: PWM.h:300
unsigned int PWM_getPeriodCounts(PWM_Handle handle)
Get the PWM handle period in timer counts.
PWM_InitFxn initFxn
Definition: PWM.h:341
void * custom
Definition: PWM.h:272