From 0b8fd860fa71b35bfe0a242471d3bc4b56c93089 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 7 Dec 2009 16:13:01 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1381 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 os/hal/src/pwm.c (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c new file mode 100644 index 000000000..ef4260629 --- /dev/null +++ b/os/hal/src/pwm.c @@ -0,0 +1,150 @@ +/* + ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio. + + This file is part of ChibiOS/RT. + + ChibiOS/RT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS/RT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/** + * @file PWM.c + * @brief PWM Driver code. + * @addtogroup PWM + * @{ + */ + +#include "ch.h" +#include "hal.h" + +/** + * @brief PWM Driver initialization. + */ +void pwmInit(void) { + + pwm_lld_init(); +} + +/** + * @brief Initializes the standard part of a @p PWMDriver structure. + * + * @param[in] pwmp pointer to the @p PWMDriver object + */ +void pwmObjectInit(PWMDriver *pwmp) { + + pwmp->pd_state = PWM_STOP; + pwmp->pwm_config = NULL; +} + +/** + * @brief Configures and activates the PWM peripheral. + * + * @param[in] pwmp pointer to the @p PWMDriver object + * @param[in] config pointer to the @p PWMConfig object + */ +void pwmStart(PWMDriver *pwmp, const PWMConfig *config) { + + chDbgCheck((pwmp != NULL) && (config != NULL), "pwmStart"); + + chSysLock(); + chDbgAssert((pwmp->pd_state == PWM_STOP) || (pwmp->pd_state == PWM_READY), + "pwmStart(), #1", + "invalid state"); + pwmp->pd_config = config; + pwm_lld_start(pwmp); + pwmp->pd_state = PWM_READY; + chSysUnlock(); +} + +/** + * @brief Deactivates the PWM peripheral. + * + * @param[in] pwmp pointer to the @p PWMDriver object + */ +void pwmStop(PWMDriver *pwmp) { + + chDbgCheck(pwmp != NULL, "pwmStop"); + + chSysLock(); + chDbgAssert((pwmp->pd_state == PWM_STOP) || (pwmp->pd_state == PWM_READY), + "pwmStop(), #1", + "invalid state"); + pwm_lld_stop(pwmp); + pwmp->pd_state = PWM_STOP; + chSysUnlock(); +} + +/** + * @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 pwmSetCallback(PWMDriver *pwmp, pwmchannel_t channel, + pwmedge_t edge, pwmcallback_t callback) { + + chDbgCheck((pwmp != NULL) && (channel < PWM_CHANNELS), + "pwmSetCallback"); + + chSysLock(); + chDbgAssert((pwmp->pd_state == PWM_READY) && + !pwm_lld_is_enabled(pwmp, channel), + "pwmSetCallback(), #1", "invalid state"); + pwm_lld_set_callback(pwmp, channel, edge, callback); + chSysUnlock(); +} + +/** + * @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 pwmEnableChannel(PWMDriver *pwmp, + pwmchannel_t channel, + pwmcnt_t width) { + + chDbgCheck((pwmp != NULL) && (channel < PWM_CHANNELS), + "pwmEnableChannel"); + + chSysLock(); + chDbgAssert(pwmp->pd_state == PWM_READY, + "pwmEnableChannel(), #1", "invalid state"); + pwm_lld_enable_channel(pwmp, channel, width); + chSysUnlock(); +} + +/** + * @brief Disables a PWM channel. + * @details The channel output line is returned to its idle state and disabled. + * + * @param[in] pwmp pointer to the @p PWMDriver object + * @param[in] channel PWM channel identifier + */ +void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { + + chDbgCheck((pwmp != NULL) && (channel < PWM_CHANNELS), + "pwmEnableChannel"); + + chSysLock(); + chDbgAssert(pwmp->pd_state == PWM_READY, + "pwmDisableChannel(), #1", "invalid state"); + pwm_lld_disable_channel(pwmp, channel); + chSysUnlock(); +} + +/** @} */ -- cgit v1.2.3 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/src/pwm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index ef4260629..f026a62ef 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -43,7 +43,7 @@ void pwmInit(void) { void pwmObjectInit(PWMDriver *pwmp) { pwmp->pd_state = PWM_STOP; - pwmp->pwm_config = NULL; + pwmp->pd_config = NULL; } /** @@ -130,7 +130,8 @@ void pwmEnableChannel(PWMDriver *pwmp, /** * @brief Disables a PWM channel. - * @details The channel output line is returned to its idle state and disabled. + * @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 -- cgit v1.2.3 From 3ff9afd04851ec97d66d6833520b49dc18f35ea4 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 8 Dec 2009 08:47:14 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1389 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index f026a62ef..0e4062124 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -27,6 +27,8 @@ #include "ch.h" #include "hal.h" +#if CH_HAL_USE_PWM || defined(__DOXYGEN__) + /** * @brief PWM Driver initialization. */ @@ -148,4 +150,6 @@ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { chSysUnlock(); } +#endif /* CH_HAL_USE_PWM */ + /** @} */ -- cgit v1.2.3 From 6716159ba1186d9360d80b4b2313b3a047055295 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 13 Dec 2009 13:37:06 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1423 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 0e4062124..ddae89d45 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -40,7 +40,7 @@ void pwmInit(void) { /** * @brief Initializes the standard part of a @p PWMDriver structure. * - * @param[in] pwmp pointer to the @p PWMDriver object + * @param[in] pwmp pointer to a @p PWMDriver object */ void pwmObjectInit(PWMDriver *pwmp) { @@ -51,8 +51,8 @@ void pwmObjectInit(PWMDriver *pwmp) { /** * @brief Configures and activates the PWM peripheral. * - * @param[in] pwmp pointer to the @p PWMDriver object - * @param[in] config pointer to the @p PWMConfig object + * @param[in] pwmp pointer to a @p PWMDriver object + * @param[in] config pointer to a @p PWMConfig object */ void pwmStart(PWMDriver *pwmp, const PWMConfig *config) { @@ -71,7 +71,7 @@ void pwmStart(PWMDriver *pwmp, const PWMConfig *config) { /** * @brief Deactivates the PWM peripheral. * - * @param[in] pwmp pointer to the @p PWMDriver object + * @param[in] pwmp pointer to a @p PWMDriver object */ void pwmStop(PWMDriver *pwmp) { @@ -87,32 +87,31 @@ void pwmStop(PWMDriver *pwmp) { } /** - * @brief Enables a callback mode for the specified PWM channel. - * @details The callback mode must be set before starting a PWM channel. + * @brief Setups a PWM channel. * - * @param[in] pwmp pointer to the @p PWMDriver object + * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier - * @param[in] edge output edge mode - * @param[in] callback the callback function + * @param[in] pccp pointer to a @p PWMChannelConfig object */ -void pwmSetCallback(PWMDriver *pwmp, pwmchannel_t channel, - pwmedge_t edge, pwmcallback_t callback) { +void pwmSetupChannel(PWMDriver *pwmp, pwmchannel_t channel, + const PWMChannelConfig *pccp) { - chDbgCheck((pwmp != NULL) && (channel < PWM_CHANNELS), - "pwmSetCallback"); + chDbgCheck((pwmp != NULL) && (channel < PWM_CHANNELS) && (pccp != NULL), + "pwmSetupChannel"); chSysLock(); chDbgAssert((pwmp->pd_state == PWM_READY) && !pwm_lld_is_enabled(pwmp, channel), - "pwmSetCallback(), #1", "invalid state"); - pwm_lld_set_callback(pwmp, channel, edge, callback); + "pwmSetupChannel(), #1", "invalid state"); + pwmp->pd_channel_configs[channel] = pccp; + pwm_lld_setup_channel(pwmp, channel); chSysUnlock(); } /** * @brief Enables a PWM channel. * - * @param[in] pwmp pointer to the @p PWMDriver object + * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier * @param[in] width PWM pulse width as clock pulses number */ @@ -135,7 +134,7 @@ void pwmEnableChannel(PWMDriver *pwmp, * @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] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier */ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { -- cgit v1.2.3 From 494cd0f0953d131bb31dcda508abfbd4eaef9899 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 16 Dec 2009 15:48:50 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1425 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index ddae89d45..ad3c15728 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -88,6 +88,9 @@ void pwmStop(PWMDriver *pwmp) { /** * @brief Setups a PWM channel. + * @details Associates a configuration to a PWM channel, this operation is + * required before a channel can be enabled using + * @p pwmEnableChannel(). * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier @@ -123,7 +126,8 @@ void pwmEnableChannel(PWMDriver *pwmp, "pwmEnableChannel"); chSysLock(); - chDbgAssert(pwmp->pd_state == PWM_READY, + chDbgAssert((pwmp->pd_state == PWM_READY) && + (pwmp->pd_channel_configs[channel] != NULL), "pwmEnableChannel(), #1", "invalid state"); pwm_lld_enable_channel(pwmp, channel, width); chSysUnlock(); @@ -143,7 +147,8 @@ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { "pwmEnableChannel"); chSysLock(); - chDbgAssert(pwmp->pd_state == PWM_READY, + chDbgAssert((pwmp->pd_state == PWM_READY) && + (pwmp->pd_channel_configs[channel] != NULL), "pwmDisableChannel(), #1", "invalid state"); pwm_lld_disable_channel(pwmp, channel); chSysUnlock(); -- cgit v1.2.3 From a8863f265d188eb769257788beba012f672c909d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 17 Dec 2009 15:40:32 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1426 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index ad3c15728..f6164ea35 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -86,31 +86,6 @@ void pwmStop(PWMDriver *pwmp) { chSysUnlock(); } -/** - * @brief Setups a PWM channel. - * @details Associates a configuration to a PWM channel, this operation is - * required before a channel can be enabled using - * @p pwmEnableChannel(). - * - * @param[in] pwmp pointer to a @p PWMDriver object - * @param[in] channel PWM channel identifier - * @param[in] pccp pointer to a @p PWMChannelConfig object - */ -void pwmSetupChannel(PWMDriver *pwmp, pwmchannel_t channel, - const PWMChannelConfig *pccp) { - - chDbgCheck((pwmp != NULL) && (channel < PWM_CHANNELS) && (pccp != NULL), - "pwmSetupChannel"); - - chSysLock(); - chDbgAssert((pwmp->pd_state == PWM_READY) && - !pwm_lld_is_enabled(pwmp, channel), - "pwmSetupChannel(), #1", "invalid state"); - pwmp->pd_channel_configs[channel] = pccp; - pwm_lld_setup_channel(pwmp, channel); - chSysUnlock(); -} - /** * @brief Enables a PWM channel. * @@ -126,8 +101,7 @@ void pwmEnableChannel(PWMDriver *pwmp, "pwmEnableChannel"); chSysLock(); - chDbgAssert((pwmp->pd_state == PWM_READY) && - (pwmp->pd_channel_configs[channel] != NULL), + chDbgAssert(pwmp->pd_state == PWM_READY, "pwmEnableChannel(), #1", "invalid state"); pwm_lld_enable_channel(pwmp, channel, width); chSysUnlock(); @@ -147,8 +121,7 @@ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { "pwmEnableChannel"); chSysLock(); - chDbgAssert((pwmp->pd_state == PWM_READY) && - (pwmp->pd_channel_configs[channel] != NULL), + chDbgAssert(pwmp->pd_state == PWM_READY, "pwmDisableChannel(), #1", "invalid state"); pwm_lld_disable_channel(pwmp, channel); chSysUnlock(); -- cgit v1.2.3 From fe24da9fcca4967e58b25a2698c46717995de0ad Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 29 Dec 2009 11:12:05 +0000 Subject: Reorganized sections in HAL files. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1473 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index f6164ea35..404f3d8a7 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -29,6 +29,22 @@ #if CH_HAL_USE_PWM || defined(__DOXYGEN__) +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ + /** * @brief PWM Driver initialization. */ -- cgit v1.2.3 From e3c7dc319ff582f9eb4a593950ac7bedb1d38b77 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 6 Feb 2010 16:17:30 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1571 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 404f3d8a7..ddfb6dd83 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -18,8 +18,8 @@ */ /** - * @file PWM.c - * @brief PWM Driver code. + * @file pwm.c + * @brief PWM Driver code. * @addtogroup PWM * @{ */ @@ -46,7 +46,7 @@ /*===========================================================================*/ /** - * @brief PWM Driver initialization. + * @brief PWM Driver initialization. */ void pwmInit(void) { @@ -54,7 +54,7 @@ void pwmInit(void) { } /** - * @brief Initializes the standard part of a @p PWMDriver structure. + * @brief Initializes the standard part of a @p PWMDriver structure. * * @param[in] pwmp pointer to a @p PWMDriver object */ @@ -65,7 +65,7 @@ void pwmObjectInit(PWMDriver *pwmp) { } /** - * @brief Configures and activates the PWM peripheral. + * @brief Configures and activates the PWM peripheral. * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] config pointer to a @p PWMConfig object @@ -85,7 +85,7 @@ void pwmStart(PWMDriver *pwmp, const PWMConfig *config) { } /** - * @brief Deactivates the PWM peripheral. + * @brief Deactivates the PWM peripheral. * * @param[in] pwmp pointer to a @p PWMDriver object */ @@ -103,7 +103,7 @@ void pwmStop(PWMDriver *pwmp) { } /** - * @brief Enables a PWM channel. + * @brief Enables a PWM channel. * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier -- cgit v1.2.3 From 157b6f9695e7f72f2d54b231c19cb4045710ed01 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 21 Feb 2010 07:24:53 +0000 Subject: Updated license dates. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1646 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index ddfb6dd83..3aeec1309 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -1,5 +1,5 @@ /* - ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio. + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. This file is part of ChibiOS/RT. @@ -104,10 +104,10 @@ void pwmStop(PWMDriver *pwmp) { /** * @brief Enables a PWM channel. - * + * * @param[in] pwmp pointer to a @p PWMDriver object - * @param[in] channel PWM channel identifier - * @param[in] width PWM pulse width as clock pulses number + * @param[in] channel PWM channel identifier + * @param[in] width PWM pulse width as clock pulses number */ void pwmEnableChannel(PWMDriver *pwmp, pwmchannel_t channel, @@ -127,7 +127,7 @@ void pwmEnableChannel(PWMDriver *pwmp, * @brief Disables a PWM channel. * @details The channel is disabled and its output line returned to the * idle state. - * + * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier */ -- cgit v1.2.3 From 04e29829b64a64a405125595dc371bd731766c68 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 5 Aug 2010 10:30:37 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2114 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 3aeec1309..4b797da0c 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -20,6 +20,7 @@ /** * @file pwm.c * @brief PWM Driver code. + * * @addtogroup PWM * @{ */ @@ -104,6 +105,7 @@ void pwmStop(PWMDriver *pwmp) { /** * @brief Enables a PWM channel. + * @details Programs (or reprograms) a PWM channel. * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier -- cgit v1.2.3 From 2891f7d645c4be187ac96ee4011207531d25c34a Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 4 Oct 2010 17:16:18 +0000 Subject: Documentation improvements, fixed a small error in the STM32 serial driver. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2234 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 4b797da0c..f4af775e3 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -48,6 +48,8 @@ /** * @brief PWM Driver initialization. + * + * @init */ void pwmInit(void) { @@ -58,6 +60,8 @@ void pwmInit(void) { * @brief Initializes the standard part of a @p PWMDriver structure. * * @param[in] pwmp pointer to a @p PWMDriver object + * + * @init */ void pwmObjectInit(PWMDriver *pwmp) { @@ -70,6 +74,8 @@ void pwmObjectInit(PWMDriver *pwmp) { * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] config pointer to a @p PWMConfig object + * + * @api */ void pwmStart(PWMDriver *pwmp, const PWMConfig *config) { @@ -89,6 +95,8 @@ void pwmStart(PWMDriver *pwmp, const PWMConfig *config) { * @brief Deactivates the PWM peripheral. * * @param[in] pwmp pointer to a @p PWMDriver object + * + * @api */ void pwmStop(PWMDriver *pwmp) { @@ -110,6 +118,8 @@ void pwmStop(PWMDriver *pwmp) { * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier * @param[in] width PWM pulse width as clock pulses number + * + * @api */ void pwmEnableChannel(PWMDriver *pwmp, pwmchannel_t channel, @@ -132,6 +142,8 @@ void pwmEnableChannel(PWMDriver *pwmp, * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier + * + * @api */ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { -- cgit v1.2.3 From 7c2a8e13d969029fb675e67c57349c1deaa09284 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 11 Oct 2010 11:48:03 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2246 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index f4af775e3..978149ff6 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -67,6 +67,9 @@ void pwmObjectInit(PWMDriver *pwmp) { pwmp->pd_state = PWM_STOP; pwmp->pd_config = NULL; +#if defined(PWM_DRIVER_EXT_INIT_HOOK) + PWM_DRIVER_EXT_INIT_HOOK(pwmp); +#endif } /** -- cgit v1.2.3 From 4fab7c06d1b0c9e61f6106b5b2a5c2c0b5694c34 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 13 Oct 2010 11:45:07 +0000 Subject: ADC, SPI, PWM driver enhancements. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2254 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 978149ff6..13c77bfc6 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -86,8 +86,7 @@ void pwmStart(PWMDriver *pwmp, const PWMConfig *config) { chSysLock(); chDbgAssert((pwmp->pd_state == PWM_STOP) || (pwmp->pd_state == PWM_READY), - "pwmStart(), #1", - "invalid state"); + "pwmStart(), #1", "invalid state"); pwmp->pd_config = config; pwm_lld_start(pwmp); pwmp->pd_state = PWM_READY; @@ -107,8 +106,7 @@ void pwmStop(PWMDriver *pwmp) { chSysLock(); chDbgAssert((pwmp->pd_state == PWM_STOP) || (pwmp->pd_state == PWM_READY), - "pwmStop(), #1", - "invalid state"); + "pwmStop(), #1", "invalid state"); pwm_lld_stop(pwmp); pwmp->pd_state = PWM_STOP; chSysUnlock(); @@ -133,7 +131,7 @@ void pwmEnableChannel(PWMDriver *pwmp, chSysLock(); chDbgAssert(pwmp->pd_state == PWM_READY, - "pwmEnableChannel(), #1", "invalid state"); + "pwmEnableChannel(), #1", "not ready"); pwm_lld_enable_channel(pwmp, channel, width); chSysUnlock(); } @@ -155,7 +153,7 @@ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { chSysLock(); chDbgAssert(pwmp->pd_state == PWM_READY, - "pwmDisableChannel(), #1", "invalid state"); + "pwmDisableChannel(), #1", "not ready"); pwm_lld_disable_channel(pwmp, channel); chSysUnlock(); } -- cgit v1.2.3 From d8be44136c1e6d02ee105ac0791f9e6732551fec Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 1 Nov 2010 17:29:56 +0000 Subject: Fixed bug 3100946, renamed HAL switches removing the CH_ part. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2326 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 13c77bfc6..95c3f4750 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -28,7 +28,7 @@ #include "ch.h" #include "hal.h" -#if CH_HAL_USE_PWM || defined(__DOXYGEN__) +#if HAL_USE_PWM || defined(__DOXYGEN__) /*===========================================================================*/ /* Driver exported variables. */ @@ -158,6 +158,6 @@ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { chSysUnlock(); } -#endif /* CH_HAL_USE_PWM */ +#endif /* HAL_USE_PWM */ /** @} */ -- cgit v1.2.3 From a2e1f71fc25c29620af68246125f81151f80f733 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 21 Nov 2010 08:55:48 +0000 Subject: Documentation related improvements. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2403 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'os/hal/src/pwm.c') 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 */ -- cgit v1.2.3 From 32e43fdb02ddb7582866c29dad5e6c87f3315605 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 21 Nov 2010 13:45:22 +0000 Subject: Fixed bug 3114481. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2409 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 79cc73b30..ecf9eba3f 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -117,8 +117,9 @@ 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 (0...PWM_CHANNELS-1]) - * @param[in] width PWM pulse width as clock pulses number + * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1) + * @param[in] width PWM pulse width as clock pulses number, setting the + * width at zero is equivalent to disabling the channel * * @api */ @@ -132,17 +133,17 @@ void pwmEnableChannel(PWMDriver *pwmp, chSysLock(); chDbgAssert(pwmp->pd_state == PWM_READY, "pwmEnableChannel(), #1", "not ready"); - pwm_lld_enable_channel(pwmp, channel, width); + pwm_lld_set_channel(pwmp, channel, width); chSysUnlock(); } /** - * @brief Disables a PWM channel. + * @brief Disables a PWM channel. * @details The channel is disabled and its output line returned to the * idle state. * * @param[in] pwmp pointer to a @p PWMDriver object - * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1]) + * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1) * * @api */ @@ -154,7 +155,7 @@ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { chSysLock(); chDbgAssert(pwmp->pd_state == PWM_READY, "pwmDisableChannel(), #1", "not ready"); - pwm_lld_disable_channel(pwmp, channel); + pwm_lld_set_channel(pwmp, channel, 0); chSysUnlock(); } -- cgit v1.2.3 From 955425572d170dc100034ce991911854bf600a30 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 21 Nov 2010 21:31:35 +0000 Subject: Had to go back... git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2416 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index ecf9eba3f..ec5bd65be 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -118,8 +118,7 @@ void pwmStop(PWMDriver *pwmp) { * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1) - * @param[in] width PWM pulse width as clock pulses number, setting the - * width at zero is equivalent to disabling the channel + * @param[in] width PWM pulse width as clock pulses number * * @api */ @@ -133,7 +132,7 @@ void pwmEnableChannel(PWMDriver *pwmp, chSysLock(); chDbgAssert(pwmp->pd_state == PWM_READY, "pwmEnableChannel(), #1", "not ready"); - pwm_lld_set_channel(pwmp, channel, width); + pwm_lld_enable_channel(pwmp, channel, width); chSysUnlock(); } @@ -155,7 +154,7 @@ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { chSysLock(); chDbgAssert(pwmp->pd_state == PWM_READY, "pwmDisableChannel(), #1", "not ready"); - pwm_lld_set_channel(pwmp, channel, 0); + pwm_lld_disable_channel(pwmp, channel); chSysUnlock(); } -- cgit v1.2.3 From 7aa43aee7029b232c558174bcbdf90e8fbebd57b Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 18 Dec 2010 08:31:56 +0000 Subject: Documentation improvements. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2490 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index ec5bd65be..8a009e3b5 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -48,6 +48,8 @@ /** * @brief PWM Driver initialization. + * @note This function is implicitly invoked by @p halInit(), there is + * no need to explicitly initialize the driver. * * @init */ -- cgit v1.2.3 From 24cb881726f09c6bccba471b40bde76dc27036c7 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 4 Jan 2011 15:08:29 +0000 Subject: Documentation related fixes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2580 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 8a009e3b5..cf619e508 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -61,7 +61,7 @@ void pwmInit(void) { /** * @brief Initializes the standard part of a @p PWMDriver structure. * - * @param[in] pwmp pointer to a @p PWMDriver object + * @param[out] pwmp pointer to a @p PWMDriver object * * @init */ -- cgit v1.2.3 From 18fb8f676f0f650d83f69bc29ab45b04b73e86c1 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 8 Mar 2011 10:09:57 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2808 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index cf619e508..40ad7428d 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -67,8 +67,8 @@ void pwmInit(void) { */ void pwmObjectInit(PWMDriver *pwmp) { - pwmp->pd_state = PWM_STOP; - pwmp->pd_config = NULL; + pwmp->state = PWM_STOP; + pwmp->config = NULL; #if defined(PWM_DRIVER_EXT_INIT_HOOK) PWM_DRIVER_EXT_INIT_HOOK(pwmp); #endif @@ -87,11 +87,11 @@ void pwmStart(PWMDriver *pwmp, const PWMConfig *config) { chDbgCheck((pwmp != NULL) && (config != NULL), "pwmStart"); chSysLock(); - chDbgAssert((pwmp->pd_state == PWM_STOP) || (pwmp->pd_state == PWM_READY), + chDbgAssert((pwmp->state == PWM_STOP) || (pwmp->state == PWM_READY), "pwmStart(), #1", "invalid state"); - pwmp->pd_config = config; + pwmp->config = config; pwm_lld_start(pwmp); - pwmp->pd_state = PWM_READY; + pwmp->state = PWM_READY; chSysUnlock(); } @@ -107,10 +107,10 @@ void pwmStop(PWMDriver *pwmp) { chDbgCheck(pwmp != NULL, "pwmStop"); chSysLock(); - chDbgAssert((pwmp->pd_state == PWM_STOP) || (pwmp->pd_state == PWM_READY), + chDbgAssert((pwmp->state == PWM_STOP) || (pwmp->state == PWM_READY), "pwmStop(), #1", "invalid state"); pwm_lld_stop(pwmp); - pwmp->pd_state = PWM_STOP; + pwmp->state = PWM_STOP; chSysUnlock(); } @@ -132,7 +132,7 @@ void pwmEnableChannel(PWMDriver *pwmp, "pwmEnableChannel"); chSysLock(); - chDbgAssert(pwmp->pd_state == PWM_READY, + chDbgAssert(pwmp->state == PWM_READY, "pwmEnableChannel(), #1", "not ready"); pwm_lld_enable_channel(pwmp, channel, width); chSysUnlock(); @@ -154,7 +154,7 @@ void pwmDisableChannel(PWMDriver *pwmp, pwmchannel_t channel) { "pwmEnableChannel"); chSysLock(); - chDbgAssert(pwmp->pd_state == PWM_READY, + chDbgAssert(pwmp->state == PWM_READY, "pwmDisableChannel(), #1", "not ready"); pwm_lld_disable_channel(pwmp, channel); chSysUnlock(); -- cgit v1.2.3 From e7e79a6ccb4f3e320b2b8b7bad1b14d65218641d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 18 Mar 2011 18:38:08 +0000 Subject: License updated. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2827 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 40ad7428d..e510ba180 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -1,5 +1,6 @@ /* - ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, + 2011 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From a58a524d4c7e58d03a0fa3698f09fb17985a70bc Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 31 Mar 2011 10:21:52 +0000 Subject: Improvements to the PWM driver. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2853 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index e510ba180..eaa49bc56 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -77,6 +77,8 @@ void pwmObjectInit(PWMDriver *pwmp) { /** * @brief Configures and activates the PWM peripheral. + * @note Starting a driver that is already in the @p PWM_READY state + * disables all the active channels. * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] config pointer to a @p PWMConfig object @@ -91,6 +93,7 @@ void pwmStart(PWMDriver *pwmp, const PWMConfig *config) { chDbgAssert((pwmp->state == PWM_STOP) || (pwmp->state == PWM_READY), "pwmStart(), #1", "invalid state"); pwmp->config = config; + pwmp->period = config->period; pwm_lld_start(pwmp); pwmp->state = PWM_READY; chSysUnlock(); @@ -115,9 +118,41 @@ void pwmStop(PWMDriver *pwmp) { chSysUnlock(); } +/** + * @brief Changes the period the PWM peripheral. + * @details This function changes the period of a PWM unit that has already + * been activated using @p pwmStart(). + * @pre The PWM unit must have been activated using @p pwmStart(). + * @post The PWM unit period is changed to the new value. + * @post Any active channel is disabled by this function and must be + * activated explicitly using @p pwmEnableChannel(). + * @note Depending on the hardware implementation this function has + * effect starting on the next cycle (recommended implementation) + * or immediately (fallback implementation). + * + * @param[in] pwmp pointer to a @p PWMDriver object + * + * @api + */ +void pwmChangePeriod(PWMDriver *pwmp, pwmcnt_t period) { + + chDbgCheck(pwmp != NULL, "pwmChangePeriod"); + + chSysLock(); + chDbgAssert(pwmp->state == PWM_READY, + "pwmChangePeriod(), #1", "invalid state"); + pwmp->period = period; + pwm_lld_change_period(pwmp, period); + chSysUnlock(); +} + /** * @brief Enables a PWM channel. - * @details Programs (or reprograms) a PWM channel. + * @pre The PWM unit must have been activated using @p pwmStart(). + * @post The channel is active using the specified configuration. + * @note Depending on the hardware implementation this function has + * effect starting on the next cycle (recommended implementation) + * or immediately (fallback implementation). * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1) @@ -141,8 +176,12 @@ void pwmEnableChannel(PWMDriver *pwmp, /** * @brief Disables a PWM channel. - * @details The channel is disabled and its output line returned to the + * @pre The PWM unit must have been activated using @p pwmStart(). + * @post The channel is disabled and its output line returned to the * idle state. + * @note Depending on the hardware implementation this function has + * effect starting on the next cycle (recommended implementation) + * or immediately (fallback implementation). * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] channel PWM channel identifier (0...PWM_CHANNELS-1) -- cgit v1.2.3 From 01b0220ffa200db034b0be6b0f464ec3344e3c15 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 1 Apr 2011 13:14:47 +0000 Subject: Documentation related fixes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2862 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index eaa49bc56..ed80ec24b 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -131,6 +131,7 @@ void pwmStop(PWMDriver *pwmp) { * or immediately (fallback implementation). * * @param[in] pwmp pointer to a @p PWMDriver object + * @param[in] period new cycle time in ticks * * @api */ -- cgit v1.2.3 From ad009f46d58f4f555cd412aa2f2a267da01db4e0 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 5 Apr 2011 18:21:00 +0000 Subject: STM32 PWM driver optimization, changed the behavior of pwmChangePeriod(). git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2869 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index ed80ec24b..e7dd6b64c 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -124,11 +124,9 @@ void pwmStop(PWMDriver *pwmp) { * been activated using @p pwmStart(). * @pre The PWM unit must have been activated using @p pwmStart(). * @post The PWM unit period is changed to the new value. - * @post Any active channel is disabled by this function and must be - * activated explicitly using @p pwmEnableChannel(). - * @note Depending on the hardware implementation this function has - * effect starting on the next cycle (recommended implementation) - * or immediately (fallback implementation). + * @note If a period is specified that is shorter than the pulse width + * programmed in one of the channels then the behavior is not + * guaranteed. * * @param[in] pwmp pointer to a @p PWMDriver object * @param[in] period new cycle time in ticks @@ -142,8 +140,7 @@ void pwmChangePeriod(PWMDriver *pwmp, pwmcnt_t period) { chSysLock(); chDbgAssert(pwmp->state == PWM_READY, "pwmChangePeriod(), #1", "invalid state"); - pwmp->period = period; - pwm_lld_change_period(pwmp, period); + pwmChangePeriodI(pwmp, period); chSysUnlock(); } -- cgit v1.2.3 From fe0093f795b6c88db8f12e2f7e45e11355fc3340 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 26 Aug 2011 13:47:22 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3254 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index e7dd6b64c..588b3df5c 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -31,6 +31,10 @@ #if HAL_USE_PWM || defined(__DOXYGEN__) +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + /*===========================================================================*/ /* Driver exported variables. */ /*===========================================================================*/ -- cgit v1.2.3 From de5dcbba856524599a8f06d3a9bdbf1b01db44c2 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 21 Jan 2012 14:29:42 +0000 Subject: License text updated with new year. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3846 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 588b3df5c..6e67d5407 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -1,6 +1,6 @@ /* ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, - 2011 Giovanni Di Sirio. + 2011,2012 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From 184a71345c6a36a9a8664eda8fbcc3ea728267a8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 2 Feb 2013 10:58:09 +0000 Subject: Updated license years. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5102 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index 6e67d5407..b865955c6 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -1,6 +1,6 @@ /* ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, - 2011,2012 Giovanni Di Sirio. + 2011,2012,2013 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From 01f971ba1d63d8568789adf51cde22fb35f69e73 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 28 Feb 2013 16:23:19 +0000 Subject: Adjusted C file templates. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5339 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'os/hal/src/pwm.c') diff --git a/os/hal/src/pwm.c b/os/hal/src/pwm.c index b865955c6..c6843a928 100644 --- a/os/hal/src/pwm.c +++ b/os/hal/src/pwm.c @@ -40,7 +40,7 @@ /*===========================================================================*/ /*===========================================================================*/ -/* Driver local variables. */ +/* Driver local variables and types. */ /*===========================================================================*/ /*===========================================================================*/ -- cgit v1.2.3