There are probably instances where 1kHz isn't fast enough for certain sensor types:

https://github.com/apache/incubator-mynewt-core/compare/develop...sensors_branch#diff-ec052d973c26072d9ac2e198f16e764aR226

    /**
     * Poll rate in MS for this sensor.
     */
    uint32_t s_poll_rate;

Having said that ... if there are callbacks providing data events, we may not want that to fire at anything less than 1ms as well, so there is a tradeoff. At that point, perhaps collecting a number of data samples inside the driver may be valid, and then returning that collection of samples in the event callback, although this goes against the design decision not to buffer data internally?

Would a microsecond poll rate be too much to deal with on most systems in your opinion(s)? That still gives you a valid polling range of 1us..4294s in a 32-bit value. That's only slightly more than an hour, though, which is a shame since I can imagine situations where you might want something every 6 hours as well. There may also be timer issues going below 1ms resolution as well.

Reply via email to