Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

alexandruradovici
Copy link
Contributor

Pull Request Overview

This pull request adds SPI to the RP2040.

Testing Strategy

This pull request was tested using a Raspberry Pi Pico.

TODO or Help Wanted

N/A

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

Co-authored-by: Iulia Luta <[email protected]>
Comment on lines +152 to 160
spi0: spi::Spi::new_spi0(),
sysinfo: sysinfo::SysInfo::new(),
}
}

pub fn set_clocks(&'a self) {
self.spi0.set_clocks(&self.clocks);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be easier to just pass clocks in as an argument to spi::new()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, it is a circular dependency, as peripherals has the clock field. I can try though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that won't work. I used a setup_circular_dependencies() method to address that issue for some other chips, which at least made it only require a single call in the case where there were several circular dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed your code 😃

@phil-levis
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 21, 2021

@bors bors bot merged commit d69ff4b into tock:master Jul 21, 2021
bors bot added a commit that referenced this pull request Jul 27, 2021
2680: Add Pico Explorer Base development board r=phil-levis a=alexandruradovici

### Pull Request Overview

This pull request adds the Pico Explorer Base, a test board around the Raspberry Pi Pico.

The Raspberry Pi Pico is not an actual development board, but rather a PCB around the RP2040. Except one single LED, it has no other sensors, buttons or display. The Pico Explorer Base is built around the Pico and provides:
- 4 buttons
- 240x240 LCD
- breadboard

### Testing Strategy

This pull request was tested using a Pico Explorer Base.

### TODO or Help Wanted

This pull request requires 
- [x] #2678 
- [x] #2679.

### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make prepush`.


Co-authored-by: Alexandru Radovici <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants