diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-05-30 15:51:08 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-05-30 15:51:08 +0200 |
commit | b231e9d808f40aef0895787ea09624787b10addd (patch) | |
tree | 6ee2a4550e1c4a6384dd22e9967464b7766dc9cc /shared | |
parent | d1f5291f82f5e13db756adc919883e310cc537de (diff) |
more client i2c shuffling
Diffstat (limited to 'shared')
-rw-r--r-- | shared/include.cmake | 2 | ||||
-rw-r--r-- | shared/pb/moddrv.c (renamed from shared/pb/driver.c) | 19 | ||||
-rw-r--r-- | shared/pb/moddrv.h (renamed from shared/pb/driver.h) | 0 |
3 files changed, 13 insertions, 8 deletions
diff --git a/shared/include.cmake b/shared/include.cmake index f07a78b..c4b01c2 100644 --- a/shared/include.cmake +++ b/shared/include.cmake @@ -1,5 +1,5 @@ include_directories(${CMAKE_CURRENT_LIST_DIR}) add_library(puzbus STATIC - ${CMAKE_CURRENT_LIST_DIR}/pb/driver.c + ${CMAKE_CURRENT_LIST_DIR}/pb/moddrv.c ) diff --git a/shared/pb/driver.c b/shared/pb/moddrv.c index f43d5c1..4c897e0 100644 --- a/shared/pb/driver.c +++ b/shared/pb/moddrv.c @@ -1,7 +1,7 @@ #include <memory.h> #include "types.h" -#include "driver.h" +#include "moddrv.h" /** \brief [private] placeholder global state variable */ static pb_state_t _global_state = PB_GS_NOINIT; @@ -17,12 +17,6 @@ __weak void pbdrv_hook_mod_state_write(pb_state_t state) { _global_state = state; } -__weak void pbdrv_hook_main_state_update(pb_state_t state) { } - -__weak bool pbdrv_hook_cmd(uint16_t i2c_addr, pb_cmd_t cmd, const char * buf, size_t sz) { - return false; -} - __weak void pbdrv_i2c_recv(uint16_t i2c_addr, const char * buf, size_t sz) { if (sz == 0) return; pb_cmd_t cmd = (enum pb_cmd) buf[0]; @@ -111,3 +105,14 @@ __weak void pbdrv_handle_sex(uint16_t i2c_addr, const char * buf, size_t sz) { pbdrv_hook_main_state_update(_main_state); } +__weak void pbdrv_hook_main_state_update(pb_state_t state) { } +__weak bool pbdrv_hook_cmd(uint16_t i2c_addr, pb_cmd_t cmd, const char * buf, size_t sz) { + return false; +} +__weak bool pbdrv_hook_read(uint16_t i2c_addr, uint8_t addr) { + return false; +} +__weak bool pbdrv_hook_write(uint16_t i2c_addr, uint8_t addr, const char * buf, size_t sz) { + return false; +} + diff --git a/shared/pb/driver.h b/shared/pb/moddrv.h index c4e1167..c4e1167 100644 --- a/shared/pb/driver.h +++ b/shared/pb/moddrv.h |