/* Sleep-to-wake, return-to-sleep activation threshold in low-power mode. 1 LSb = 16mg@2g / 32mg@4g / 62mg@8g / 186mg@16g.  */
int32_t lis2dh12_act_threshold_get(stmdev_ctx_t *ctx, uint8_t *val)
/* Sleep-to-wake, return-to-sleep activation threshold in low-power mode. 1 LSb = 16mg@2g / 32mg@4g / 62mg@8g / 186mg@16g.  */
int32_t lis2dh12_act_threshold_get(stmdev_ctx_t *ctx, uint8_t *val)
{
  lis2dh12_act_ths_t act_ths;
  int32_t ret;
  ret = lis2dh12_read_reg(ctx, LIS2DH12_ACT_THS, (uint8_t *)&act_ths, 1);
  *val = (uint8_t)act_ths.acth;
  return ret;
}