Correct the I2C driver code style and comment.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10534 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Theodore Ateba 2017-09-02 14:15:45 +00:00
parent a437767a73
commit 978b233c04
2 changed files with 9 additions and 4 deletions

View File

@ -15,8 +15,8 @@
*/
/**
* @file hal_i2c_lld.c
* @brief AVR I2C subsystem low level driver source.
* @file I2Cv1/hal_i2c_lld.c
* @brief AVR/MEGA I2C subsystem low level driver source.
*
* @addtogroup I2C
* @{
@ -144,6 +144,7 @@ OSAL_IRQ_HANDLER(TWI_vect) {
* @notapi
*/
void i2c_lld_init(void) {
i2cObjectInit(&I2CD1);
I2CD1.thread = NULL;
}
@ -156,6 +157,7 @@ void i2c_lld_init(void) {
* @notapi
*/
void i2c_lld_start(I2CDriver *i2cp) {
uint32_t clock_speed = 100000;
/* TODO: Test TWI without external pull-ups (use internal) */
@ -209,6 +211,7 @@ void i2c_lld_stop(I2CDriver *i2cp) {
msg_t i2c_lld_master_receive_timeout(I2CDriver *i2cp, i2caddr_t addr,
uint8_t *rxbuf, size_t rxbytes,
systime_t timeout) {
i2cp->errors = I2C_NO_ERROR;
i2cp->addr = addr;
i2cp->txbuf = NULL;
@ -251,6 +254,7 @@ msg_t i2c_lld_master_transmit_timeout(I2CDriver *i2cp, i2caddr_t addr,
const uint8_t *txbuf, size_t txbytes,
uint8_t *rxbuf, size_t rxbytes,
systime_t timeout) {
i2cp->errors = I2C_NO_ERROR;
i2cp->addr = addr;
i2cp->txbuf = txbuf;
@ -268,3 +272,4 @@ msg_t i2c_lld_master_transmit_timeout(I2CDriver *i2cp, i2caddr_t addr,
#endif /* HAL_USE_I2C */
/** @} */

View File

@ -15,8 +15,8 @@
*/
/**
* @file hal_i2c_lld.h
* @brief AVR I2C subsystem low level driver header.
* @file I2Cv1/hal_i2c_lld.h
* @brief AVR/MEGA I2C subsystem low level driver header.
*
* @addtogroup I2C
* @{