examples/bmi270/accel/accel.c
/*!
 * @brief This function converts lsb to meter per second squared for 16 bit accelerometer at
 * range 2G, 4G, 8G or 16G.
 */
@brief This function converts lsb to meter per second squared for 16 bit accelerometer at
range 2G, 4G, 8G or 16G.
@brief This function converts lsb to meter per second squared for 16 bit accelerometer at range 2G 4G 8G or 16G .
static float lsb_to_mps2(int16_t val, float g_range, uint8_t bit_width)
{
    float half_scale = ((float)(1 << bit_width) / 2.0f);
    return (GRAVITY_EARTH * val * g_range) / half_scale;
}
static float lsb_to_mps2 ( int16_t val , float g_range , uint8_t bit_width ) { float half_scale = ( ( float ) ( 1 << bit_width ) / 2.0f ) ; return ( GRAVITY_EARTH * val * g_range ) / half_scale ; }
@brief This function converts lsb to meter per second squared for 16 bit accelerometer at
 range 2G, 4G, 8G or 16G.
@brief This function converts lsb to meter per second squared for 16 bit accelerometer at range 2G 4G 8G or 16G .