Skip to content

Commit

Permalink
adiv5: Fixed a missing widening cast to legalise the AP ID readout sh…
Browse files Browse the repository at this point in the history
…ifting
  • Loading branch information
dragonmux authored and esden committed Dec 21, 2023
1 parent 6b9ae11 commit 52fdf78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/target/adiv5.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ static uint32_t adiv5_ap_read_id(adiv5_access_port_s *ap, uint32_t addr)
uint8_t data[16];
adiv5_mem_read(ap, data, addr, sizeof(data));
for (size_t i = 0; i < 4U; ++i)
res |= (data[4U * i] << (i * 8U));
res |= (uint32_t)data[4U * i] << (i * 8U);
return res;
}

Expand Down

0 comments on commit 52fdf78

Please sign in to comment.