111 #include "Std_Types.h" 128 #define PWM_SW_MAJOR_VERSION (1U) 130 #define PWM_SW_MINOR_VERSION (2U) 132 #define PWM_SW_PATCH_VERSION (1U) 142 #define PWM_AR_RELEASE_MAJOR_VERSION (4U) 144 #define PWM_AR_RELEASE_MINOR_VERSION (3U) 146 #define PWM_AR_RELEASE_REVISION_VERSION (1U) 154 #define PWM_VENDOR_ID ((uint16) 44U) 156 #define PWM_MODULE_ID ((uint16) 121U) 158 #define PWM_INSTANCE_ID ((uint8) 0U) 172 #ifndef PWM_E_INIT_FAILED 173 #define PWM_E_INIT_FAILED ((uint8)(0x10U)) 181 #define PWM_E_UNINIT ((uint8)(0x11U)) 188 #ifndef PWM_E_PARAM_CHANNEL 189 #define PWM_E_PARAM_CHANNEL ((uint8)(0x12U)) 196 #ifndef PWM_E_PERIOD_UNCHANGEABLE 197 #define PWM_E_PERIOD_UNCHANGEABLE ((uint8)(0x13U)) 203 #ifndef PWM_E_ALREADY_INITIALIZED 204 #define PWM_E_ALREADY_INITIALIZED ((uint8)(0x14U)) 210 #ifndef PWM_E_PARAM_POINTER 211 #define PWM_E_PARAM_POINTER ((uint8)(0x15U)) 218 #ifndef PWM_E_NOT_DISENGAGED 219 #define PWM_E_NOT_DISENGAGED ((uint8)(0x16U)) 231 #define PWM_SID_INIT ((uint8)(0x0U)) 233 #define PWM_SID_DEINIT ((uint8)(0x1U)) 235 #define PWM_SID_SET_DUTY_CYCLE ((uint8)(0x2U)) 237 #define PWM_SID_SET_PERIOD_AND_DUTY ((uint8)(0x3U)) 239 #define PWM_SID_SET_OUTPUT_TO_IDLE ((uint8)(0x4U)) 241 #define PWM_SID_GET_OUTPUT_STATE ((uint8)(0x5U)) 243 #define PWM_SID_DISABLE_NOTIFICATION ((uint8)(0x6U)) 245 #define PWM_SID_ENABLE_NOTIFICATION ((uint8)(0x7U)) 247 #define PWM_SID_GET_VERSION_INFO ((uint8)(0x8U)) 249 #define PWM_SID_REGISTER_READBACK ((uint8)(0xDU)) 259 #define PWM_STATUS_UNINIT ((uint8)(0U)) 261 #define PWM_STATUS_INIT ((uint8)(1U)) 275 #define PWM_DUTY_0_PERCENT (0x0U) 277 #define PWM_DUTY_100_PERCENT (0x8000U) 279 #define PWM_DUTY_50_PERCENT (0x4000U) 281 #if defined (SOC_AM65XX) 283 #define PWM_MAX_NUM_CHANNELS (16U) 286 #if defined (SOC_J721E) 287 #define PWM_MAX_NUM_CHANNELS (30U) 293 #define PWM_CHANNEL1 (0U) 295 #define PWM_CHANNEL2 (1U) 297 #define PWM_CHANNEL3 (2U) 299 #define PWM_CHANNEL4 (3U) 301 #define PWM_CHANNEL5 (4U) 303 #define PWM_CHANNEL6 (5U) 305 #define PWM_CHANNEL7 (6U) 307 #define PWM_CHANNEL8 (7U) 309 #define PWM_CHANNEL9 (8U) 311 #define PWM_CHANNEL10 (9U) 313 #define PWM_CHANNEL11 (10U) 315 #define PWM_CHANNEL12 (11U) 317 #define PWM_CHANNEL13 (12U) 319 #define PWM_CHANNEL14 (13U) 321 #define PWM_CHANNEL15 (14U) 323 #define PWM_CHANNEL16 (15U) 325 #if defined (SOC_J721E) 327 #define PWM_CHANNEL17 (16U) 329 #define PWM_CHANNEL18 (17U) 331 #define PWM_CHANNEL19 (18U) 333 #define PWM_CHANNEL20 (19U) 335 #define PWM_CHANNEL21 (20U) 337 #define PWM_CHANNEL22 (21U) 339 #define PWM_CHANNEL23 (22U) 341 #define PWM_CHANNEL24 (23U) 343 #define PWM_CHANNEL25 (24U) 345 #define PWM_CHANNEL26 (25U) 347 #define PWM_CHANNEL27 (26U) 349 #define PWM_CHANNEL28 (27U) 351 #define PWM_CHANNEL29 (28U) 353 #define PWM_CHANNEL30 (29U) 428 typedef struct Pwm_ConfigType_PC_s
462 #if (PWM_NOTIFICATION_SUPPORTED == STD_ON) 471 typedef struct Pwm_ConfigType_s
477 #if (STD_ON == PWM_REGISTER_READBACK_API) 520 FUNC(
void, PWM_CODE)
Pwm_Init(P2CONST
523 #if (STD_ON == PWM_DEINIT_API) 545 #if (STD_ON == PWM_SET_DUTY_CYCLE_API) 568 Pwm_ChannelType ChannelNumber, uint16 DutyCycle);
571 #if (STD_ON == PWM_SET_PERIOD_AND_DUTY_API) 595 Pwm_ChannelType ChannelNumber, Pwm_PeriodType Period, uint16 DutyCycle);
598 #if (STD_ON == PWM_SET_OUTPUT_TO_IDLE_API) 620 #if (STD_ON == PWM_NOTIFICATION_SUPPORTED) 642 #if (STD_ON == PWM_NOTIFICATION_SUPPORTED) 664 Pwm_ChannelType ChannelNumber, Pwm_EdgeNotificationType Notification);
686 P2VAR(Std_VersionInfoType, AUTOMATIC, PWM_APPL_DATA) versioninfo);
688 #if(STD_ON == PWM_REGISTER_READBACK_API)
Pwm_OutputStateType idleState
Definition: Pwm.h:446
uint32 pwmRev
Definition: Pwm.h:486
Pwm configuration structure.
Definition: Pwm.h:471
PWM register readback structure.
Definition: Pwm.h:481
Std_ReturnType Pwm_RegisterReadback(Pwm_ChannelType ChannelNumber, Pwm_RegisterReadbackType *RegRbPtr)
This function reads the important registers of the hardware unit and returns the value in the structu...
void Pwm_Init(const Pwm_ConfigType *ConfigPtr)
Service for PWM initialization.
Pwm_ChannelClassType
Period type for pwm channels. Fixed periods prohibit changes to the period length with Pwm_SetPeriod(...
Definition: Pwm.h:407
Pwm_EdgeNotificationType
Possible edge notification.
Definition: Pwm.h:381
Pwm_ChannelClassType channelClass
Definition: Pwm.h:448
void Pwm_EnableNotification(Pwm_ChannelType ChannelNumber, Pwm_EdgeNotificationType Notification)
Service to enable the Edge Notification.
uint32 hwPeriod
Definition: Pwm.h:442
Pwm_OutputStateType
Possible output states of a PWM channel.
Definition: Pwm.h:368
void Pwm_DeInit(void)
Service for PWM de-initialization.
uint32 Pwm_PeriodType
typedef of period value
Definition: Pwm.h:394
void Pwm_SetPeriodAndDuty(Pwm_ChannelType ChannelNumber, Pwm_PeriodType Period, uint16 DutyCycle)
Service for setting Period and Duty Cycle.
uint32 pwmTimerSynCtrl
Definition: Pwm.h:490
uint32 Pwm_ChannelType
PWM Channel type.
Definition: Pwm.h:399
Pwm_ChannelType channelId
Definition: Pwm.h:424
uint32 pwmTtgr
Definition: Pwm.h:488
void Pwm_SetOutputToIdle(Pwm_ChannelType ChannelNumber)
Service to set the output of a channel immediately to idle.
This file contains generated pre compile configuration file for PWM MCAL driver.
Pwm channel configuration.
Definition: Pwm.h:436
#define PWM_NUM_CHANNELS
Number of configured channels.
Definition: Pwm_Cfg.h:128
Pwm_OutputStateType polarity
Definition: Pwm.h:444
void Pwm_DisableNotification(Pwm_ChannelType ChannelNumber)
Service to disable the Edge Notification.
uint32 prescale
Definition: Pwm.h:450
void(* Pwm_NotifyFuncType)(void)
Notification callback function pointer.
Definition: Pwm.h:420
Pwm channel configuration.
Definition: Pwm.h:422
uint16 dutyCycle
Definition: Pwm.h:440
void Pwm_SetDutyCycle(Pwm_ChannelType ChannelNumber, uint16 DutyCycle)
Service for setting Duty Cycle.
uint32 instanceClkHz
Definition: Pwm.h:438
void Pwm_GetVersionInfo(Std_VersionInfoType *versioninfo)
This service returns the version information of this module.
Pwm configuration structure.
Definition: Pwm.h:428
Pwm_NotifyFuncType notificationHandler
Definition: Pwm.h:463