git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2407 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2010-11-21 12:28:46 +00:00
parent 66c5a970fa
commit af0a2cee78
1 changed files with 2 additions and 2 deletions

View File

@ -262,12 +262,12 @@ struct PWMDriver {
* @note The calculated value must fit into an unsigned 16 bits integer.
*
* @param[in] pwmclk PWM clock frequency in cycles
* @param[in] pwmperiod PWM cycle period in microseconds
* @param[in] pwmperiod PWM cycle period in nanoseconds
* @return The value to be stored in the @p pc_arr field of the
* @p PWMConfig structure.
*/
#define PWM_COMPUTE_ARR(pwmclk, pwmperiod) \
((uint16_t)(((pwmclk) / (1000000 / (pwmperiod))) - 1))
((uint16_t)(((pwmclk) / (1000000000 / (pwmperiod))) - 1))
/**
* @brief Converts from fraction to pulse width.