aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/templates
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-08-17 13:23:41 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-08-17 13:23:41 +0000
commit4e26a3b42cb49974f63d1b8727d7b1d1830c9c81 (patch)
tree12c7970c2a76583baff5108acedd0d4cc395abf7 /os/hal/templates
parent8b45c58317683148179c9964e67c8f7d0683257b (diff)
downloadChibiOS-4e26a3b42cb49974f63d1b8727d7b1d1830c9c81.tar.gz
ChibiOS-4e26a3b42cb49974f63d1b8727d7b1d1830c9c81.tar.bz2
ChibiOS-4e26a3b42cb49974f63d1b8727d7b1d1830c9c81.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2133 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates')
-rw-r--r--os/hal/templates/i2c_lld.c15
-rw-r--r--os/hal/templates/i2c_lld.h3
2 files changed, 16 insertions, 2 deletions
diff --git a/os/hal/templates/i2c_lld.c b/os/hal/templates/i2c_lld.c
index 334088aeb..e41cc3b29 100644
--- a/os/hal/templates/i2c_lld.c
+++ b/os/hal/templates/i2c_lld.c
@@ -81,10 +81,13 @@ void i2c_lld_stop(I2CDriver *i2cp) {
/**
* @brief Initiates a master bus transaction.
+ * @details This function sends a start bit followed by an one or two bytes
+ * header.
*
* @param[in] i2cp pointer to the @p I2CDriver object
+ * @param[in] header transaction header
*/
-void i2c_lld_master_start(I2CDriver *i2cp) {
+void i2c_lld_master_start(I2CDriver *i2cp, uint16_t header) {
}
@@ -98,6 +101,16 @@ void i2c_lld_master_stop(I2CDriver *i2cp) {
}
/**
+ * @brief Sends a restart bit.
+ * @details Restart bits are required by some types of I2C transactions.
+ *
+ * @param[in] i2cp pointer to the @p I2CDriver object
+ */
+void i2c_lld_master_restart(I2CDriver *i2cp) {
+
+}
+
+/**
* @brief Master transmission.
*
* @param[in] i2cp pointer to the @p I2CDriver object
diff --git a/os/hal/templates/i2c_lld.h b/os/hal/templates/i2c_lld.h
index 250c827e5..3a2ceb4aa 100644
--- a/os/hal/templates/i2c_lld.h
+++ b/os/hal/templates/i2c_lld.h
@@ -91,8 +91,9 @@ extern "C" {
void i2c_lld_init(void);
void i2c_lld_start(I2CDriver *i2cp);
void i2c_lld_stop(I2CDriver *i2cp);
- void i2c_lld_master_start(I2CDriver *i2cp);
+ void i2c_lld_master_start(I2CDriver *i2cp, uint16_t header);
void i2c_lld_master_stop(I2CDriver *i2cp);
+ void i2c_lld_master_restart(I2CDriver *i2cp);
void i2c_lld_master_transmit(I2CDriver *i2cp, size_t n,
const uint8_t *txbuf);
void i2c_lld_master_receive(I2CDriver *i2cp, size_t n, uint8_t *rxbuf);