/* Read all the interrupt/status flag of the device..  */
int32_t lps22hh_all_sources_get(stmdev_ctx_t *ctx, lps22hh_all_sources_t *val)
/* Read all the interrupt/status flag of the device..  */
int32_t lps22hh_all_sources_get(stmdev_ctx_t *ctx, lps22hh_all_sources_t *val)
{
  int32_t ret;
  ret = lps22hh_read_reg(ctx, LPS22HH_INT_SOURCE,
                         (uint8_t *) & (val->int_source), 1);
  if (ret == 0) {
    ret = lps22hh_read_reg(ctx, LPS22HH_FIFO_STATUS2,
                           (uint8_t *) & (val->fifo_status2), 1);
  }
  if (ret == 0) {
    ret = lps22hh_read_reg(ctx, LPS22HH_STATUS,
                           (uint8_t *) & (val->status), 1);
  }
  return ret;
}