commit | 04f7e41b69b55a7a5c887a0204ac7e28f77c3308 | [log] [tgz] |
---|---|---|
author | RJ Ascani <rjascani@google.com> | Wed Feb 16 15:20:20 2022 -0800 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Feb 17 02:40:40 2022 +0000 |
tree | caa0a314bfcea43ab3fad88a214ac7c8b261af4f | |
parent | d889b2ae7339a1747d167a034d777564076e7dc6 [diff] |
pw_bytes: Add functions for specifying byte units In some situations, the usage of user-defined literals is either not permitted or desirable due to the required usage directive. For example, one would not want to place a using directive in a header and pollute the namespace. This CL adds similar functions to provide similar readability improvements. For example: constexpr size_t kBufferSize = pw::bytes::MiB(1) + pw::bytes::KiB(42); Change-Id: I7c7d78ea05e665ea586a553dc3d39d266a2dfc67 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/84747 Reviewed-by: Keir Mierle <keir@google.com> Commit-Queue: Keir Mierle <keir@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/