Fixed bugs 3114266 and 3114319.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2404 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2010-11-21 09:41:46 +00:00
parent a2e1f71fc2
commit 43902259c6
3 changed files with 13 additions and 7 deletions

View File

@ -250,22 +250,24 @@ struct PWMDriver {
* Please refer to the STM32 HAL driver documentation
* and/or the STM32 Reference Manual for the right clock
* source.
* @param[in] nsec PWM clock cycle time in nanoseconds
* @param[in] pwmclk PWM clock frequency in cycles
* @return The value to be stored in the @p pc_psc field of the
* @p PWMConfig structure.
*/
#define PWM_COMPUTE_PSC(clksrc, nsec) \
((uint16_t)(((clksrc) / (1000000000 / (nsec))) - 1))
#define PWM_COMPUTE_PSC(clksrc, pwmclk) \
((uint16_t)(((clksrc) / (pwmclk)) - 1))
/**
* @brief PWM cycle period initialization utility.
* @note The calculated value must fit into an unsigned 16 bits integer.
*
* @param[in] clkperiod PWM clock period in nanoseconds
* @param[in] pwmperiod PWM cycle period in nanoseconds
* @param[in] pwmclk PWM clock frequency in cycles
* @param[in] pwmperiod PWM cycle period in microseconds
* @return The value to be stored in the @p pc_arr field of the
* @p PWMConfig structure.
*/
#define PWM_COMPUTE_ARR(clkperiod, pwmperiod) \
((uint16_t)(((clkperiod) / (1000000000 / (pwmperiod))) - 1))
#define PWM_COMPUTE_ARR(pwmclk, pwmperiod) \
((uint16_t)(((pwmclk) / (1000000 / (pwmperiod))) - 1))
/**
* @brief Converts from degrees to pulse width.

View File

@ -65,6 +65,8 @@
*****************************************************************************
*** 2.1.4 ***
- FIX: Fixed wrong initializer macros in STM32 PWM driver (bug 3114319).
- FIX: Fixed syntax error in STM32 PWM driver(bug 3114266).
- FIX: Fixed typo in board name (bug 3113574)(backported to 2.0.7).
- FIX: Fixed defective event wait functions with timeout (bug 3113443)
(backported to 2.0.7).

View File

@ -53,6 +53,8 @@ N Evaluate if to add a synchronous API to the UART driver, eventually do so.
* STM8L-Discovery demo.
* Add the STM32F100 (Value Line) sub-family to the official STM32 HAL support.
* STM32VL-Discovery demo.
- Problem, some IRQ vectors have a different vector name in the STM32F100
sub-family. Use vector numbers instead?
* Remove the PAL default configuration from the various hal_lld.c and move
them into board.c files, this will remove an ugly dependency.
* Realign the STM8 port to the new STM8L one as options, naming conventions