/* This API reads acceleration data X values from location 02h and 03h bit resolution support 8bit.  */
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_eight_resolution_x(s8 *accel_x_s8)
/* This API reads acceleration data X values from location 02h and 03h bit resolution support 8bit.  */
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_read_accel_eight_resolution_x(s8 *accel_x_s8)
{
    BMA2x2_RETURN_FUNCTION_TYPE com_rslt = ERROR;
    u8  data = BMA2x2_INIT_VALUE;
    if (p_bma2x2 == BMA2x2_NULL)
    {
        return E_BMA2x2_NULL_PTR;
    }
    else
    {
        com_rslt = p_bma2x2->BMA2x2_BUS_READ_FUNC
                   (p_bma2x2->dev_addr,
                    BMA2x2_X_AXIS_MSB_ADDR, &data,
                    BMA2x2_GEN_READ_WRITE_LENGTH);
        *accel_x_s8 = BMA2x2_GET_BITSLICE(data,
                                          BMA2x2_ACCEL_X_MSB);
    }
    return com_rslt;
}