Skip to content

Commit 93b7106

Browse files
committed
Document default value for ShiftDirection
It's different from the reset value, which can easily be missed when porting code from the C SDK.
1 parent fbb7e79 commit 93b7106

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rp2040-hal/src/pio.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,6 +1933,10 @@ pub enum InstallError {
19331933
impl<P: PIOExt> PIOBuilder<P> {
19341934
/// Set config settings based on information from the given [`pio::Program`].
19351935
/// Additional configuration may be needed in addition to this.
1936+
///
1937+
/// Note: The shift direction for both input and output shift registers
1938+
/// defaults to `ShiftDirection::Left`, which is different from the
1939+
/// rp2040 reset value.
19361940
pub fn from_program(p: InstalledProgram<P>) -> Self {
19371941
PIOBuilder {
19381942
clock_divisor: (1, 0),

0 commit comments

Comments
 (0)