This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push: new b49b62a733 analog/ads1115: Speed up channel measurement delays b49b62a733 is described below commit b49b62a73324300355134acc628bc831d15e6192 Author: Matteo Golin <matteo.go...@gmail.com> AuthorDate: Wed May 28 13:31:40 2025 -0400 analog/ads1115: Speed up channel measurement delays The ADS1115 driver uses the `nxsig_usleep()` function to sleep for a 65us delay, but with a 1ms tick resolution and the context-switching overhead, this is much more than 1ms. Introducing `up_udelay` (even with a larger duration because of the unreliability of busy-waiting) speeds up sampling noticeably. Signed-off-by: Matteo Golin <matteo.go...@gmail.com> --- drivers/analog/ads1115.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/analog/ads1115.c b/drivers/analog/ads1115.c index 7d672f6e33..099a845f0e 100644 --- a/drivers/analog/ads1115.c +++ b/drivers/analog/ads1115.c @@ -423,7 +423,7 @@ static int ads1115_readchannel(FAR struct ads1115_dev_s *priv, { /* ADS1115 takes ~25 usec to wake up */ - nxsig_usleep(25); + up_udelay(4000); ret = ads1115_read_current_register(priv, &buf); count++; }