diff options
Diffstat (limited to 'os/hal/templates/pwm_lld.c')
-rw-r--r-- | os/hal/templates/pwm_lld.c | 56 |
1 files changed, 55 insertions, 1 deletions
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) {
+
+}
+
/** @} */
|