From 15ee8bd8885c8b3d0b4650fe609c253780f04bdf Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 14 Jun 2024 17:23:22 +0200 Subject: WIP more puzzle bus driver code --- lib/pbdrv/pb-msg.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/pbdrv/pb-msg.c') diff --git a/lib/pbdrv/pb-msg.c b/lib/pbdrv/pb-msg.c index 8ffd7cc..8bf96ef 100644 --- a/lib/pbdrv/pb-msg.c +++ b/lib/pbdrv/pb-msg.c @@ -35,3 +35,15 @@ void pb_msg_free(pb_msg_t * msg) { free(msg); } +pb_buf_t pb_msg_write_req_magic() { + pb_cmd_req_magic_t content = { + .magic = (char *) &pb_cmd_magic_req[0], + ._magic_size = sizeof(pb_cmd_magic_req), + }; + pb_msg_t msg_write = { + .type = PB_CMD_REQ_MAGIC, + .sender = 0, + .msg = &content, + }; + return pb_msg_write(&msg_write); +} -- cgit v1.2.3