Skip to content

Commit

Permalink
Document default value for ShiftDirection
Browse files Browse the repository at this point in the history
It's different from the reset value, which can easily be missed when
porting code from the C SDK.
  • Loading branch information
jannic committed Nov 5, 2023
1 parent fbb7e79 commit 93b7106
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rp2040-hal/src/pio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1933,6 +1933,10 @@ pub enum InstallError {
impl<P: PIOExt> PIOBuilder<P> {
/// Set config settings based on information from the given [`pio::Program`].
/// Additional configuration may be needed in addition to this.
///
/// Note: The shift direction for both input and output shift registers
/// defaults to `ShiftDirection::Left`, which is different from the
/// rp2040 reset value.
pub fn from_program(p: InstalledProgram<P>) -> Self {
PIOBuilder {
clock_divisor: (1, 0),
Expand Down

0 comments on commit 93b7106

Please sign in to comment.