feat(driver): Use astyle to format the code

This commit is contained in:
Wu Jian Gang
2018-05-19 22:55:14 +08:00
parent ae6c134ec4
commit a08d0711a4
11 changed files with 305 additions and 290 deletions

View File

@ -16,6 +16,7 @@
#define __I2C_MASTER_H__
#include "esp8266/pin_mux_register.h"
#define I2C_MASTER_SDA_MUX PERIPHS_IO_MUX_GPIO2_U
#define I2C_MASTER_SCL_MUX PERIPHS_IO_MUX_GPIO4_U
#define I2C_MASTER_SDA_GPIO 2
@ -70,20 +71,20 @@
* @{
*/
/**
/**
* @brief i2c_master_gpio_init,config SDA and SCL gpio to open-drain output mode.
*
*
* @param null
*
*
* @return null
*/
void i2c_master_gpio_init(void);
/**
/**
* @brief i2c_master_gpio_init,config SDA and SCL gpio to open-drain output mode.
*
*
* @param initilize I2C bus to enable i2c operations.
*
*
* @return null
*/
void i2c_master_init(void);
@ -91,83 +92,83 @@ void i2c_master_init(void);
#define i2c_master_wait os_delay_us
/**
/**
* @brief i2c_master_gpio_init,config SDA and SCL gpio to open-drain output mode.
*
*
* @param set i2c to stop sending state.
*
*
* @return null
*/
void i2c_master_stop(void);
/**
/**
* @brief i2c_master_gpio_init,config SDA and SCL gpio to open-drain output mode.
*
*
* @param set i2c to start sending state.
*
*
* @return null
*/
void i2c_master_start(void);
/**
/**
* @brief i2c_master_gpio_init,config SDA and SCL gpio to open-drain output mode.
*
*
* @param set ack to i2c bus as level value.
*
*
* @return null
*/
void i2c_master_setAck(uint8 level);
/**
/**
* @brief confirm if peer send ack.
*
*
* @param null
*
*
* @return null
*/
uint8 i2c_master_getAck(void);
/**
/**
* @brief read Byte from i2c bus.
*
*
* @param null
*
*
* @return the byte which read from i2c bus.
*/
uint8 i2c_master_readByte(void);
/**
/**
* @brief write wrdata value(one byte) into i2c.
*
*
* @param uint8 wrdata:write value
*
*
* @return null
*/
void i2c_master_writeByte(uint8 wrdata);
/**
/**
* @brief i2c_master_checkAck.
*
*
* @param null
*
*
* @return the result of check ack
*/
bool i2c_master_checkAck(void);
/**
/**
* @brief i2c master send Ack.
*
*
* @param null
*
*
* @return null
*/
void i2c_master_send_ack(void);
/**
/**
* @brief i2c master send Nack.
*
*
* @param null
*
*
* @return null
*/
void i2c_master_send_nack(void);