Skip to content

Commit

Permalink
RPC: Move Rpc.cpp to platform
Browse files Browse the repository at this point in the history
Reduce code duplication by moving the Rpc.cpp file to the platform.
This greatly reduces code required to add rpcs to examples.
  • Loading branch information
Rob Oliver committed Nov 10, 2021
1 parent a27a311 commit bb1118b
Show file tree
Hide file tree
Showing 16 changed files with 511 additions and 660 deletions.
7 changes: 7 additions & 0 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ target_link_libraries(${COMPONENT_LIB} PUBLIC
pw_trace_tokenized.protos.nanopb_rpc
)

target_compile_options(${COMPONENT_LIB} PRIVATE
"-DPW_RPC_ATTRIBUTE_SERVICE=1"
"-DPW_RPC_BUTTON_SERVICE=1"
"-DPW_RPC_DEVICE_SERVICE=1"
"-DPW_RPC_LIGHTING_SERVICE=1"
"-DPW_RPC_LOCKING_SERVICE=1")

set_property(TARGET ${chip_lib} APPEND PROPERTY LINK_LIBRARIES ${COMPONENT_LIB})
target_include_directories(${chip_lib} PUBLIC
"$<TARGET_FILE_DIR:${chip_lib}>/protocol_buffer/gen/third_party/connectedhomeip/third_party/pigweed/repo/pw_rpc/protos.proto_library/nanopb_rpc"
Expand Down
352 changes: 0 additions & 352 deletions examples/all-clusters-app/esp32/main/Rpc.cpp

This file was deleted.

Loading

0 comments on commit bb1118b

Please sign in to comment.