/* Mask DRDY on pin (both XL & Gyro) until filter settling ends (XL and Gyro independently masked)..  */
int32_t lsm6dsl_filter_settling_mask_set(stmdev_ctx_t *ctx, uint8_t val)
/* Mask DRDY on pin (both XL & Gyro) until filter settling ends (XL and Gyro independently masked)..  */
int32_t lsm6dsl_filter_settling_mask_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lsm6dsl_ctrl4_c_t ctrl4_c;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_CTRL4_C, (uint8_t*)&ctrl4_c, 1);
  if(ret == 0){
    ctrl4_c.drdy_mask = val;
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_CTRL4_C, (uint8_t*)&ctrl4_c, 1);
  }
  return ret;
}