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