aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-13 12:40:42 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-13 12:40:42 +0000
commitfbac4d253d67cc5b1ec39166ce1abb8124b1e3a8 (patch)
tree23300615d3484cef1515fba815a7218f1118d377 /os/hal/include
parentb86e5efeeb17af6937319d0fd874fc64b0c1ccb4 (diff)
downloadChibiOS-fbac4d253d67cc5b1ec39166ce1abb8124b1e3a8.tar.gz
ChibiOS-fbac4d253d67cc5b1ec39166ce1abb8124b1e3a8.tar.bz2
ChibiOS-fbac4d253d67cc5b1ec39166ce1abb8124b1e3a8.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3314 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/ext.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/os/hal/include/ext.h b/os/hal/include/ext.h
index 83191b030..5d904cf4e 100644
--- a/os/hal/include/ext.h
+++ b/os/hal/include/ext.h
@@ -39,12 +39,14 @@
* @name EXT channels modes
* @{
*/
+#define EXT_CH_MODE_EDGES_MASK 3 /**< @brief Mask of edges field. */
#define EXT_CH_MODE_DISABLED 0 /**< @brief Channel disabled. */
#define EXT_CH_MODE_RISING_EDGE 1 /**< @brief Rising edge callback. */
#define EXT_CH_MODE_FALLING_EDGE 2 /**< @brief Falling edge callback. */
-/** @brief Both edges callback.*/
-#define EXT_CH_MODE_BOTH_EDGES (EXT_CH_MODE_RISING_EDGE | \
- EXT_CH_MODE_FALLING_EDGE)
+#define EXT_CH_MODE_BOTH_EDGES 3 /**< @brief Both edges callback. */
+
+#define EXT_CH_MODE_AUTOSTART 4 /**< @brief Channel started
+ automatically on driver start. */
/** @} */
/*===========================================================================*/
@@ -79,6 +81,26 @@ typedef struct EXTDriver EXTDriver;
/* Driver macros. */
/*===========================================================================*/
+/**
+ * @brief Enables an EXT channel.
+ *
+ * @param[in] extp pointer to the @p EXTDriver object
+ * @param[in] channel channel to be enabled
+ *
+ * @iclass
+ */
+#define extChannelEnableI(extp, channel) ext_lld_channel_enable(extp, channel)
+
+/**
+ * @brief Disables an EXT channel.
+ *
+ * @param[in] extp pointer to the @p EXTDriver object
+ * @param[in] channel channel to be disabled
+ *
+ * @iclass
+ */
+#define extChannelDisableI(extp, channel) ext_lld_channel_disable(extp, channel)
+
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
@@ -90,6 +112,8 @@ extern "C" {
void extObjectInit(EXTDriver *extp);
void extStart(EXTDriver *extp, const EXTConfig *config);
void extStop(EXTDriver *extp);
+ void extChannelEnable(EXTDriver *extp, expchannel_t channel);
+ void extChannelDisable(EXTDriver *extp, expchannel_t channel);
#ifdef __cplusplus
}
#endif