commit | 00411468dd71e4564a39bd54fc524477ace88540 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Wed Mar 20 19:39:13 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Mar 20 19:39:13 2024 +0000 |
tree | 4c8d60e86a0f7d36fbfa40208a9256c6429ba61d | |
parent | 16ff09038907a69c3bd10a7c64e04f30a47a174c [diff] |
pw_channel: Require explicit datagram-to-byte conversions This commit partially reverts a230ae449576bc3e0933fa567c58da2a33ebde13 and makes additional improvements. - Since datagrams and bytes are semantically different, remove the datagram property. A Channel's DataType (kDatagram or kByte) is specified as the first template parameter. - Introduce IgnoreDatagramBoundaries() function to support using a datagram channel as a byte channel. - Fix SFINAE for implicit channel conversions. A static_assert() cannot be used for SFINAE. - Add channel.as<>() overload that takes just the desired properties as template arguments. Change-Id: I9f74393236163b47874005ebf336d083e1ca32c8 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/197650 Reviewed-by: Taylor Cramer <cramertj@google.com> Commit-Queue: Wyatt Hepler <hepler@google.com> Pigweed-Auto-Submit: Wyatt Hepler <hepler@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/.