We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example
use pio::*; use pio_proc::*; fn main() { let sideset = SideSet::new(false, 0, false); let in_example_1 = InstructionOperands::IN { source: InSource::Y, bit_count: 32, }.encode(); println!("example 1: {:?}", Instruction::decode(in_example_1, sideset)); let in_example_2 = pio_asm!( "in y, 32" ); println!("example 2: {:?}", Instruction::decode(in_example_2.program.code[0], sideset)); }
output
example 1: Some(Instruction { operands: IN { source: NULL, bit_count: 0 }, delay: 0, side_set: None }) example 2: Some(Instruction { operands: IN { source: NULL, bit_count: 0 }, delay: 0, side_set: None })
expected output should contain source: Y instead of source: NULL
source: Y
source: NULL
the reason is incorrectly encoding the bit_count for IN with the value 32 at
pio-rs/src/lib.rs
Line 236 in 42e8c13
the correct behavior (*bit_count & 0b11111) is done for OUT, but not for IN
*bit_count & 0b11111
The text was updated successfully, but these errors were encountered:
Thanks, @xeniarose, good catch!
Sorry, something went wrong.
Fix encoding of IN instruction with bit_count == 32
4db6756
Thanks to @xeniarose for finding and reporting this bug Fixes rp-rs#57
c84f887
acd253c
Successfully merging a pull request may close this issue.
example
output
expected output should contain
source: Y
instead ofsource: NULL
the reason is incorrectly encoding the bit_count for IN with the value 32 at
pio-rs/src/lib.rs
Line 236 in 42e8c13
the correct behavior (
*bit_count & 0b11111
) is done for OUT, but not for INThe text was updated successfully, but these errors were encountered: