diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-12-08 07:42:49 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-12-08 07:42:49 +0000 |
commit | 3b4b79d9bbaa2985d24cb94fd9833dbdabbddd79 (patch) | |
tree | bd6a58ca1b94282ad154d3e9d27eb471cd7386fa /os/hal/templates | |
parent | 348922bb1cf72c4812256ee4b0317ac492d78ddb (diff) | |
download | ChibiOS-3b4b79d9bbaa2985d24cb94fd9833dbdabbddd79.tar.gz ChibiOS-3b4b79d9bbaa2985d24cb94fd9833dbdabbddd79.tar.bz2 ChibiOS-3b4b79d9bbaa2985d24cb94fd9833dbdabbddd79.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1383 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates')
-rw-r--r-- | os/hal/templates/halconf.h | 8 | ||||
-rw-r--r-- | os/hal/templates/pwm_lld.c | 56 |
2 files changed, 63 insertions, 1 deletions
diff --git a/os/hal/templates/halconf.h b/os/hal/templates/halconf.h index f173a3fa3..1845d5323 100644 --- a/os/hal/templates/halconf.h +++ b/os/hal/templates/halconf.h @@ -24,6 +24,14 @@ * @{
*/
+/*
+ * HAL configuration file, this file allows to enable or disable the various
+ * device drivers from your application. You may also use this file in order
+ * to change the device drivers settings found in the low level drivers
+ * headers, just define here the new settings and those will override the
+ * defaults defined in the LLD headers. + */
+
#ifndef _HALCONF_H_
#define _HALCONF_H_
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) {
+
+}
+
/** @} */
|