Skip to content

Commit

Permalink
remove useless code delimiters (2)
Browse files Browse the repository at this point in the history
Part 2 of the commit with the same name, remove delimiters from .c
files.

Signed-off-by: Darius Berghe <[email protected]>
  • Loading branch information
buha committed Feb 24, 2025
1 parent 0788ebb commit 715c737
Show file tree
Hide file tree
Showing 643 changed files with 0 additions and 4,697 deletions.
9 changes: 0 additions & 9 deletions drivers/accel/adxl313/adxl313.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdlib.h>
#include <stdint.h>
#include <errno.h>
Expand All @@ -43,15 +40,9 @@
#include "no_os_delay.h"
#include "no_os_alloc.h"

/******************************************************************************/
/************************ Functions Declarations ******************************/
/******************************************************************************/
static int64_t adxl313_accel_conv(struct adxl313_dev *dev, int16_t raw_accel);
static void adxl313_compute_multiplier(struct adxl313_dev *dev);

/******************************************************************************/
/************************ Functions Definitions *******************************/
/******************************************************************************/
/*******************************************************************************
* @brief Read data from the device.
*
Expand Down
16 changes: 0 additions & 16 deletions drivers/accel/adxl313/iio_adxl313.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include "no_os_error.h"
Expand All @@ -42,9 +39,6 @@
#include "iio_adxl313.h"
#include "adxl313.h"

/******************************************************************************/
/********************** Macros and Constants Definitions **********************/
/******************************************************************************/
#define SCALE_FACTOR 1000000000UL
#define MIN_SHIFT 9

