aboutsummaryrefslogtreecommitdiff
path: root/shared/protocol.c
diff options
context:
space:
mode:
authorHoodieJeansJordans <104365411+HoodieJeansJordans@users.noreply.github.com>2022-06-05 13:21:09 +0200
committerGitHub <noreply@github.com>2022-06-05 13:21:09 +0200
commitbc283424c699effcfa84816c609ca7f00ed5259a (patch)
treeff67ced022120ae05997c1b1f3a49db992e4fcbf /shared/protocol.c
parent5692ca8c65f5f5617d6987b610e425a32c0d8e1d (diff)
parent38d71eb97dbd8f895ed483128b332f018a5ae1d4 (diff)
Merge branch 'lonkaars:master' into master
Diffstat (limited to 'shared/protocol.c')
-rw-r--r--shared/protocol.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/shared/protocol.c b/shared/protocol.c
index fcc9fa4..9be1d31 100644
--- a/shared/protocol.c
+++ b/shared/protocol.c
@@ -74,22 +74,3 @@ size_t w2_cmd_expt_tx_sizeof(w2_s_bin *data) {
size_t w2_cmd_mcfg_rx_sizeof(w2_s_bin *data) {
return W2_DYN_MEMBER_SIZEOF(w2_s_cmd_mcfg_rx, 3, w2_s_cmd_mcfg_feature);
}
-
-void w2_cmd_handler(uint8_t data[W2_SERIAL_READ_BUFFER_SIZE], uint8_t data_length) {
- w2_s_bin *copy = w2_bin_s_alloc(data_length, data);
- void (*handler)(w2_s_bin *) = g_w2_cmd_handlers[data[0]];
-
- if (handler == NULL) {
-#ifdef W2_SIM
- // TODO throw warning
- simwarn("unknown serial message with code 0x%02x\n", data[0]);
-#endif
- } else {
-#ifdef W2_SIM
- w2_sim_print_serial(copy);
-#endif
- handler(copy);
- }
-
- free(copy);
-}