From 528f9f76042a7d82a2108f4ea582c61481368ecf Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 24 May 2018 13:18:03 -0400 Subject: command: Add command_find_and_dispatch() helper Add a helper function that calls command_find_block() followed by command_dispatch(). Signed-off-by: Kevin O'Connor --- src/command.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/command.h') diff --git a/src/command.h b/src/command.h index 2dd195ea..035d3929 100644 --- a/src/command.h +++ b/src/command.h @@ -72,6 +72,8 @@ void command_sendf(const struct command_encoder *ce, ...); int_fast8_t command_find_block(uint8_t *buf, uint_fast8_t buf_len , uint_fast8_t *pop_count); void command_dispatch(uint8_t *buf, uint_fast8_t msglen); +int_fast8_t command_find_and_dispatch(uint8_t *buf, uint_fast8_t buf_len + , uint_fast8_t *pop_count); // out/compile_time_request.c (auto generated file) extern const struct command_parser command_index[]; -- cgit v1.2.3-70-g09d2