diff options
-rw-r--r-- | os/hal/ports/AVR/hal_gpt_lld.h | 2 | ||||
-rw-r--r-- | os/hal/ports/AVR/hal_i2c_lld.c | 54 | ||||
-rw-r--r-- | os/hal/ports/AVR/hal_i2c_lld.h | 12 |
3 files changed, 36 insertions, 32 deletions
diff --git a/os/hal/ports/AVR/hal_gpt_lld.h b/os/hal/ports/AVR/hal_gpt_lld.h index a2bc614f9..b81b11808 100644 --- a/os/hal/ports/AVR/hal_gpt_lld.h +++ b/os/hal/ports/AVR/hal_gpt_lld.h @@ -20,7 +20,7 @@ */
/**
- * @file AVR/gpt_lld.h
+ * @file hal_gpt_lld.h
* @brief AVR GPT driver subsystem low level driver.
*
* @addtogroup GPT
diff --git a/os/hal/ports/AVR/hal_i2c_lld.c b/os/hal/ports/AVR/hal_i2c_lld.c index 9d5bd4df0..bf253f25e 100644 --- a/os/hal/ports/AVR/hal_i2c_lld.c +++ b/os/hal/ports/AVR/hal_i2c_lld.c @@ -15,7 +15,7 @@ */
/**
- * @file AVR/i2c_lld.c
+ * @file hal_i2c_lld.c
* @brief AVR I2C subsystem low level driver source.
*
* @addtogroup I2C
@@ -76,10 +76,12 @@ OSAL_IRQ_HANDLER(TWI_vect) { if (i2cp->txidx < i2cp->txbytes) {
TWDR = i2cp->txbuf[i2cp->txidx++];
TWCR = ((1 << TWINT) | (1 << TWEN) | (1 << TWIE));
- } else {
+ }
+ else {
if (i2cp->rxbuf && i2cp->rxbytes) {
TWCR = ((1 << TWSTA) | (1 << TWINT) | (1 << TWEN) | (1 << TWIE));
- } else {
+ }
+ else {
TWCR = ((1 << TWSTO) | (1 << TWINT) | (1 << TWEN));
_i2c_wakeup_isr(i2cp);
}
@@ -88,7 +90,8 @@ OSAL_IRQ_HANDLER(TWI_vect) { case TWI_MASTER_RX_ADDR_ACK:
if (i2cp->rxidx == (i2cp->rxbytes - 1)) {
TWCR = ((1 << TWINT) | (1 << TWEN) | (1 << TWIE));
- } else {
+ }
+ else {
TWCR = ((1 << TWEA) | (1 << TWINT) | (1 << TWEN) | (1 << TWIE));
}
break;
@@ -96,7 +99,8 @@ OSAL_IRQ_HANDLER(TWI_vect) { i2cp->rxbuf[i2cp->rxidx++] = TWDR;
if (i2cp->rxidx == (i2cp->rxbytes - 1)) {
TWCR = ((1 << TWINT) | (1 << TWEN) | (1 << TWIE));
- } else {
+ }
+ else {
TWCR = ((1 << TWEA) | (1 << TWINT) | (1 << TWEN) | (1 << TWIE));
}
break;
@@ -147,7 +151,7 @@ void i2c_lld_init(void) { /**
* @brief Configures and activates the I2C peripheral.
*
- * @param[in] i2cp pointer to the @p I2CDriver object
+ * @param[in] i2cp pointer to the @p I2CDriver object
*
* @notapi
*/
@@ -169,7 +173,7 @@ void i2c_lld_start(I2CDriver *i2cp) { /**
* @brief Deactivates the I2C peripheral.
*
- * @param[in] i2cp pointer to the @p I2CDriver object
+ * @param[in] i2cp pointer to the @p I2CDriver object
*
* @notapi
*/
@@ -184,14 +188,14 @@ void i2c_lld_stop(I2CDriver *i2cp) { /**
* @brief Receives data via the I2C bus as master.
*
- * @param[in] i2cp pointer to the @p I2CDriver object
- * @param[in] addr slave device address
- * @param[out] rxbuf pointer to the receive buffer
- * @param[in] rxbytes number of bytes to be received
- * @param[in] timeout the number of ticks before the operation timeouts,
- * the following special values are allowed:
- * - @a TIME_INFINITE no timeout.
- * .
+ * @param[in] i2cp pointer to the @p I2CDriver object
+ * @param[in] addr slave device address
+ * @param[out] rxbuf pointer to the receive buffer
+ * @param[in] rxbytes number of bytes to be received
+ * @param[in] timeout the number of ticks before the operation timeouts,
+ * the following special values are allowed:
+ * - @a TIME_INFINITE no timeout.
+ *
* @return The operation status.
* @retval MSG_OK if the function succeeded.
* @retval MSG_RESET if one or more I2C errors occurred, the errors can
@@ -223,16 +227,16 @@ msg_t i2c_lld_master_receive_timeout(I2CDriver *i2cp, i2caddr_t addr, /**
* @brief Transmits data via the I2C bus as master.
*
- * @param[in] i2cp pointer to the @p I2CDriver object
- * @param[in] addr slave device address
- * @param[in] txbuf pointer to the transmit buffer
- * @param[in] txbytes number of bytes to be transmitted
- * @param[out] rxbuf pointer to the receive buffer
- * @param[in] rxbytes number of bytes to be received
- * @param[in] timeout the number of ticks before the operation timeouts,
- * the following special values are allowed:
- * - @a TIME_INFINITE no timeout.
- * .
+ * @param[in] i2cp pointer to the @p I2CDriver object
+ * @param[in] addr slave device address
+ * @param[in] txbuf pointer to the transmit buffer
+ * @param[in] txbytes number of bytes to be transmitted
+ * @param[out] rxbuf pointer to the receive buffer
+ * @param[in] rxbytes number of bytes to be received
+ * @param[in] timeout the number of ticks before the operation timeouts,
+ * the following special values are allowed:
+ * - @a TIME_INFINITE no timeout.
+ *
* @return The operation status.
* @retval MSG_OK if the function succeeded.
* @retval MSG_RESET if one or more I2C errors occurred, the errors can
diff --git a/os/hal/ports/AVR/hal_i2c_lld.h b/os/hal/ports/AVR/hal_i2c_lld.h index d9623647b..289b46450 100644 --- a/os/hal/ports/AVR/hal_i2c_lld.h +++ b/os/hal/ports/AVR/hal_i2c_lld.h @@ -15,7 +15,7 @@ */
/**
- * @file AVR/i2c_lld.h
+ * @file hal_i2c_lld.h
* @brief AVR I2C subsystem low level driver header.
*
* @addtogroup I2C
@@ -67,9 +67,9 @@ * @{
*/
/**
- * @brief I2C driver enable switch.
- * @details If set to @p TRUE the support for I2C is included.
- * @note The default is @p FALSE.
+ * @brief I2C driver enable switch.
+ * @details If set to @p TRUE the support for I2C is included.
+ * @note The default is @p FALSE.
*/
#if !defined(AVR_I2C_USE_I2C1) || defined(__DOXYGEN__)
#define AVR_I2C_USE_I2C1 FALSE
@@ -109,7 +109,7 @@ typedef struct { } I2CConfig;
/**
- * @brief Structure representing an I2C driver.
+ * @brief Structure representing an I2C driver.
*/
struct I2CDriver {
/**
@@ -180,7 +180,7 @@ typedef struct I2CDriver I2CDriver; /**
* @brief Get errors from I2C driver.
*
- * @param[in] i2cp pointer to the @p I2CDriver object
+ * @param[in] i2cp pointer to the @p I2CDriver object
*
* @notapi
*/
|