Skip to content

Commit 3b18859

Browse files
committed
applications: sdp: mspi: change opcode cast to uint32
Change cast of opcode in ep_recv function to uint32_t instead of uint8_t. Signed-off-by: Magdalena Pastula <magdalena.pastula@nordicsemi.no>
1 parent c2daec3 commit 3b18859

File tree

1 file changed

+3
-2
lines changed
  • applications/sdp/mspi/src

1 file changed

+3
-2
lines changed

applications/sdp/mspi/src/main.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static void ep_recv(const void *data, size_t len, void *priv)
423423

424424
(void)priv;
425425
(void)len;
426-
uint8_t opcode = *(uint8_t *)data;
426+
uint32_t opcode = *(uint32_t *)data;
427427
uint32_t num_bytes = 0;
428428

429429
#if defined(CONFIG_SDP_MSPI_FAULT_TIMER)
@@ -545,7 +545,8 @@ static void ep_recv(const void *data, size_t len, void *priv)
545545
break;
546546
}
547547

548-
response_buffer[0] = opcode;
548+
uint32_t* resp_buff = (uint32_t*)response_buffer;
549+
resp_buff[0] = opcode;
549550
ipc_service_send(&ep, (const void *)response_buffer,
550551
sizeof(nrfe_mspi_opcode_t) + num_bytes);
551552

0 commit comments

Comments
 (0)