mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-08-30 11:11:57 +00:00
kata-ml-coordinator: Fix bit bug
pc_start is a full 16 bits, freeze is 1 bit. Mixed up the bit ands. Need auto-generation :) Change-Id: Ib4f701b43e131bfcb448c68b06d2518cf80e8098 GitOrigin-RevId: a7c3c64eb15ffce8e76b28b105832a253a6d580b
This commit is contained in:
parent
b9cc80a929
commit
0a952a59f4
@ -23,7 +23,7 @@ pub extern "C" fn run() {
|
||||
// TODO: Move out of this file into separate (auto-generated?) file.
|
||||
// TODO: Consider the modular_bitfield crate to represent bitfields.
|
||||
fn vctop_ctrl(freeze: u32, vc_reset: u32, pc_start: u32) -> u32 {
|
||||
((pc_start & 1) << 2) + ((vc_reset & 1) << 1) + freeze
|
||||
(pc_start << 2) + ((vc_reset & 1) << 1) + (freeze & 1)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
Loading…
Reference in New Issue
Block a user