Skip to content

Commit

Permalink
drivers/sensors: fix style issues in function headers
Browse files Browse the repository at this point in the history
fix style issues in function headers, add missing new lines
  • Loading branch information
raiden00pl committed Nov 14, 2024
1 parent 0061dc3 commit 2687418
Show file tree
Hide file tree
Showing 20 changed files with 97 additions and 20 deletions.
13 changes: 13 additions & 0 deletions drivers/sensors/ds18b20_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ static int ds18b20_isalarm(FAR struct onewire_master_s *master,
*
* Return:
* OK - on success
*
****************************************************************************/

static int ds18b20_measure(FAR struct ds18b20_dev_s *dev)
Expand Down Expand Up @@ -354,6 +355,7 @@ static int ds18b20_measure(FAR struct ds18b20_dev_s *dev)
*
* Return:
* OK - on success
*
****************************************************************************/

static int ds18b20_write_spad(FAR struct ds18b20_dev_s *dev, int8_t th,
Expand Down Expand Up @@ -387,6 +389,7 @@ static int ds18b20_write_spad(FAR struct ds18b20_dev_s *dev, int8_t th,
*
* Return:
* OK - on success
*
****************************************************************************/

static int ds18b20_read_spad(FAR struct ds18b20_dev_s *dev,
Expand Down Expand Up @@ -444,6 +447,7 @@ static int ds18b20_read_spad(FAR struct ds18b20_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int ds18b20_set_res(FAR struct ds18b20_dev_s *dev, uint8_t res)
Expand Down Expand Up @@ -495,6 +499,7 @@ static int ds18b20_set_res(FAR struct ds18b20_dev_s *dev, uint8_t res)
*
* Return:
* OK - on success
*
****************************************************************************/

static int ds18b20_set_alarm(FAR struct ds18b20_dev_s *dev,
Expand Down Expand Up @@ -549,6 +554,7 @@ static int ds18b20_set_alarm(FAR struct ds18b20_dev_s *dev,
*
* Return:
* Timestamp in nsec
*
****************************************************************************/

static unsigned long ds18b20_curtime(void)
Expand Down Expand Up @@ -596,6 +602,7 @@ static void ds18b20_notify(FAR struct ds18b20_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int ds18b20_measure_read(FAR struct ds18b20_dev_s *dev,
Expand Down Expand Up @@ -635,6 +642,7 @@ static int ds18b20_measure_read(FAR struct ds18b20_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int ds18b20_fetch(FAR struct sensor_lowerhalf_s *lower,
Expand Down Expand Up @@ -677,6 +685,7 @@ static int ds18b20_fetch(FAR struct sensor_lowerhalf_s *lower,
*
* Return:
* OK - on success
*
****************************************************************************/

static int ds18b20_control(FAR struct sensor_lowerhalf_s *lower,
Expand Down Expand Up @@ -745,6 +754,7 @@ static int ds18b20_control(FAR struct sensor_lowerhalf_s *lower,
*
* Return:
* OK - on success
*
****************************************************************************/

static int ds18b20_active(FAR struct sensor_lowerhalf_s *lower,
Expand Down Expand Up @@ -783,6 +793,7 @@ static int ds18b20_active(FAR struct sensor_lowerhalf_s *lower,
*
* Return:
* OK - on success
*
****************************************************************************/

#ifdef CONFIG_SENSORS_DS18B20_POLL
Expand All @@ -805,6 +816,7 @@ static int ds18b20_set_interval(FAR struct sensor_lowerhalf_s *lower,
* Parameter:
* argc - Number of arguments
* argv - Pointer to argument list
*
****************************************************************************/

#ifdef CONFIG_SENSORS_DS18B20_POLL
Expand Down Expand Up @@ -909,6 +921,7 @@ static int ds18b20_thread(int argc, char** argv)
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
****************************************************************************/

int ds18b20_register(int devno, FAR struct onewire_master_s *onewire,
Expand Down
1 change: 1 addition & 0 deletions drivers/sensors/fakesensor_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ static int fakesensor_thread(int argc, char** argv)
* ...
* devno - The user specifies which device of this type, from 0.
* batch_number- The maximum number of batch
*
****************************************************************************/

int fakesensor_init(int type, FAR const char *file_name,
Expand Down
1 change: 1 addition & 0 deletions drivers/sensors/gnss_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,7 @@ int gnss_register(FAR struct gnss_lowerhalf_s *lower, int devno,
* instance is bound to the GNSS driver and must persists as long
* as the driver persists.
* devno - The user specifies which device of this type, from 0.
*
****************************************************************************/

void gnss_unregister(FAR struct gnss_lowerhalf_s *lower, int devno)
Expand Down
16 changes: 16 additions & 0 deletions drivers/sensors/hyt271_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ static const struct sensor_ops_s g_hyt271_ops =
* Parameter:
* data - Pointer to internal datat structure for measured data
* temp - Pointer to sensor data structure for humidity
*
****************************************************************************/

static void hyt271_humi_from_rawdata(FAR struct hyt271_sensor_data_s *data,
Expand All @@ -170,6 +171,7 @@ static void hyt271_humi_from_rawdata(FAR struct hyt271_sensor_data_s *data,
* Parameter:
* data - Pointer to internal datat structure for measured data
* temp - Pointer to sensor data structure for temperature
*
****************************************************************************/

static void hyt271_temp_from_rawdata(FAR struct hyt271_sensor_data_s *data,
Expand All @@ -186,6 +188,7 @@ static void hyt271_temp_from_rawdata(FAR struct hyt271_sensor_data_s *data,
*
* Return:
* Timestamp in nsec
*
****************************************************************************/

static unsigned long hyt271_curtime(void)
Expand All @@ -205,6 +208,7 @@ static unsigned long hyt271_curtime(void)
* buffer - Pointer to the buffers memory region
* cmd - The command to set in the buffer
* size - The buffer size
*
****************************************************************************/

static void hyt271_init_rw_buffer(FAR uint8_t *buffer, uint8_t cmd,
Expand Down Expand Up @@ -233,6 +237,7 @@ static void hyt271_init_rw_buffer(FAR uint8_t *buffer, uint8_t cmd,
*
* Return:
* OK - on success
*
****************************************************************************/

static int hyt271_df(FAR struct hyt271_dev_s *dev,
Expand Down Expand Up @@ -264,6 +269,7 @@ static int hyt271_df(FAR struct hyt271_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int hyt271_mr(FAR struct hyt271_dev_s *dev,
Expand Down Expand Up @@ -306,6 +312,7 @@ static int hyt271_mr(FAR struct hyt271_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int hyt271_cmd(FAR struct hyt271_dev_s *dev,
Expand Down Expand Up @@ -341,6 +348,7 @@ static int hyt271_cmd(FAR struct hyt271_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int hyt271_cmd_response(FAR struct hyt271_dev_s *dev,
Expand Down Expand Up @@ -393,6 +401,7 @@ static int hyt271_cmd_response(FAR struct hyt271_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int hyt271_change_addr(FAR struct hyt271_dev_s *dev, uint8_t addr)
Expand Down Expand Up @@ -538,6 +547,7 @@ static int hyt271_change_addr(FAR struct hyt271_dev_s *dev, uint8_t addr)
* Return:
* OK - on success
*
****************************************************************************/

static int hyt271_measure_read(FAR struct hyt271_dev_s *dev,
Expand Down Expand Up @@ -612,6 +622,7 @@ static int hyt271_measure_read(FAR struct hyt271_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int hyt271_fetch(FAR struct sensor_lowerhalf_s *lower,
Expand Down Expand Up @@ -667,6 +678,7 @@ static int hyt271_fetch(FAR struct sensor_lowerhalf_s *lower,
*
* Return:
* OK - on success
*
****************************************************************************/

static int hyt271_control(FAR struct sensor_lowerhalf_s *lower,
Expand Down Expand Up @@ -716,6 +728,7 @@ static int hyt271_control(FAR struct sensor_lowerhalf_s *lower,
*
* Return:
* OK - on success
*
****************************************************************************/

static int hyt271_active(FAR struct sensor_lowerhalf_s *lower,
Expand Down Expand Up @@ -754,6 +767,7 @@ static int hyt271_active(FAR struct sensor_lowerhalf_s *lower,
*
* Return:
* OK - on success
*
****************************************************************************/

#ifdef CONFIG_SENSORS_HYT271_POLL
Expand All @@ -776,6 +790,7 @@ static int hyt271_set_interval(FAR struct sensor_lowerhalf_s *lower,
* Parameter:
* argc - Number of arguments
* argv - Pointer to argument list
*
****************************************************************************/

#ifdef CONFIG_SENSORS_HYT271_POLL
Expand Down Expand Up @@ -871,6 +886,7 @@ static int hyt271_thread(int argc, char** argv)
*
* Returned Value:
* Zero (OK) on success; a negated errno value on failure.
*
****************************************************************************/

int hyt271_register(int devno, FAR struct i2c_master_s *i2c, uint8_t addr,
Expand Down
18 changes: 16 additions & 2 deletions drivers/sensors/mpu9250_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ static inline int mpu9250_write_fifo_en(FAR struct mpu9250_dev_s *dev,
}

/****************************************************************************
* mpu9250_write_gyro_range() :
* Name: mpu9250_write_gyro_range()
*
* Sets the @fs_sel bit in GYRO_CONFIG to the value provided. Per the
* datasheet, the meaning of @fs_sel is as follows:
Expand All @@ -997,6 +997,7 @@ static inline int mpu9250_write_fifo_en(FAR struct mpu9250_dev_s *dev,
* 1 -> ± 500 deg/sec
* 2 -> ± 1000 deg/sec
* 3 -> ± 2000 deg/sec
*
****************************************************************************/

static inline int mpu9250_write_gyro_range(FAR struct mpu9250_dev_s *dev,
Expand All @@ -1007,7 +1008,7 @@ static inline int mpu9250_write_gyro_range(FAR struct mpu9250_dev_s *dev,
}

/****************************************************************************
* mpu9250_write_accel_range() :
* Name: mpu9250_write_accel_range()
*
* Sets the @afs_sel bit in ACCEL_CONFIG to the value provided. Per
* the datasheet, the meaning of @afs_sel is as follows:
Expand All @@ -1022,6 +1023,7 @@ static inline int mpu9250_write_gyro_range(FAR struct mpu9250_dev_s *dev,
* 1 -> ± 4 g
* 2 -> ± 8 g
* 3 -> ± 16 g
*
****************************************************************************/

static inline int mpu9250_write_accel_range(FAR struct mpu9250_dev_s *dev,
Expand All @@ -1036,6 +1038,7 @@ static inline int mpu9250_write_accel_range(FAR struct mpu9250_dev_s *dev,
*
* EXT_SYNC_SET : frame sync bit position
* DLPF_CFG : digital low-pass filter bandwidth
*
****************************************************************************/

static inline int mpu9250_write_config(FAR struct mpu9250_dev_s *dev,
Expand All @@ -1051,6 +1054,7 @@ static inline int mpu9250_write_config(FAR struct mpu9250_dev_s *dev,
*
* accel_fchoice_b : he inverted version of accel_fchoice
* A_DLPF_CFG : Accelerometer low pass filter setting
*
****************************************************************************/

static inline int mpu9250_write_config2(FAR struct mpu9250_dev_s *dev,
Expand All @@ -1071,6 +1075,7 @@ static inline int mpu9250_write_config2(FAR struct mpu9250_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int mpu9250_initialize(FAR struct mpu9250_dev_s *dev)
Expand Down Expand Up @@ -1283,6 +1288,7 @@ static int mpu9250_initialize(FAR struct mpu9250_dev_s *dev)
*
* Return:
* OK - on success
*
****************************************************************************/

static int ak8963_initialize(FAR struct mpu9250_dev_s *dev,
Expand Down Expand Up @@ -1438,6 +1444,7 @@ static int ak8963_initialize(FAR struct mpu9250_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int get_mag_adjustment(FAR struct mpu9250_dev_s *dev)
Expand Down Expand Up @@ -1516,6 +1523,7 @@ static int get_mag_adjustment(FAR struct mpu9250_dev_s *dev)
*
* Return:
* OK - on success
*
****************************************************************************/

static int read_ak8963_reg(FAR struct mpu9250_dev_s *dev,
Expand Down Expand Up @@ -1608,6 +1616,7 @@ static int read_ak8963_reg(FAR struct mpu9250_dev_s *dev,
*
* Return:
* OK - on success
*
****************************************************************************/

static int write_ak8963_reg(FAR struct mpu9250_dev_s *dev,
Expand Down Expand Up @@ -1700,6 +1709,7 @@ static int write_ak8963_reg(FAR struct mpu9250_dev_s *dev,
*
* Return:
* do nothing if Big endian, swap H and L byte if little endian
*
****************************************************************************/

static uint16_t swap16(uint16_t val)
Expand All @@ -1722,6 +1732,7 @@ static uint16_t swap16(uint16_t val)
*
* Return:
* OK - on success
*
****************************************************************************/

static void mpu9250_accel_data(FAR struct mpu9250_sensor_s *priv,
Expand Down Expand Up @@ -1760,6 +1771,7 @@ static void mpu9250_accel_data(FAR struct mpu9250_sensor_s *priv,
*
* Return:
* OK - on success
*
****************************************************************************/

static void mpu9250_gyro_data(FAR struct mpu9250_sensor_s *priv,
Expand Down Expand Up @@ -1798,6 +1810,7 @@ static void mpu9250_gyro_data(FAR struct mpu9250_sensor_s *priv,
*
* Return:
* OK - on success
*
****************************************************************************/

static void mpu9250_mag_data(FAR struct mpu9250_sensor_s *priv,
Expand Down Expand Up @@ -1849,6 +1862,7 @@ static void mpu9250_mag_data(FAR struct mpu9250_sensor_s *priv,
* Parameter:
* argc - Number of arguments
* argv - Pointer to argument list
*
****************************************************************************/

static int mpu9250_thread(int argc, FAR char **argv)
Expand Down
2 changes: 2 additions & 0 deletions drivers/sensors/ms56xx_uorb.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ static const struct sensor_ops_s g_sensor_ops =
*
* Return:
* Timestamp in microseconds
*
****************************************************************************/

static unsigned long ms56xx_curtime(void)
Expand Down Expand Up @@ -371,6 +372,7 @@ static inline void baro_measure_read(FAR struct ms56xx_dev_s *priv,
* Parameter:
* argc - Number of arguments
* argv - Pointer to argument list
*
****************************************************************************/

static int ms56xx_thread(int argc, char **argv)
Expand Down
Loading

0 comments on commit 2687418

Please sign in to comment.