diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-25 12:09:15 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-25 12:09:15 +0200 |
commit | 18e5d93da8fdf6dd97c9e2d090ae2648d85cb851 (patch) | |
tree | ec4935b8682ab878ecbe0c41afa96cacf9b5f53c /lib/pbdrv/pb-mod.c | |
parent | 208dee5a3cf9eea84c5e26ef5cfe3abdd2e2a2f8 (diff) |
fix client show all messages
Diffstat (limited to 'lib/pbdrv/pb-mod.c')
-rw-r--r-- | lib/pbdrv/pb-mod.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/pbdrv/pb-mod.c b/lib/pbdrv/pb-mod.c index 6b23b04..0342391 100644 --- a/lib/pbdrv/pb-mod.c +++ b/lib/pbdrv/pb-mod.c @@ -18,9 +18,8 @@ __weak void pb_hook_mod_state_write(pb_global_state_t state) { _global_state = state; } -__weak void pb_hook_i2c_recv(const uint8_t * data, size_t sz) { } __weak void pb_i2c_recv(const uint8_t * data, size_t sz) { - pb_hook_i2c_recv(data, sz); + if (pb_hook_i2c_recv(data, sz)) return; pb_buf_t buf = { .data = (char *) data, @@ -35,5 +34,11 @@ __weak void pb_i2c_recv(const uint8_t * data, size_t sz) { pb_msg_free(msg); } -__weak void pb_hook_i2c_send(i2c_addr_t i2c_addr, const uint8_t * data, size_t sz) { } +__weak bool pb_hook_i2c_recv(const uint8_t * data, size_t sz) { + return false; +} + +__weak bool pb_hook_i2c_send(i2c_addr_t i2c_addr, const uint8_t * data, size_t sz) { + return false; +} |