/* Interrupt status bit for FSM long counter timeout interrupt event..  */
int32_t lsm6dso_long_cnt_flag_data_ready_get(stmdev_ctx_t *ctx, uint8_t *val)
/* Interrupt status bit for FSM long counter timeout interrupt event..  */
int32_t lsm6dso_long_cnt_flag_data_ready_get(stmdev_ctx_t *ctx, uint8_t *val)
{
  lsm6dso_emb_func_status_t reg;
  int32_t ret;
  ret = lsm6dso_mem_bank_set(ctx, LSM6DSO_EMBEDDED_FUNC_BANK);
  if (ret == 0) {
    ret = lsm6dso_read_reg(ctx, LSM6DSO_EMB_FUNC_STATUS, (uint8_t *)&reg,
                           1);
  }
  if (ret == 0) {
    *val = reg.is_fsm_lc;
    ret = lsm6dso_mem_bank_set(ctx, LSM6DSO_USER_BANK);
  }
  return ret;
}