-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
counters: add
"counters-disabled"
feature flag
The `ringbuf` crate has a `"disabled` feature flag, which disables ring buffers, intended for use on memory-constrained targets. Currently, setting the `"disabled"` feature flag still enables counters for ring buffers declared using the `counted_ringbuf!` macro, because counters generally require less RAM than full ringbufs. However, on some targets, even counters are too large, especially when a ringbuf's entry type has too many variants (e.g. see [this comment][1] from @bcantrill --- the `i2c_driver` ringbuf must disable counters in order to fit in Donglet's RAM). Therefore, this commit adds an additional `"counters-disabled"` feature flag to the `ringbuf` crate, to allow disabling counters as well as ring buffers. [1]: #1657 (comment)
- Loading branch information
Showing
2 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters