From f70a49f832d35845c77ea89c620b93c3f66f2954 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Mon, 26 Sep 2016 18:08:28 +0200 Subject: [PATCH] Remove duplicated comments --- drivers/i2c.c | 12 ------------ extdrv/bme280_humidity_sensor.c | 12 ------------ extdrv/tmp101_temp_sensor.c | 12 ------------ extdrv/tsl256x_light_sensor.c | 12 ------------ extdrv/veml6070_uv_sensor.c | 12 ------------ include/drivers/i2c.h | 12 ------------ include/extdrv/bme280_humidity_sensor.h | 12 ------------ include/extdrv/tmp101_temp_sensor.h | 12 ------------ include/extdrv/tsl256x_light_sensor.h | 12 ------------ 9 files changed, 108 deletions(-) diff --git a/drivers/i2c.c b/drivers/i2c.c index 909854b..e9ae67a 100644 --- a/drivers/i2c.c +++ b/drivers/i2c.c @@ -338,12 +338,6 @@ void i2c_release_bus(uint8_t bus_num) * RETURN VALUE * Upon successfull completion, returns the number of bytes read. On error, returns a negative * integer equivalent to errors from glibc. - * -EBADFD : Device not initialized (-77) - * -EBUSY : Device or ressource Busy or Arbitration lost (-16) - * -EAGAIN : Device already in use (-11) - * -EINVAL : Invalid argument (no cmd_buf, or no inbuff when count > 0) (-22) - * -EREMOTEIO : Device did not acknowledge (-121) - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine (-5) */ int i2c_read(uint8_t bus_num, const void *cmd_buf, size_t cmd_size, const void* ctrl_buf, void* inbuff, size_t count) { @@ -401,12 +395,6 @@ int i2c_read(uint8_t bus_num, const void *cmd_buf, size_t cmd_size, const void* * RETURN VALUE * Upon successfull completion, returns the number of bytes written. On error, returns a negative * integer equivalent to errors from glibc. - * -EBADFD : Device not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EAGAIN : Device already in use - * -EINVAL : Invalid argument (buf) - * -EREMOTEIO : Device did not acknowledge - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int i2c_write(uint8_t bus_num, const void *buf, size_t count, const void* ctrl_buf) { diff --git a/extdrv/bme280_humidity_sensor.c b/extdrv/bme280_humidity_sensor.c index fe8fd24..9976edf 100644 --- a/extdrv/bme280_humidity_sensor.c +++ b/extdrv/bme280_humidity_sensor.c @@ -132,12 +132,6 @@ int bme280_get_calibration_data(struct bme280_sensor_config* conf) * Return value: * Upon successfull completion, returns 0. On error, returns a negative integer * equivalent to errors from glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ #define CONF_BUF_SIZE 7 int bme280_configure(struct bme280_sensor_config* conf) @@ -177,12 +171,6 @@ int bme280_configure(struct bme280_sensor_config* conf) * Upon successfull completion, returns 0 and the raw sensor values read are placed in the * provided integer(s). On error, returns a negative integer equivalent to errors from * glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ #define READ_CMD_SIZE 3 int bme280_sensor_read(struct bme280_sensor_config* conf, uint32_t* pressure, uint32_t* temp, uint16_t* hum) diff --git a/extdrv/tmp101_temp_sensor.c b/extdrv/tmp101_temp_sensor.c index 47e13d9..76f5f47 100644 --- a/extdrv/tmp101_temp_sensor.c +++ b/extdrv/tmp101_temp_sensor.c @@ -90,12 +90,6 @@ int tmp101_convert_to_deci_degrees(uint16_t raw) * Return value(s): * Upon successfull completion, returns 0 and the temperature read is placed in the * provided integers. On error, returns a negative integer equivalent to errors from glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ #define CMD_BUF_SIZE 3 int tmp101_sensor_read(struct tmp101_sensor_config* conf, uint16_t* raw, int* deci_degrees) @@ -141,12 +135,6 @@ int tmp101_sensor_read(struct tmp101_sensor_config* conf, uint16_t* raw, int* de * Return value : * Upon successfull completion, returns 0. On error, returns a negative integer * equivalent to errors from glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ #define CONF_BUF_SIZE 4 int tmp101_sensor_config(struct tmp101_sensor_config* conf) diff --git a/extdrv/tsl256x_light_sensor.c b/extdrv/tsl256x_light_sensor.c index a460078..dbe4399 100644 --- a/extdrv/tsl256x_light_sensor.c +++ b/extdrv/tsl256x_light_sensor.c @@ -97,12 +97,6 @@ int tsl256x_read_id(struct tsl256x_sensor_config* conf) * Upon successfull completion, returns 0 and the luminosity read is placed in the * provided integer(s). On error, returns a negative integer equivalent to errors from * glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ #define READ_BUF_SIZE 3 int tsl256x_sensor_read(struct tsl256x_sensor_config* conf, uint16_t* comb, uint16_t* ir, uint32_t* lux) @@ -141,12 +135,6 @@ int tsl256x_sensor_read(struct tsl256x_sensor_config* conf, uint16_t* comb, uint * Return value: * Upon successfull completion, returns 0. On error, returns a negative integer * equivalent to errors from glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ #define CONF_BUF_SIZE 3 int tsl256x_configure(struct tsl256x_sensor_config* conf) diff --git a/extdrv/veml6070_uv_sensor.c b/extdrv/veml6070_uv_sensor.c index 301e2dd..72bfd8f 100644 --- a/extdrv/veml6070_uv_sensor.c +++ b/extdrv/veml6070_uv_sensor.c @@ -50,12 +50,6 @@ int veml6070_probe_sensor(struct veml6070_sensor_config* conf) * Upon successfull completion, returns 0 and the luminosity read is placed in the * provided integer(s). On error, returns a negative integer equivalent to errors from * glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int veml6070_sensor_read(struct veml6070_sensor_config* conf, uint16_t* uv_raw) { @@ -100,12 +94,6 @@ int veml6070_sensor_read(struct veml6070_sensor_config* conf, uint16_t* uv_raw) * Return value: * Upon successfull completion, returns 0. On error, returns a negative integer * equivalent to errors from glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ #define CONF_BUF_SIZE 2 int veml6070_configure(struct veml6070_sensor_config* conf) diff --git a/include/drivers/i2c.h b/include/drivers/i2c.h index 3eb4e3e..f5a793d 100644 --- a/include/drivers/i2c.h +++ b/include/drivers/i2c.h @@ -113,12 +113,6 @@ enum i2c_state_machine_states { * RETURN VALUE * Upon successfull completion, returns the number of bytes read. On error, returns a negative * integer equivalent to errors from glibc. - * -EBADFD : Device not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EAGAIN : Device already in use - * -EINVAL : Invalid argument (buf) - * -EREMOTEIO : Device did not acknowledge - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int i2c_read(uint8_t bus_num, const void *cmd_buf, size_t cmd_size, const void* ctrl_buf, void* inbuff, size_t count); @@ -134,12 +128,6 @@ int i2c_read(uint8_t bus_num, const void *cmd_buf, size_t cmd_size, const void* * RETURN VALUE * Upon successfull completion, returns the number of bytes written. On error, returns a negative * integer equivalent to errors from glibc. - * -EBADFD : Device not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EAGAIN : Device already in use - * -EINVAL : Invalid argument (buf) - * -EREMOTEIO : Device did not acknowledge - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int i2c_write(uint8_t bus_num, const void *buf, size_t count, const void* ctrl_buf); diff --git a/include/extdrv/bme280_humidity_sensor.h b/include/extdrv/bme280_humidity_sensor.h index 7f2b13a..c8f3e40 100644 --- a/include/extdrv/bme280_humidity_sensor.h +++ b/include/extdrv/bme280_humidity_sensor.h @@ -169,12 +169,6 @@ int bme280_probe_sensor(struct bme280_sensor_config* conf); * Return value: * Upon successfull completion, returns 0. On error, returns a negative integer * equivalent to errors from glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int bme280_configure(struct bme280_sensor_config* conf); @@ -187,12 +181,6 @@ int bme280_configure(struct bme280_sensor_config* conf); * Upon successfull completion, returns 0 and the raw sensor values read are placed in the * provided integer(s). On error, returns a negative integer equivalent to errors from * glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int bme280_sensor_read(struct bme280_sensor_config* conf, uint32_t* temp, uint32_t* pressure, uint16_t* hum); diff --git a/include/extdrv/tmp101_temp_sensor.h b/include/extdrv/tmp101_temp_sensor.h index 2949606..a3413f1 100644 --- a/include/extdrv/tmp101_temp_sensor.h +++ b/include/extdrv/tmp101_temp_sensor.h @@ -87,12 +87,6 @@ int tmp101_convert_to_deci_degrees(uint16_t raw); * Upon successfull completion, returns 0 and the temperature read is placed in the * provided integer(s). On error, returns a negative integer equivalent to errors from * glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int tmp101_sensor_read(struct tmp101_sensor_config* conf, uint16_t* raw, int* deci_degrees); @@ -106,12 +100,6 @@ int tmp101_sensor_read(struct tmp101_sensor_config* conf, uint16_t* raw, int* de * Return value: * Upon successfull completion, returns 0. On error, returns a negative integer * equivalent to errors from glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int tmp101_sensor_config(struct tmp101_sensor_config* conf); diff --git a/include/extdrv/tsl256x_light_sensor.h b/include/extdrv/tsl256x_light_sensor.h index 0b45966..03c5d30 100644 --- a/include/extdrv/tsl256x_light_sensor.h +++ b/include/extdrv/tsl256x_light_sensor.h @@ -120,12 +120,6 @@ int tsl256x_read_id(struct tsl256x_sensor_config* conf); * Upon successfull completion, returns 0 and the luminosity read is placed in the * provided integer(s). On error, returns a negative integer equivalent to errors from * glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int tsl256x_sensor_read(struct tsl256x_sensor_config* conf, uint16_t* comb, uint16_t* ir, uint32_t* lux); @@ -136,12 +130,6 @@ int tsl256x_sensor_read(struct tsl256x_sensor_config* conf, uint16_t* comb, uint * Return value: * Upon successfull completion, returns 0. On error, returns a negative integer * equivalent to errors from glibc. - * -EBADFD : I2C not initialized - * -EBUSY : Device or ressource Busy or Arbitration lost - * -EINVAL : Invalid argument (buf) - * -ENODEV : No such device - * -EREMOTEIO : Device did not acknowledge : Any device present ? - * -EIO : Bad one: Illegal start or stop, or illegal state in i2c state machine */ int tsl256x_configure(struct tsl256x_sensor_config* conf); -- 2.43.0