diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-09-23 15:48:55 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-09-23 15:48:55 +0000 |
commit | c39d08fc2ae9c43f73114e24292520306bddde19 (patch) | |
tree | 7bae8c26f8e20566aba8755f0cd3bb34d2ac4f87 /os/hal/templates | |
parent | d2721c36a6d74fd18de7e4de95fdd166083e343e (diff) | |
download | ChibiOS-c39d08fc2ae9c43f73114e24292520306bddde19.tar.gz ChibiOS-c39d08fc2ae9c43f73114e24292520306bddde19.tar.bz2 ChibiOS-c39d08fc2ae9c43f73114e24292520306bddde19.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3384 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates')
-rw-r--r-- | os/hal/templates/ext_lld.c | 7 | ||||
-rw-r--r-- | os/hal/templates/ext_lld.h | 19 |
2 files changed, 23 insertions, 3 deletions
diff --git a/os/hal/templates/ext_lld.c b/os/hal/templates/ext_lld.c index 45bc1c3dc..fc9c2181d 100644 --- a/os/hal/templates/ext_lld.c +++ b/os/hal/templates/ext_lld.c @@ -39,6 +39,11 @@ /* Driver exported variables. */
/*===========================================================================*/
+/**
+ * @brief EXTD1 driver identifier.
+ */
+EXTDriver EXTD1;
+
/*===========================================================================*/
/* Driver local variables. */
/*===========================================================================*/
@@ -62,6 +67,8 @@ */
void ext_lld_init(void) {
+ /* Driver initialization.*/
+ extObjectInit(&EXTD1);
}
/**
diff --git a/os/hal/templates/ext_lld.h b/os/hal/templates/ext_lld.h index 494cef1b9..f299a8914 100644 --- a/os/hal/templates/ext_lld.h +++ b/os/hal/templates/ext_lld.h @@ -63,14 +63,23 @@ typedef uint32_t expchannel_t; * @param[in] extp pointer to the @p EXPDriver object triggering the
* callback
*/
-typedef void (*extcallback_t)(EXTDriver *extp);
+typedef void (*extcallback_t)(EXTDriver *extp, expchannel_t channel);
/**
* @brief Channel configuration structure.
*/
typedef struct {
- uint32_t mode; /**< @brief Channel mode. */
- extcallback_t cb; /**< @brief Channel callback. */
+ /**
+ * @brief Channel mode.
+ */
+ uint32_t mode;
+ /**
+ * @brief Channel callback.
+ * @details In the STM32 implementation a @p NULL callback pointer is
+ * valid and configures the channel as an event sources instead
+ * of an interrupt source.
+ */
+ extcallback_t cb;
} EXTChannelConfig;
/**
@@ -108,6 +117,10 @@ struct EXTDriver { /* External declarations. */
/*===========================================================================*/
+#if !defined(__DOXYGEN__)
+extern EXTDriver EXTD1;
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
|