Lines Matching full:period
13 /* internal chip period is 32kHz, 31250ns */
44 uint32_t period) in inv_icm42600_timestamp_init() argument
49 /* current multiplier and period values after reset */ in inv_icm42600_timestamp_init()
51 ts->period = default_period; in inv_icm42600_timestamp_init()
53 ts->new_mult = period / INV_ICM42600_TIMESTAMP_PERIOD; in inv_icm42600_timestamp_init()
55 /* use theoretical value for chip period */ in inv_icm42600_timestamp_init()
71 uint32_t period, bool fifo) in inv_icm42600_timestamp_update_odr() argument
77 ts->new_mult = period / INV_ICM42600_TIMESTAMP_PERIOD; in inv_icm42600_timestamp_update_odr()
82 static bool inv_validate_period(uint32_t period, uint32_t mult) in inv_validate_period() argument
87 /* check that period is acceptable */ in inv_validate_period()
90 if (period > period_min && period < period_max) in inv_validate_period()
97 uint32_t mult, uint32_t period) in inv_compute_chip_period() argument
101 if (!inv_validate_period(period, mult)) in inv_compute_chip_period()
104 /* update chip internal period estimation */ in inv_compute_chip_period()
105 new_chip_period = period / mult; in inv_compute_chip_period()
118 uint32_t period = ts->period; in inv_icm42600_timestamp_interrupt() local
131 /* compute period: delta time divided by number of samples */ in inv_icm42600_timestamp_interrupt()
132 period = div_s64(delta, fifo_nb); in inv_icm42600_timestamp_interrupt()
133 valid = inv_compute_chip_period(ts, fifo_mult, period); in inv_icm42600_timestamp_interrupt()
134 /* update sensor period if chip internal period is updated */ in inv_icm42600_timestamp_interrupt()
136 ts->period = ts->mult * ts->chip_period.val; in inv_icm42600_timestamp_interrupt()
141 /* elapsed time: sensor period * sensor samples number */ in inv_icm42600_timestamp_interrupt()
142 interval = (int64_t)ts->period * (int64_t)sensor_nb; in inv_icm42600_timestamp_interrupt()
157 m = INV_ICM42600_TIMESTAMP_MAX_PERIOD(ts->period) - ts->period; in inv_icm42600_timestamp_interrupt()
176 /* update to new multiplier and update period */ in inv_icm42600_timestamp_apply_odr()
179 ts->period = ts->mult * ts->chip_period.val; in inv_icm42600_timestamp_apply_odr()
184 * timestamp from the current interrupt using the new FIFO period, the in inv_icm42600_timestamp_apply_odr()
188 /* compute measured fifo period */ in inv_icm42600_timestamp_apply_odr()