diff options
Diffstat (limited to 'os/hal/templates')
-rw-r--r-- | os/hal/templates/i2c_lld.c | 15 | ||||
-rw-r--r-- | os/hal/templates/i2c_lld.h | 3 |
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);
|