/* High pass data from internal filter sent to output register and FIFO.  */
int32_t lis2dh12_high_pass_on_outputs_set(stmdev_ctx_t *ctx, uint8_t val)
/* High pass data from internal filter sent to output register and FIFO.  */
int32_t lis2dh12_high_pass_on_outputs_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lis2dh12_ctrl_reg2_t ctrl_reg2;
  int32_t ret;
  ret = lis2dh12_read_reg(ctx, LIS2DH12_CTRL_REG2,
                          (uint8_t *)&ctrl_reg2, 1);
  if (ret == 0)
  {
    ctrl_reg2.fds = val;
    ret = lis2dh12_write_reg(ctx, LIS2DH12_CTRL_REG2,
                             (uint8_t *)&ctrl_reg2, 1);
  }
  return ret;
}