/* Drives the sleep status instead of sleep change on INT pins (only if INT1_SLEEP_CHANGE or INT2_SLEEP_CHANGE bits are enabled)..  */
int32_t lsm6dso_act_pin_notification_set(lsm6dso_ctx_t *ctx, lsm6dso_sleep_status_on_int_t val)
/* Drives the sleep status instead of sleep change on INT pins (only if INT1_SLEEP_CHANGE or INT2_SLEEP_CHANGE bits are enabled)..  */
int32_t lsm6dso_act_pin_notification_set(lsm6dso_ctx_t *ctx, lsm6dso_sleep_status_on_int_t val)
{
  lsm6dso_tap_cfg0_t reg;
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_TAP_CFG0, (uint8_t*)&reg, 1);
  if (ret == 0) {
    reg.sleep_status_on_int = (uint8_t)val;
    ret = lsm6dso_write_reg(ctx, LSM6DSO_TAP_CFG0, (uint8_t*)&reg, 1);
  }
  return ret;
}