Skip to content

Commit

Permalink
ism330dhcx driver: Fixed most mcuastyle errors
Browse files Browse the repository at this point in the history
Fixed most mcuastyle errors in the source and header files.

Signed-off-by: Carlo Parata <[email protected]>
  • Loading branch information
cparata committed Nov 3, 2022
1 parent c4b39c9 commit 36deb8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
23 changes: 12 additions & 11 deletions ism330dhcx_reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ int32_t ism330dhcx_temp_flag_data_ready_get(stmdev_ctx_t *ctx,
}

/**
* @brief Accelerometer X-axis user offset correction expressed in twos
* @brief Accelerometer X-axis user offset correction expressed in two's
* complement, weight depends on USR_OFF_W in CTRL6_C (15h).
* The value must be in the range [-127 127].[set]
*
Expand All @@ -1360,7 +1360,7 @@ int32_t ism330dhcx_xl_usr_offset_x_set(stmdev_ctx_t *ctx,
}

/**
* @brief Accelerometer X-axis user offset correction expressed in twos
* @brief Accelerometer X-axis user offset correction expressed in two's
* complement, weight depends on USR_OFF_W in CTRL6_C (15h).
* The value must be in the range [-127 127].[get]
*
Expand All @@ -1379,7 +1379,7 @@ int32_t ism330dhcx_xl_usr_offset_x_get(stmdev_ctx_t *ctx,
}

/**
* @brief Accelerometer Y-axis user offset correction expressed in twos
* @brief Accelerometer Y-axis user offset correction expressed in two's
* complement, weight depends on USR_OFF_W in CTRL6_C (15h).
* The value must be in the range [-127 127].[set]
*
Expand All @@ -1398,7 +1398,7 @@ int32_t ism330dhcx_xl_usr_offset_y_set(stmdev_ctx_t *ctx,
}

/**
* @brief Accelerometer Y-axis user offset correction expressed in twos
* @brief Accelerometer Y-axis user offset correction expressed in two's
* complement, weight depends on USR_OFF_W in CTRL6_C (15h).
* The value must be in the range [-127 127].[get]
*
Expand All @@ -1417,7 +1417,7 @@ int32_t ism330dhcx_xl_usr_offset_y_get(stmdev_ctx_t *ctx,
}

/**
* @brief Accelerometer Z-axis user offset correction expressed in twos
* @brief Accelerometer Z-axis user offset correction expressed in two's
* complement, weight depends on USR_OFF_W in CTRL6_C (15h).
* The value must be in the range [-127 127].[set]
*
Expand All @@ -1436,7 +1436,7 @@ int32_t ism330dhcx_xl_usr_offset_z_set(stmdev_ctx_t *ctx,
}

/**
* @brief Accelerometer X-axis user offset correction expressed in twos
* @brief Accelerometer X-axis user offset correction expressed in two's
* complement, weight depends on USR_OFF_W in CTRL6_C (15h).
* The value must be in the range [-127 127].[get]
*
Expand Down Expand Up @@ -1571,7 +1571,7 @@ int32_t ism330dhcx_timestamp_get(stmdev_ctx_t *ctx, uint8_t *val)
/**
* @brief Timestamp first data output register (r).
* The value is expressed as a 32-bit word and the bit resolution
* is 25 μs.[get]
* is 25 us.[get]
*
* @param ctx Read / write interface definitions.(ptr)
* @param buff Buffer that stores data read
Expand Down Expand Up @@ -1673,7 +1673,7 @@ int32_t ism330dhcx_rounding_mode_get(stmdev_ctx_t *ctx,

/**
* @brief Temperature data output register (r).
* L and H registers together express a 16-bit word in twos
* L and H registers together express a 16-bit word in two's
* complement.[get]
*
* @param ctx Read / write interface definitions.(ptr)
Expand All @@ -1695,7 +1695,7 @@ int32_t ism330dhcx_temperature_raw_get(stmdev_ctx_t *ctx,

/**
* @brief Angular rate sensor. The value is expressed as a 16-bit
* word in twos complement.[get]
* word in two's complement.[get]
*
* @param ctx Read / write interface definitions.(ptr)
* @param buff Buffer that stores data read
Expand All @@ -1720,7 +1720,7 @@ int32_t ism330dhcx_angular_rate_raw_get(stmdev_ctx_t *ctx,

/**
* @brief Linear acceleration output register. The value is expressed as a
* 16-bit word in twos complement.[get]
* 16-bit word in two's complement.[get]
*
* @param ctx Read / write interface definitions.(ptr)
* @param buff Buffer that stores data read
Expand Down Expand Up @@ -2112,7 +2112,8 @@ int32_t ism330dhcx_ln_pg_write(stmdev_ctx_t *ctx, uint16_t add,
ism330dhcx_page_rw_t page_rw;
ism330dhcx_page_sel_t page_sel;
ism330dhcx_page_address_t page_address;
uint8_t msb, lsb;
uint8_t msb;
uint8_t lsb;
int32_t ret;
uint8_t i ;
msb = (uint8_t)((add / 256U) & 0x0FU);
Expand Down
4 changes: 2 additions & 2 deletions ism330dhcx_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern "C" {
/** if _BYTE_ORDER is not defined, choose the endianness of your architecture
* by uncommenting the define which fits your platform endianness
*/
//#define DRV_BYTE_ORDER DRV_BIG_ENDIAN
/* #define DRV_BYTE_ORDER DRV_BIG_ENDIAN */
#define DRV_BYTE_ORDER DRV_LITTLE_ENDIAN

#else /* defined __BYTE_ORDER__ */
Expand Down Expand Up @@ -2862,7 +2862,7 @@ float_t ism330dhcx_from_lsb_to_nsec(int32_t lsb);
typedef enum
{
ISM330DHCX_2g = 0,
ISM330DHCX_16g = 1, /* if XL_FS_MODE = ‘1’ -> ISM330DHCX_2g */
ISM330DHCX_16g = 1, /* if XL_FS_MODE = '1' -> ISM330DHCX_2g */
ISM330DHCX_4g = 2,
ISM330DHCX_8g = 3,
} ism330dhcx_fs_xl_t;
Expand Down

0 comments on commit 36deb8e

Please sign in to comment.