Commit Graph

3 Commits

Author SHA1 Message Date
Wyatt Hepler
f5cdd936a9 pw_function: Make constexpr constructible
This makes pw::Function usable in classes with constexpr constructors
and makes it compatible with constinit.

Change-Id: Iba20a6e2973f2488ab767bf0aafa99bf47f5ec2e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/50361
Commit-Queue: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
2021-06-22 23:23:40 +00:00
Alexei Frolov
bebba90c01 pw_rpc: Use pw_function callbacks in RPC client
This updates the nanopb RPC client to use pw::Function for callbacks
instead of custom virtual interfaces.

Change-Id: I7c548cde00223ec32e45cc831fe7f9f79577842b
Requires: pigweed-internal:13201
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/48484
Reviewed-by: Wyatt Hepler <hepler@google.com>
2021-06-11 16:30:14 +00:00
Alexei Frolov
99de52de27 pw_function: Standard callback API
This implements pw::Function, a standard wrapper for callable objects.

This CL is currently provided as a proof-of-concept implementation based
on fbl::Function, and does not necessarily represent the final design of
pw::Function.

Change-Id: Ie2f5714b9711a08de878471e8f31fc46b26d36e8
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/46080
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Commit-Queue: Alexei Frolov <frolv@google.com>
2021-06-08 19:00:42 +00:00