Expand Down Expand Up @@ -83,18 +77,12 @@ static const int adxl313_iio_scale_table[4] = { 9576806, 19153613, 38307226, 766

static const int adxl314_iio_scale = 478858719;

/******************************************************************************/
/*************************** Types Declarations *******************************/
/******************************************************************************/
enum adxl313_iio_accel_chans {
CHAN_X = 0,
CHAN_Y = 1,
CHAN_Z = 2
};

/******************************************************************************/
/************************ Functions Declarations ******************************/
/******************************************************************************/
extern int adxl313_read(struct adxl313_dev *dev,
uint8_t base_address, uint16_t size, uint8_t *read_data);
extern int adxl313_write(struct adxl313_dev *dev,
Expand Down Expand Up @@ -131,10 +119,6 @@ static int adxl313_iio_read_scale_avail(void *dev, char *buf,
uint32_t len, const struct iio_ch_info *channel, intptr_t priv);
static int adxl313_iio_read_samples(void* dev, int16_t* buff, uint32_t samples);
static int adxl313_iio_update_channels(void* dev, uint32_t mask);
/******************************************************************************/
/************************ Variable Declarations *******************************/
/******************************************************************************/

static struct iio_attribute adxl313_iio_accel_attrs[] = {
{
.name = "calibbias",
Expand Down
10 changes: 0 additions & 10 deletions drivers/accel/adxl345/adxl345.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,15 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdlib.h>
#include "adxl345.h"
#include "no_os_alloc.h"

/******************************************************************************/
/************************ Variable Declarations ******************************/
/******************************************************************************/
static const uint8_t adxl345_part_id[] = {
[ID_ADXL345] = ADXL345_ID,
[ID_ADXL346] = ADXL346_ID,
};

/******************************************************************************/
/************************ Functions Definitions *******************************/
/******************************************************************************/

/***************************************************************************//**
* @brief Reads the value of a register.
*
Expand Down
12 changes: 0 additions & 12 deletions drivers/accel/adxl355/adxl355.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdlib.h>
#include <errno.h>
#include "adxl355.h"
#include "no_os_delay.h"
#include "no_os_alloc.h"

/******************************************************************************/
/************************ Variable Declarations ******************************/
/******************************************************************************/
static uint8_t shadow_reg_val[5] = {0, 0, 0, 0, 0};
static const uint8_t adxl355_scale_mul[4] = {0, 1, 2, 4};
static const uint8_t adxl355_part_id[] = {
Expand All @@ -51,17 +45,11 @@ static const uint8_t adxl355_part_id[] = {
[ID_ADXL359] = GET_ADXL355_RESET_VAL(ADXL359_PARTID),
};

/******************************************************************************/
/************************ Functions Declarations ******************************/
/******************************************************************************/
static uint32_t adxl355_accel_array_conv(struct adxl355_dev *dev,
uint8_t *raw_array);
static int64_t adxl355_accel_conv(struct adxl355_dev *dev, uint32_t raw_accel);
static int64_t adxl355_temp_conv(struct adxl355_dev *dev, uint16_t raw_temp);

/******************************************************************************/
/************************ Functions Definitions *******************************/
/******************************************************************************/
/***************************************************************************//**
* @brief Reads from the device.
*
Expand Down
18 changes: 0 additions & 18 deletions drivers/accel/adxl355/iio_adxl355.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include "no_os_error.h"
Expand All @@ -43,9 +40,6 @@
#include "no_os_units.h"
#include "no_os_alloc.h"

/******************************************************************************/
/********************** Macros and Constants Definitions **********************/
/******************************************************************************/
#define ACCEL_AXIS_X (uint32_t) 0
#define ACCEL_AXIS_Y (uint32_t) 1
#define ACCEL_AXIS_Z (uint32_t) 2
Expand Down Expand Up @@ -74,18 +68,12 @@ static const int adxl355_iio_hpf_3db_multipliers[] = {
238,
};

/******************************************************************************/
/*************************** Types Declarations *******************************/
/******************************************************************************/
enum adxl355_iio_accel_chans {
chan_x,
chan_y,
chan_z,
};

/******************************************************************************/
/************************ Functions Declarations ******************************/
/******************************************************************************/
extern int adxl355_read_device_data(struct adxl355_dev *dev,
uint8_t base_address, uint16_t size, uint8_t *read_data);
extern int adxl355_write_device_data(struct adxl355_dev *dev,
Expand Down Expand Up @@ -122,9 +110,6 @@ static int adxl355_iio_read_samp_freq_avail(void *dev, char *buf,
static int adxl355_iio_read_samples(void* dev, int* buff, uint32_t samples);
static int adxl355_iio_update_channels(void* dev, uint32_t mask);
static int32_t adxl355_trigger_handler(struct iio_device_data *dev_data);
/******************************************************************************/
/************************ Variable Declarations ******************************/
/******************************************************************************/
static struct iio_attribute adxl355_iio_temp_attrs[] = {
{
.name = "offset",
Expand Down Expand Up @@ -223,9 +208,6 @@ static struct iio_device adxl355_iio_dev = {
.debug_reg_write = (int32_t (*)())adxl355_iio_write_reg
};

/******************************************************************************/
/************************ Functions Definitions *******************************/
/******************************************************************************/
/***************************************************************************//**
* @brief Fills the 3db frequency table based on the current ODR setting.
*
Expand Down
6 changes: 0 additions & 6 deletions drivers/accel/adxl355/iio_adxl355_trig.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,10 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include "iio_trigger.h"
#include "iio.h"


/******************************************************************************/
/************************ Variable Declarations *******************************/
/******************************************************************************/
struct iio_trigger adxl355_iio_trig_desc = {
.is_synchronous = false,
.enable = iio_trig_enable,
Expand Down
7 changes: 0 additions & 7 deletions drivers/accel/adxl362/adxl362.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,10 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdlib.h>
#include "adxl362.h"
#include "no_os_alloc.h"

/******************************************************************************/
/************************ Functions Definitions *******************************/
/******************************************************************************/

/***************************************************************************//**
* @brief Initializes communication with the device and checks if the part is
* present by reading the device id.
Expand Down
10 changes: 0 additions & 10 deletions drivers/accel/adxl367/adxl367.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdlib.h>
#include "adxl367.h"
#include "no_os_delay.h"
Expand All @@ -42,16 +39,9 @@
#include "no_os_alloc.h"
#include "no_os_print_log.h"

/******************************************************************************/
/************************ Variable Declarations ******************************/
/******************************************************************************/
static const uint8_t adxl367_scale_mul[3] = {1, 2, 4};
static uint8_t samples_per_set = 0;

/******************************************************************************/
/************************ Functions Definitions *******************************/
/******************************************************************************/

/***************************************************************************//**
* @brief Initializes communication with the device and checks if the part is
* present by reading the device id.
Expand Down
14 changes: 0 additions & 14 deletions drivers/accel/adxl367/iio_adxl367.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include "no_os_error.h"
Expand All @@ -43,9 +40,6 @@
#include "adxl367.h"
#include <string.h>

/******************************************************************************/
/********************** Macros and Constants Definitions **********************/
/******************************************************************************/
static const int adxl367_iio_odr_table[6][2] = {
{12, 500000},
{25, 0},
Expand All @@ -63,10 +57,6 @@ static const int adxl367_iio_scale_table[3][2] = {

static struct iio_device adxl367_iio_dev;

/******************************************************************************/
/************************ Functions Definitions *******************************/
/******************************************************************************/

/***************************************************************************//**
* @brief Wrapper for reading ADXL367 register.
*
Expand Down Expand Up @@ -783,10 +773,6 @@ int adxl367_iio_remove(struct adxl367_iio_dev *desc)
return 0;
}

/******************************************************************************/
/************************ Variable Declarations ******************************/
/******************************************************************************/

static struct iio_attribute adxl367_iio_global_attributes[] = {
{
.name = "sampling_frequency",
Expand Down
7 changes: 0 additions & 7 deletions drivers/accel/adxl372/adxl372.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,13 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include "adxl372.h"
#include "no_os_alloc.h"

/******************************************************************************/
/************************** Functions Implementation **************************/
/******************************************************************************/

/**
* Wrapper used to read device registers.
* @param dev - The device structure.
Expand Down
13 changes: 0 additions & 13 deletions drivers/accel/adxl38x/adxl38x.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,18 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include <stdlib.h>
#include <errno.h>
#include "adxl38x.h"
#include "no_os_delay.h"
#include "no_os_alloc.h"
#include "no_os_util.h"

/******************************************************************************/
/********************Variable & Constants Declarations ************************/
/******************************************************************************/
static const uint8_t adxl38x_scale_mul[3] = {1, 2, 4};

/******************************************************************************/
/************************ Functions Declarations ******************************/
/******************************************************************************/
static int64_t adxl38x_accel_conv(struct adxl38x_dev *dev, uint16_t raw_accel);
static int adxl38x_set_to_standby(struct adxl38x_dev *dev);

/******************************************************************************/
/************************ Functions Definitions *******************************/
/******************************************************************************/

/***************************************************************************//**
* @brief Reads from the device.
*
Expand Down
12 changes: 0 additions & 12 deletions drivers/adc-dac/ad74413r/ad74413r.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,17 @@
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/

/******************************************************************************/
/***************************** Include Files **********************************/
/******************************************************************************/
#include "ad74413r.h"
#include "no_os_crc8.h"
#include "no_os_delay.h"
#include "no_os_error.h"
#include "no_os_util.h"
#include "no_os_alloc.h"

/******************************************************************************/
/********************** Macros and Constants Definitions **********************/
/******************************************************************************/
#define AD74413R_FRAME_SIZE 4
#define AD74413R_CRC_POLYNOMIAL 0x7
#define AD74413R_DIN_DEBOUNCE_LEN NO_OS_BIT(5)

/******************************************************************************/
/************************ Variable Declarations ******************************/
/******************************************************************************/
NO_OS_DECLARE_CRC8_TABLE(_crc_table);

static const unsigned int ad74413r_debounce_map[AD74413R_DIN_DEBOUNCE_LEN] = {
Expand All @@ -64,9 +55,6 @@ static const unsigned int ad74413r_debounce_map[AD74413R_DIN_DEBOUNCE_LEN] = {
static const uint32_t conv_times_ad74413r[] = { 50000, 208, 100000, 833 };
static const uint32_t conv_times_ad74412r[] = { 50000, 208};

/******************************************************************************/
/************************ Functions Definitions *******************************/
/******************************************************************************/
/******************************************************************************/

/**
Expand Down
Loading

0 comments on commit 715c737

Please sign in to comment.