/* This API is used to set the offset reset(offset_reset) in the register 0x36 bit 7(Write only possible)  */
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_offset_rst(u8 offset_rst_u8)
/* This API is used to set the offset reset(offset_reset) in the register 0x36 bit 7(Write only possible)  */
BMA2x2_RETURN_FUNCTION_TYPE bma2x2_set_offset_rst(u8 offset_rst_u8)
{
    u8 data_u8 = BMA2x2_INIT_VALUE;
    BMA2x2_RETURN_FUNCTION_TYPE com_rslt = ERROR;
    if (p_bma2x2 == BMA2x2_NULL)
    {
        return E_BMA2x2_NULL_PTR;
    }
    else
    {
        com_rslt = p_bma2x2->BMA2x2_BUS_READ_FUNC
                   (p_bma2x2->dev_addr,
                    BMA2x2_RST_OFFSET_REG,
                    &data_u8, BMA2x2_GEN_READ_WRITE_LENGTH);
        data_u8 = BMA2x2_SET_BITSLICE
                  (data_u8, BMA2x2_RST_OFFSET,
                   offset_rst_u8);
        com_rslt += bma2x2_write_reg(
                        BMA2x2_RST_OFFSET_REG,
                        &data_u8, BMA2x2_GEN_READ_WRITE_LENGTH);
    }
    return com_rslt;
}