Skip to content

Commit

Permalink
sizeof
Browse files Browse the repository at this point in the history
  • Loading branch information
Myers-Ty committed Jan 31, 2025
1 parent 0ac9101 commit 99ed78b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/Src/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void read_fuse_data(void *arg)
queue_fault(&fault_data);
}

memcpy(&fuse_buf, &fuses, 2);
memcpy(&fuse_buf, &fuses, sizeof(fuses));

fuse_data.fuse_1 = fuse_buf & 0xFF;
fuse_data.fuse_2 = (fuse_buf >> 8) & 0xFF;
Expand Down Expand Up @@ -367,7 +367,7 @@ void vShutdownMonitor(void *pv_params)
queue_fault(&fault_data);
}

memcpy(&shutdown_buf, &shutdowns, 2);
memcpy(&shutdown_buf, &shutdowns, sizeof(shutdowns));

/* seperate each byte */
shutdown_data.shut_1 = shutdown_buf & 0xFF;
Expand Down

0 comments on commit 99ed78b

Please sign in to comment.