aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/STM32/pwm_lld.c6
-rw-r--r--os/hal/src/pwm.c4
-rw-r--r--os/hal/templates/pwm_lld.c20
3 files changed, 7 insertions, 23 deletions
diff --git a/os/hal/platforms/STM32/pwm_lld.c b/os/hal/platforms/STM32/pwm_lld.c
index 249de1651..6a0cf311a 100644
--- a/os/hal/platforms/STM32/pwm_lld.c
+++ b/os/hal/platforms/STM32/pwm_lld.c
@@ -114,7 +114,7 @@ static void serve_interrupt(PWMDriver *pwmp) {
if ((sr & TIM_SR_CC4IF) != 0)
pwmp->pd_config->pc_channels[3].pcc_callback(pwmp);
if ((sr & TIM_SR_UIF) != 0)
- pwmp->pd_config->pc_callback();
+ pwmp->pd_config->pc_callback(pwmp);
}
#endif /* STM32_PWM_USE_TIM2 || STM32_PWM_USE_TIM3 || STM32_PWM_USE_TIM4 */
@@ -416,7 +416,7 @@ void pwm_lld_stop(PWMDriver *pwmp) {
* @brief Enables a PWM channel.
*
* @param[in] pwmp pointer to a @p PWMDriver object
- * @param[in] channel PWM channel identifier
+ * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1])
* @param[in] width PWM pulse width as clock pulses number
*
* @notapi
@@ -494,7 +494,7 @@ void pwm_lld_enable_channel(PWMDriver *pwmp,
* idle state.
*
* @param[in] pwmp pointer to a @p PWMDriver object
- * @param[in] channel PWM channel identifier
+ * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1])
*
* @notapi
*/
diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c
index 95c3f4750..79cc73b30 100644
--- a/os/hal/src/pwm.c
+++ b/os/hal/src/pwm.c
@@ -117,7 +117,7 @@ void pwmStop(PWMDriver *pwmp) {
* @details Programs (or reprograms) a PWM channel.
*
* @param[in] pwmp pointer to a @p PWMDriver object
- * @param[in] channel PWM channel identifier
+ * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1])
* @param[in] width PWM pulse width as clock pulses number
*
* @api
@@ -142,7 +142,7 @@ void pwmEnableChannel(PWMDriver *pwmp,
* idle state.
*
* @param[in] pwmp pointer to a @p PWMDriver object
- * @param[in] channel PWM channel identifier
+ * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1])
*
* @api
*/
diff --git a/os/hal/templates/pwm_lld.c b/os/hal/templates/pwm_lld.c
index 02de6b17c..4f9aab29b 100644
--- a/os/hal/templates/pwm_lld.c
+++ b/os/hal/templates/pwm_lld.c
@@ -102,26 +102,10 @@ bool_t pwm_lld_is_enabled(PWMDriver *pwmp, pwmchannel_t channel) {
}
/**
- * @brief Enables a callback mode for the specified PWM channel.
- * @details The callback mode must be set before starting a PWM channel.
- *
- * @param[in] pwmp pointer to the @p PWMDriver object
- * @param[in] channel PWM channel identifier
- * @param[in] edge output edge mode
- * @param[in] callback callback function
- *
- * @notapi
- */
-void pwm_lld_set_callback(PWMDriver *pwmp, pwmchannel_t channel,
- pwmedge_t edge, pwmcallback_t callback) {
-
-}
-
-/**
* @brief Enables a PWM channel.
*
* @param[in] pwmp pointer to the @p PWMDriver object
- * @param[in] channel PWM channel identifier
+ * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1])
* @param[in] width PWM pulse width as clock pulses number
*
* @notapi
@@ -138,7 +122,7 @@ void pwm_lld_enable_channel(PWMDriver *pwmp,
* idle state.
*
* @param[in] pwmp pointer to the @p PWMDriver object
- * @param[in] channel PWM channel identifier
+ * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1])
*
* @notapi
*/