Commit graph

21 commits

Author SHA1 Message Date
Jan Niehusmann fbe2a8834f Update comment on top of pio_blink.rs 2021-09-27 12:36:23 +00:00
Jan Niehusmann c93ea0b97c Update comments in examples/pio_blink.rs 2021-09-26 13:51:48 +00:00
Jan Niehusmann b79f859d72 Add a simple example for PIO. 2021-09-25 13:22:13 +00:00
9names 0942a170f1
Add basic SPI example (#113) 2021-09-19 22:33:36 +10:00
9names 9d2e18dc70
Add ADC example and doc-example (#93) 2021-09-02 22:40:13 +10:00
Hmvp ffa39f65f5
Pwm improvements (#61)
* Reimplement PWM driver using typestates
* Improve docs
2021-09-02 09:37:17 +10:00
9names fae1caaca9
Watchdog example (#86)
* Add watchdog example

* Add watchdog doc-example

* Add changes to the change log
2021-08-21 21:05:55 +10:00
9names 369ac5a23f
Add UART example + core::fmt support to UART (#73)
* Add standalone UART example
* Add UART example to docs in UART module
* Add core::fmt::write_str to UART module to allow easy use of format! macro in user code
2021-08-08 15:36:56 +10:00
Hmvp 4970075974 Also clippy check examples 2021-07-26 20:37:08 +10:00
Hmvp ffa97842e2
Improve clock frequency stuff for uninitialized clocks and add some examples (#64)
* Improve clock frequency stuff for uninitialized clocks

- Made clocks singletons so the frequency handling actually works as expected
- Added initial frequencies
- Improved the docs
- Added a Clock trait

* Add pico examples.

These have the benefit of knowing which external crystal is attached.
Even though it always should be a 12 MHz crystal.
Thus we can setup the clocks properly

I also changed the rp2040 examples to work out of the box for pico boards since that will probably be used most of the time
2021-07-26 20:24:58 +10:00
Jonathan Nilsson 077cba68f5
I2C (#56)
* I2C implementation based on C SDK

* Basic I2C Example
2021-07-25 02:16:07 +10:00
Marcuss2 a02c8131ff
Add HD44780 example (#60)
* Added HD44780 lcd example

* Formatting lcd_display.rs

* Formatting Cargo.toml

* Fixed import formatting issue

* Fixed line with spaces
2021-07-23 18:37:36 +10:00
9names d2aa2b238d Run pwm.rs and pwm_blink.rs through cargo-fmt 2021-07-07 23:55:45 +10:00
Tyler Stowell f87d7ba768
PWM implementation (#44)
* PWM functionality

* Updated prelude.rs

* Added example, cleaned up the PWM HAL.

* Renamed a file for clarity

* Changes to address C-CTOR recommendations, only 8 PWM channels, restructuring

* Forgot to remove a test function, and added a quick comment.

* Cleaned up code now that PWM channels are clustered in the PAC.
2021-07-07 23:44:57 +10:00
Andrea Nall e3be4f8025 Massive GPIO refactor
Bring in line with atsamd-hal GPIO v2

Copied as much as possible. Docs lifted mostly as-is.

Also add sample BSP for the Feather RP2040 in boards/feather_rp2040

May include a few random fixes from currently futile attempt to get doctests working.
2021-07-03 10:32:43 +10:00
Andrea Nall 35464a1c4b typo fix, rustfmt 2021-05-10 08:29:59 -05:00
Andrea Nall 2ef1343c05 add module to manage ownership of parts of SIO 2021-05-09 22:33:36 -05:00
Jennifer Wilcox b3b7677f82 More review comments 2021-04-25 11:13:21 -05:00
Jennifer Wilcox 94f67f7eca Finish configuration options for IOs 2021-04-24 18:03:03 -05:00
Jennifer Wilcox 2e5c1fc0e3 Cleanup wacky imports in examples 2021-04-24 16:22:27 -05:00
Jennifer Wilcox 2c3a0956fa Add input support, examples, SIO/PADS ownership
Sorry this is a large commit :(

This adds support for input pins, including pulling them high or low.

It also adds two examples: the start of a classic blinky LED example, and an example for reading input.
2021-04-24 16:18:57 -05:00