Commit graph

41 commits

Author SHA1 Message Date
Jonathan 'theJPster' Pallant c8c366c23d Use new spinlock API provide by PAC 0.3.0 2022-01-30 12:56:51 +00:00
Jan Niehusmann 2f9a950cbe Bump versions of HAL and BSPs
The change to UartPeripheral in #210 was a breaking change:
Bump the version of the HAL and all dependent BSP crates.
2021-12-26 19:52:04 +00:00
Jonathan Pallant bebf85d4d9 Set up for 0.3.0 release.
Somehow we already had a bunch of commits talking about 0.3.0, but it
was never released. Hence why this maybe doesn't change as many version
numbers as you might expect.
2021-12-19 19:22:15 +00:00
Jonathan Pallant a9f6ab8de4 Comment out embassy traits.
The git dep prevents us from publishing, rp2040-hal, and embassy
aren't doing a release any time soon.
2021-12-18 19:09:37 +00:00
Jonathan 'theJPster' Pallant 53d9dbdf52
Update to pio-rs v0.1.0 (#239)
* Update to PIO 0.1.0

* Update to latest ws2812-pio and i2c-pio.

These depend on pio 0.1.0, avoiding a conflict

* Rename CI tests.

Also check we can cargo build. And remove 'on host tests' that didn't
do anything.

Co-authored-by: Jonathan Pallant <jonathan.pallant@42technology.com>
2021-12-14 10:52:32 +11:00
Wilfried Chauveau fee8881801
bump embassy's dependencies 2021-12-05 12:39:25 +00:00
9names 0e7abdc705
Make BSPs provide boot2 as a default feature (#153)
* Add boot2 feature. Add boot2 linkage into each BSP optional on feature

* Enable boot2 feature in BSPs by default. Remove boot2 decl from all BSP examples

* Add EXTERN in memory.x for BOOT2_FIRMWARE, rename bootloader static slice to BOOT2_FIRMWARE

* Update new examples and itsy_bitsy BSP to use boot2 feature

* Remove boot2 as a dev-dependency for the BSPs, no longer needed

* Add no_mangle BOOT2_FIRMWARE to adafruit_macropad

* Fix itsy-bitsy blinky - it wasn't using the BSP, so it didn't get BOOT2_FIRMWARE linked in
2021-12-05 01:00:09 +11:00
9names d84e641390
Add simple interrupt_disable+spinlock critical-section impl (#151)
* Add basic interrupt_disable+spinlock critical-section

* Update impl based on feedback from jannic

* Get rid of count variable, switch to AtomicU8 for lock state

* Remove interrupt::disable that isn't necessary for safety

* Rename variables, re-write most of the comments

* Add fences to ensure ordering
2021-12-02 00:03:41 +11:00
devsnek e1f99443d9
multicore (#89)
mvp multicore implementation

Co-authored-by: Jan Niehusmann <jan@gondor.com>
2021-12-01 23:52:53 +11:00
Trangar f68f148d12
Added RtcClock DateTime and alarms (#213)
* Added RealTimeClock, DateTime and RTC alarms

* Improved documentation on weird behaviors in the RealTimeClock

* Fixed incorrect leap_year_check in RealTimeClock

* Fixed rtc-datetime PR feedback
2021-11-29 21:15:20 +11:00
Jonathan Pallant 292a6f13c8
Merge pull request #205 from jannic/eh-1_alpha6
Update eh1_0_alpha feature for embedded-hal 1.0.0-alpha.6
2021-11-25 14:30:02 +00:00
Jonathan Pallant 68602fa6e1 0.1.6 had breaking changes, so I yanked it and made 0.2.0. 2021-11-19 22:30:43 +00:00
Jonathan Pallant 84b903b12a PAC 0.1.6 is now released. 2021-11-19 22:22:29 +00:00
Jan Niehusmann 76aff05cec Update dependency on embedded-hal 1.x to 1.0.0-alpha.6 2021-11-19 21:41:00 +00:00
Jonathan Pallant 23bafb6980 Point at PAC release branch. 2021-11-19 12:22:52 +00:00
Wilfried Chauveau 990d964a93
Implement peripheral support for i2c and an advanced example (#162)
* Implement peripheral support for i2c and an advanced example for the pico board.

* Simplify i2c peripheral bootstrap and add a "free" function to allow switching modes.

* Set dependency to futures & nostd_async to specific version/revision.

* move enum & struct to the start of the file

* Add a bit of documentation to the pico_i2c_controller_peripheral demo.

* Migrate to pico_i2c_controller_peripheral to embassy & simplify the peripheral support

nostd_async is broken since last stable roll out.
The pico_i2c_controller_peripheral is being migrated to use embassy's executor.
The Controller Async API is now aligned with embassy's traits to facilitate integration.

The peripheral no longer require async to run and now appears as an event iterator.

Embassy's support relies on unstable features (generic_associated_types and type_alias_impl_traits)
and is therefore gated behind the `embassy-traits` feature flag.

* make futures & embassy optional for the pico board too

* Pin embassy to a specific rev.

* Impl embassy_traits::i2c::WriteIter & enable unlimited transfer size on i2c

* Applies comment suggestion from @9names for the advanced i2c example.

Co-authored-by: 9names <60134748+9names@users.noreply.github.com>

* use `I2C block` instead of `IP`.

* Fix formatting (unnecessary space at end of line)

* Enhance explanation for why `rd_req()`  is not cleared in `Iterator::next`'s
implementation.

Co-authored-by: 9names <60134748+9names@users.noreply.github.com>
2021-11-08 23:23:28 +11:00
Jonathan Pallant (42 Technology) 8e66ddcfb1 Switch to new rp2040-boot2 crate. 2021-10-18 10:53:17 +01:00
Jan Niehusmann e63f1f6dee Make pio-proc a dev-dependency
It's only used in an example, so it doesn't need to be a regular
dependency.
2021-10-07 09:39:08 +11:00
9names ede25a4f15
Merge pull request #143 from mgottschlag/pio-rework
Rework the PIO API
2021-10-02 16:41:38 +10:00
Jan Niehusmann 2b6de3a3c9
implement embedded-hal 1.0.0-alpha.5 (#131)
* implement embedded-hal 1.0.0-alpha.5

* Depend on specific alpha version of embedded-hal.

* enable feature eh1_0_alpha for CI check
2021-10-02 15:36:40 +10:00
Mathias Gottschlag 684f483859 pio: Improve documentation and add an example that uses pio_proc::pio!(). 2021-09-28 21:48:05 +02:00
Rob Young d93c4fc4c8
Implement RngCore for RingOscillator (#135)
Implement rand_core::RngCore for RingOscillator from the get_random_bit
function. This is not suitable for security purposes so
rand_core::CryptoRng has not been implemented.
2021-09-26 20:51:01 +10:00
9names b0c15ccc77
Update changelog and bump verson for hal release 0.3.0 (#121)
* Update CHANGELOG.md and Cargo.toml for release 0.3.0

* Bump BSP hal dep version
2021-09-22 20:43:30 +10:00
Henrik Lievonen d941f5637b
PIO support (#74)
Initial implementation of PIO 

Add all of the infrastructure required to include PIO programs and interact with PIO peripheral registers.
This was a massive effort between @devsnek and @henkkuli. It's great that it's now ready to go.

Co-authored-by: Gus Caplan <me@gus.host>
2021-09-16 00:32:00 +10:00
Jonathan Nilsson 8a42d6cf8a
Update pac so we can use rt 0.7 (#107)
* Update pac so we can use rt 0.7

* Update pac in all board crates
2021-09-15 15:07:25 +10:00
Wilfried Chauveau db11231f49
Implement usb_device for rp2040 (#98)
Implement usb_device for rp2040

Limitations
- RP2040-E5 (Device enumeration workaround) is not implemented
- Suspend/resume is not implemented
- VBus detection is not tested and may not be fully implemented
2021-09-09 17:55:30 +10:00
Hmvp 216aad2c76 Update and move readmes
The READMEs that go to crates.io need to be in the crate dir
2021-08-26 00:18:55 +10:00
Hmvp d4ec87b2f7 Prepare for first release 2021-08-14 20:03:02 +10:00
Hmvp bcfbd72ed1 Update embedded time 2021-07-27 09:41:03 +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
Andrea Nall 17f8a5ab99
Add 'rt' feature (#53)
For the HAL, currently just passes the feature to the PAC.

Also pass the 'rt' feature through to the HAL for all the BSP crates.
2021-07-07 19:33:36 +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
9names 72127aa8e7
Remove duplicate entry in Cargo.toml
Remove accidental duplication of embedded-time dependency introduced when performing merge-conflict resolution
2021-05-05 12:48:40 +10:00
9names 31b0230da1
Merge branch 'main' into uart 2021-05-05 12:46:06 +10:00
9names 7588f76844
Merge branch 'main' into basic-gpio 2021-05-04 16:35:46 +10:00
Nic0w b9080d0a92 Working implementation of an UART HAL. 2021-04-25 10:51:46 +02: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
Nic0w d0d9291cde Working HAL for the XOSC 2021-04-24 13:38:17 +02:00
Jennifer Wilcox 45580ec4c8 Add basic output support for GPIOs 2021-04-17 18:22:15 -05:00
evan 98baabec93 Added skeleton for HAL and updated readme 2021-01-25 15:42:43 -05:00
evan 22a3669a9d Initial Commit: Updated author information. 2021-01-22 09:18:12 -05:00