27 #if (HAL_USE_PWM == TRUE) || defined(__DOXYGEN__) 74 #if defined(PWM_DRIVER_EXT_INIT_HOOK) 75 PWM_DRIVER_EXT_INIT_HOOK(pwmp);
171 osalDbgCheck((pwmp != NULL) && (channel < pwmp->channels));
198 osalDbgCheck((pwmp != NULL) && (channel < pwmp->channels));
268 osalDbgCheck((pwmp != NULL) && (channel < pwmp->channels));
274 "channel not enabled");
276 "undefined channel callback");
296 osalDbgCheck((pwmp != NULL) && (channel < pwmp->channels));
302 "channel not enabled");
304 "undefined channel callback");
void pwmEnableChannel(PWMDriver *pwmp, pwmchannel_t channel, pwmcnt_t width)
Enables a PWM channel.
const PWMConfig * config
Current driver configuration data.
pwmcnt_t period
PWM period in ticks.
#define pwmDisablePeriodicNotificationI(pwmp)
Disables the periodic activation edge notification.
pwmstate_t state
Driver state.
void pwmChangePeriod(PWMDriver *pwmp, pwmcnt_t period)
Changes the period the PWM peripheral.
pwmchnmsk_t enabled
Mask of the enabled channels.
Type of a PWM driver configuration structure.
uint32_t pwmcnt_t
Type of a PWM counter.
static void osalSysUnlock(void)
Leaves a critical zone from thread context.
#define pwmEnableChannelNotificationI(pwmp, channel)
Enables a channel de-activation edge notification.
pwmcallback_t callback
Channel callback pointer.
pwmchannel_t channels
Number of channels in this instance.
void pwmEnablePeriodicNotification(PWMDriver *pwmp)
Enables the periodic activation edge notification.
void pwmStop(PWMDriver *pwmp)
Deactivates the PWM peripheral.
void pwmStart(PWMDriver *pwmp, const PWMConfig *config)
Configures and activates the PWM peripheral.
pwmcallback_t callback
Periodic callback pointer.
#define pwmEnablePeriodicNotificationI(pwmp)
Enables the periodic activation edge notification.
Structure representing a PWM driver.
void pwmInit(void)
PWM Driver initialization.
void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel)
Disables a PWM channel and its notification.
uint32_t pwmchnmsk_t
Type of a channels mask.
#define osalDbgCheck(c)
Function parameters check.
#define pwmEnableChannelI(pwmp, channel, width)
Enables a PWM channel.
void pwmDisablePeriodicNotification(PWMDriver *pwmp)
Disables the periodic activation edge notification.
static void osalSysLock(void)
Enters a critical zone from thread context.
void pwm_lld_stop(PWMDriver *pwmp)
Deactivates the PWM peripheral.
void pwm_lld_start(PWMDriver *pwmp)
Configures and activates the PWM peripheral.
#define pwmChangePeriodI(pwmp, value)
Changes the period the PWM peripheral.
uint8_t pwmchannel_t
Type of a PWM channel.
void pwmEnableChannelNotification(PWMDriver *pwmp, pwmchannel_t channel)
Enables a channel de-activation edge notification.
void pwmObjectInit(PWMDriver *pwmp)
Initializes the standard part of a PWMDriver structure.
void pwm_lld_init(void)
Low level PWM driver initialization.
#define osalDbgAssert(c, remark)
Condition assertion.
void pwmDisableChannelNotification(PWMDriver *pwmp, pwmchannel_t channel)
Disables a channel de-activation edge notification.
#define pwmDisableChannelNotificationI(pwmp, channel)
Disables a channel de-activation edge notification.
PWMChannelConfig channels[PWM_CHANNELS]
Channels configurations.
pwmcnt_t period
Current PWM period in ticks.
#define pwmDisableChannelI(pwmp, channel)
Disables a PWM channel.