From 3b4b79d9bbaa2985d24cb94fd9833dbdabbddd79 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 8 Dec 2009 07:42:49 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1383 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/templates/pwm_lld.c | 56 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) (limited to 'os/hal/templates/pwm_lld.c') diff --git a/os/hal/templates/pwm_lld.c b/os/hal/templates/pwm_lld.c index 7fa1297b7..18d03d68c 100644 --- a/os/hal/templates/pwm_lld.c +++ b/os/hal/templates/pwm_lld.c @@ -61,7 +61,7 @@ void pwm_lld_init(void) { */ void pwm_lld_start(PWMDriver *pwmp) { - if (pwmp->pwm_state == PWM_STOP) { + if (pwmp->pd_state == PWM_STOP) { /* Clock activation.*/ } /* Configuration.*/ @@ -76,4 +76,58 @@ void pwm_lld_stop(PWMDriver *pwmp) { } +/** + * @brief Determines whatever the PWM channel is already enabled. + * + * @param[in] pwmp pointer to the @p PWMDriver object + * @param[in] channel PWM channel identifier + * + * @return The PWM channel status. + * @retval FALSE the channel is not enabled. + * @retval TRUE the channel is enabled. + */ +bool_t pwm_lld_is_enabled(PWMDriver *pwmp, pwmchannel_t channel) { + + return FALSE; +} + +/** + * @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 the callback function + */ +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] width PWM pulse width as clock pulses number + */ +void pwm_lld_enable_channel(PWMDriver *pwmp, + pwmchannel_t channel, + pwmcnt_t width) { + +} + +/** + * @brief Disables a PWM channel. + * @details The channel is disabled and its output line returned to the + * idle state. + * + * @param[in] pwmp pointer to the @p PWMDriver object + * @param[in] channel PWM channel identifier + */ +void pwm_lld_disable_channel(PWMDriver *pwmp, pwmchannel_t channel) { + +} + /** @} */ -- cgit v1.2.3