aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates/i2c_lld.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-08 18:16:38 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-10-08 18:16:38 +0000
commitf407e4a84fcf2cf3bb003ed36f80ec136f8683c2 (patch)
tree4320f476744a99f1814e4ad5007e8fc87e8467ff /os/hal/templates/i2c_lld.h
parent38cc48d575a6232cfd440d97711f89f5f531422d (diff)
downloadChibiOS-f407e4a84fcf2cf3bb003ed36f80ec136f8683c2.tar.gz
ChibiOS-f407e4a84fcf2cf3bb003ed36f80ec136f8683c2.tar.bz2
ChibiOS-f407e4a84fcf2cf3bb003ed36f80ec136f8683c2.zip
HAL improvements, mailboxes macro name changed.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2238 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates/i2c_lld.h')
-rw-r--r--os/hal/templates/i2c_lld.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/os/hal/templates/i2c_lld.h b/os/hal/templates/i2c_lld.h
index 77c67cc07..bf7a64082 100644
--- a/os/hal/templates/i2c_lld.h
+++ b/os/hal/templates/i2c_lld.h
@@ -46,6 +46,12 @@
/* Driver data structures and types. */
/*===========================================================================*/
+
+/**
+ * @brief Type of a structure representing an I2C driver.
+ */
+typedef struct I2CDriver I2CDriver;
+
/**
* @brief I2C completion callback type.
*
@@ -70,15 +76,18 @@ typedef struct {
* @note Implementations may extend this structure to contain more,
* architecture dependent, fields.
*/
-typedef struct {
+struct I2CDriver {
/** @brief Driver state.*/
i2cstate_t id_state;
/** @brief Current configuration data.*/
const I2CConfig *id_config;
/** @brief Current callback.*/
i2ccallback_t id_callback;
+#if defined(I2C_DRIVER_EXT_FIELDS)
+ I2C_DRIVER_EXT_FIELDS
+#endif
/* End of the mandatory fields.*/
-} I2CDriver;
+};
/*===========================================================================*/
/* Driver macros. */