Commit graph

46 commits

Author SHA1 Message Date
Jonathan Pallant (42 Technology) 8e66ddcfb1 Switch to new rp2040-boot2 crate. 2021-10-18 10:53:17 +01:00
Jonathan Pallant (42 Technology) e1afb70bd2 Moved float and double functions into modules.
Makes the docs cleaner.
2021-10-11 16:37:16 +01:00
Jonathan Pallant (42 Technology) 64207a62e5 Add comment to calc_delta function as it's non-obvious. 2021-10-11 16:22:11 +01:00
Jonathan Pallant (42 Technology) f56369e1c7 Add example which uses the ROM functions 2021-10-11 15:45:44 +01:00
Mathias Gottschlag 207f5aebdb pio: Split RX and TX FIFO functions into different types.
We need separate types for any blocking or DMA operations - otherwise, it
would not be possible to perform both RX and TX transfers at the same time.
2021-09-30 09:07:15 +02:00
Mathias Gottschlag 684f483859 pio: Improve documentation and add an example that uses pio_proc::pio!(). 2021-09-28 21:48:05 +02:00
Jonathan Pallant da89888ccb
Merge pull request #137 from 42-technology-ltd/ensure-hal-examples-non-board-specific
Working on README and examples
2021-09-28 10:46:42 +01:00
Jonathan Pallant (42 Technology) fc0075a381 Addressing review comments. 2021-09-28 09:26:31 +01:00
Jonathan Pallant (42 Technology) 0beedde69b Ugh. Thanks, rustfmt. 2021-09-27 19:03:07 +01:00
Jonathan Pallant (42 Technology) d251627e47 Make trait comments more consistent. 2021-09-27 19:01:46 +01:00
Jonathan Pallant (42 Technology) 8876159687 Ah, rustfmt. 2021-09-27 18:58:16 +01:00
Jonathan Pallant (42 Technology) c04f439020 Polish the watchdog example. 2021-09-27 18:57:19 +01:00
Jonathan Pallant (42 Technology) b005128a73 Oh, make sure uart example actually builds. 2021-09-27 18:57:10 +01:00
Jonathan Pallant (42 Technology) 7e03772687 Polish the UART example. 2021-09-27 18:52:13 +01:00
Jonathan Pallant (42 Technology) b894ab9ce7 Cleaning up. 2021-09-27 18:43:01 +01:00
Jonathan Pallant (42 Technology) 225eabb449 Use peripheral clock to describe the clock signal given to peripherals. 2021-09-27 18:42:36 +01:00
Jonathan Pallant (42 Technology) 17afa25d2a Polish PWM blink example. 2021-09-27 18:37:29 +01:00
Jonathan Pallant (42 Technology) b370bb5270 Polish SPI example. 2021-09-27 18:37:20 +01:00
Jonathan Pallant (42 Technology) 0336458344 Update LCD example. 2021-09-27 18:14:54 +01:00
Jonathan Pallant (42 Technology) b7acc7c373 Polish I2C example. 2021-09-27 17:30:29 +01:00
Jonathan Pallant (42 Technology) 193972bb9f Polish GPIO example. 2021-09-27 17:30:18 +01:00
Jonathan Pallant (42 Technology) d5a07bc398 Remove hard coded clock speed from blink example. 2021-09-27 17:30:06 +01:00
Jonathan Pallant (42 Technology) 07c183a636 Remove hard coded clock speed from ADC example. 2021-09-27 17:29:50 +01:00
Jonathan Pallant (42 Technology) b0bcbe68d8 Update blinky example. 2021-09-27 14:47:25 +01:00
Jonathan Pallant (42 Technology) ed27dc9949 Update ADC example. 2021-09-27 14:42:19 +01:00
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