aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include/pwm.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/include/pwm.h')
-rw-r--r--os/hal/include/pwm.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/os/hal/include/pwm.h b/os/hal/include/pwm.h
index 2ffd3599c..960ac2a69 100644
--- a/os/hal/include/pwm.h
+++ b/os/hal/include/pwm.h
@@ -36,6 +36,10 @@
/*===========================================================================*/
/**
+ * @name PWM output mode macros
+ * @{
+ */
+/**
* @brief Standard output modes mask.
*/
#define PWM_OUTPUT_MASK 0x0F
@@ -54,6 +58,7 @@
* @brief Inverse PWM logic, active is logic level zero.
*/
#define PWM_OUTPUT_ACTIVE_LOW 0x02
+/** @} */
/*===========================================================================*/
/* Driver pre-compile time settings. */
@@ -95,6 +100,10 @@ typedef void (*pwmcallback_t)(PWMDriver *pwmp);
/*===========================================================================*/
/**
+ * @name PWM duty cycle conversion
+ * @{
+ */
+/**
* @brief Converts from fraction to pulse width.
* @note Be careful with rounding errors, this is integer math not magic.
* You can specify tenths of thousandth but make sure you have the
@@ -143,8 +152,13 @@ typedef void (*pwmcallback_t)(PWMDriver *pwmp);
*/
#define PWM_PERCENTAGE_TO_WIDTH(pwmp, percentage) \
PWM_FRACTION_TO_WIDTH(pwmp, 10000, percentage)
+/** @} */
/**
+ * @name Macro Functions
+ * @{
+ */
+/**
* @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().
@@ -197,6 +211,7 @@ typedef void (*pwmcallback_t)(PWMDriver *pwmp);
*/
#define pwmDisableChannelI(pwmp, channel) \
pwm_lld_disable_channel(pwmp, channel)
+/** @} */
/*===========================================================================*/
/* External declarations. */