aboutsummaryrefslogtreecommitdiff
path: root/lib/pbdrv/pb-send.c
diff options
context:
space:
mode:
authorElwin Hammer <elwinhammer@gmail.com>2024-06-22 22:32:30 +0200
committerGitHub <noreply@github.com>2024-06-22 22:32:30 +0200
commita9eb2013e6b7297cfce4116179f4ab2d58d1c8d6 (patch)
tree0f16b75795d9926c5ea4a8ef52a695365837a8e4 /lib/pbdrv/pb-send.c
parentf121de7c7e3ca8f0dc526973a5ee2586485aad22 (diff)
parentd6440954806d381dae5b3df65b43192f897018c6 (diff)
Merge pull request #21 from lonkaars/master
Updating branch
Diffstat (limited to 'lib/pbdrv/pb-send.c')
-rw-r--r--lib/pbdrv/pb-send.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/pbdrv/pb-send.c b/lib/pbdrv/pb-send.c
index 66c43c1..dc34c44 100644
--- a/lib/pbdrv/pb-send.c
+++ b/lib/pbdrv/pb-send.c
@@ -2,7 +2,7 @@
#include "pb-mod.h"
#include "pb-msg.h"
-__weak void pb_send_reply(pb_msg_t * msg, pb_buf_t * reply) {
+__weak void pb_send_reply(const pb_msg_t * msg, const pb_buf_t * reply) {
return pb_i2c_send(msg->sender, (uint8_t *) reply->data, reply->size);
}
@@ -21,10 +21,10 @@ pb_buf_t pb_send_read_req(uint8_t propid) {
return pb_msg_write(&msg);
}
-pb_buf_t pb_send_read_res(uint8_t propid, uint8_t * value, size_t size) {
+pb_buf_t pb_send_read_res(uint8_t propid, const uint8_t * value, size_t size) {
pb_cmd_prop_t cmd = {
.propid = propid,
- .value = value,
+ .value = (uint8_t *) value,
._value_size = size,
};
pb_msg_t msg = {
@@ -36,10 +36,10 @@ pb_buf_t pb_send_read_res(uint8_t propid, uint8_t * value, size_t size) {
return pb_msg_write(&msg);
}
-pb_buf_t pb_send_write_req(uint8_t propid, uint8_t * value, size_t size) {
+pb_buf_t pb_send_write_req(uint8_t propid, const uint8_t * value, size_t size) {
pb_cmd_prop_t cmd = {
.propid = propid,
- .value = value,
+ .value = (uint8_t *) value,
._value_size = size,
};
pb_msg_t msg = {
@@ -64,9 +64,9 @@ pb_buf_t pb_send_state_req() {
return pb_msg_write(&msg);
}
-pb_buf_t pb_send_state_res(pb_global_state_t state) {
+pb_buf_t pb_send_state_res() {
pb_cmd_state_t cmd = {
- .state = state,
+ .state = pb_hook_mod_state_read(),
};
pb_msg_t msg = {
.type = PB_CMD_STATE,