Commit graph

650 commits

Author SHA1 Message Date
Wilfried Chauveau 4dbd5667a6
Use TimerInstant in Timer::GetCounter & add Alarm::schedule_at (#439) 2022-08-31 06:54:57 +01:00
Wilfried Chauveau f30df4a0c7
doc: Fix the link under the logo in rp2040-hal's readme (#438) 2022-08-26 12:15:24 +01:00
Wilfried Chauveau 4ead633042
Revert "Make Pimoroni Badger 2040's crate name consistent with it's directory (#435)" (#437)
This reverts commit 1de8f9016d.
2022-08-26 12:15:17 +01:00
Wilfried Chauveau 685634e85b
Remove registry patches for i2c and ws2812-pio now that they are published (#436) 2022-08-26 10:49:51 +01:00
Wilfried Chauveau 1de8f9016d
Make Pimoroni Badger 2040's crate name consistent with it's directory (#435) 2022-08-26 10:49:43 +01:00
Wilfried Chauveau 8d52f37dd1
Prepare for HAL 0.6.0 release (#430)
* Prep for HAL 0.6.0 release

* Update changelog, readme and version number for HAL 0.5.0 release
* Bump HAL version in BSP deps
* Add the missing boards to the main README.md
2022-08-26 10:05:56 +01:00
Wilfried Chauveau 13cad64c29
remove unused dependencies & add GHA flow (#429) 2022-08-26 03:42:33 +01:00
Wilfried Chauveau 3261eccd4d
Fix interpolator example post migration to fugit (#434) 2022-08-26 02:32:24 +01:00
Wilfried Chauveau dbc691fb09
Temporary disable sticky-bit in set_pins too (#433) 2022-08-25 18:19:01 +01:00
Kasil 31469c232f
Add support for the Interpolator (#371)
* Implementation of the interpolator.
* corrected formatting
* fixed documentation code
* add clamp flag to LaneCtrl
* addition of an example for the interpolator
* put documentation behind ///
* rewording comment for clarity
* using more idiomatic fn new
2022-08-25 18:02:56 +01:00
Jan Niehusmann 00f5e8d184
Merge pull request #432 from jannic/fix-set_pindirs
Temporarily disable out_sticky in set_pindirs
2022-08-25 12:02:55 +02:00
Jan Niehusmann 6b0ea14ec1 Temporarily disable out_sticky in set_pindirs
Otherwise, it will change unrelated pindirs as well, if sticky is set
2022-08-25 07:49:59 +00:00
Wilfried Chauveau 47d8f4fc21
Add Debug and defmt::Format to the public types of rp2040_hal::gpio::dynpin (#431) 2022-08-25 05:54:26 +01:00
Wilfried Chauveau cd9570e7c4 The patches to -pio need to be commented out before release.
This will require an extra step before release but can be packed with
the usual version bump.
This helps making sure CI passes before merging.
2022-08-24 22:46:34 +01:00
Wilfried Chauveau bf66ae9a58 Bump -pio dependencies 2022-08-24 22:46:34 +01:00
Wilfried Chauveau e5eda48891 bump pio version on boards still using pio 0.1.0 2022-08-24 22:46:34 +01:00
Wilfried Chauveau 93ec18be07 migrate rp2040-hal from embedded_time to fugit 2022-08-24 22:46:34 +01:00
Wilfried Chauveau 6a29b3bb73 Make the i2c error render as text if eh1_0_alpha is on. 2022-08-24 18:23:16 +01:00
Jan Niehusmann 6ef6838132
Merge pull request #428 from jannic/fix-embedded-sdmmc-2
Minimal fix for embedded-sdmmc build failure
2022-08-23 09:41:04 +02:00
Jan Niehusmann d5331d1ac7 Minimal fix for embedded-sdmmc build failure
Just pin the git dependency on the most recent working version
2022-08-23 07:28:28 +00:00
Wilfried Chauveau 42e929d7e1
Use rp2040-hal in all example (possibly through their bsp) (#423)
* Use rp2040-hal in all example (possibly through their bsp)

Some of the examples were using the cortex_m_rt::entry method which
misses the device specific spinlock re-initialisation.

This commits makes the usage more consistent by using rp2040_hal exported
macro as the only `entry` method used across examples.
2022-08-21 19:01:45 +01:00
Wilfried Chauveau 51db37a4cb
replace cortex_m::interrupt::Mutex with critical_section::Mutex in examples (#422) 2022-08-21 19:00:57 +01:00
Jan Niehusmann 735597b145
Merge pull request #425 from camrbuss/clocks_extended_doc
Fix clocks docs "extended usage" to match `init_clocks_and_plls`
2022-08-21 11:27:01 +02:00
camrbuss fea35b48bb doc: fix clocks extended usage xosc order 2022-08-21 02:51:53 -04:00
Jan Niehusmann f8bf06cb7f
Merge pull request #421 from jannic/issue-420
Enable rp2040-hal/defmt feature in dev-dependencies
2022-08-19 00:03:47 +02:00
Jan Niehusmann 68eb48be44 Enable rp2040-hal/defmt feature in dev-dependencies
This is a little bit hacky, as it relies on rp2040-hal actually
using (and therefore linking) some defmt code when the defmt feature is
enabled.

However this solution has the advantage that it only affects
dev-dependencies and therefore has no impact on the board crates
themselves.

Closes #420
2022-08-18 16:05:10 +00:00
Jan Niehusmann ead6c26eee
Merge pull request #414 from jannic/critical-section-1.0.0
Upgrade to critical-section 1.0.0
2022-08-18 17:23:16 +02:00
Jan Niehusmann c1c5e05989 Feature-gate critical-section-impl
For compatibility with earlier versions, this feature is activated by
default. This decision can be revisited later.
2022-08-18 06:35:04 +00:00
Jan Niehusmann b4d0d613e3 Update to critical-section 1.0.0 2022-08-18 06:34:28 +00:00
Wilfried Chauveau 7bfab4ffd2
Implements USB enumeration workaround (RP2040-E5). (#120)
* Implement rp2040-E5 workaround for usb enumeration.

* Expand documentation and add to pico_usb_serial & pico_usb_twitchy_mouse

* Fix errata-5 documentation around the bus-keep state.

* Update CHANGELOG.md
2022-08-17 22:22:36 +01:00
Wilfried Chauveau 9792408902
Merge pull request #418 from ithinuel/give-names-to-gha-steps
Add meaningful names to steps and remove quasi-repetition
2022-08-17 19:35:49 +01:00
Wilfried Chauveau 082281b10b
Use matrix in GHA workflow to reduce duplication 2022-08-13 17:22:04 +01:00
Jan Niehusmann 7e178acde5
Merge pull request #419 from alxpettit/patch-1
Fix typo
2022-08-13 07:16:06 +02:00
Alexandria 26356428bf
Update pico_usb_twitchy_mouse.rs
typo
2022-08-12 16:08:46 -07:00
Wilfried Chauveau f10c73f4fa
Add meaningful names to steps and remove quasi-repetition
The workflow only shows "Runs action-rs/cargo@v1" which does not tell us
much about what's actually being done.
The list and clean up done after each build varies by only the debug/release
part of the path that is repeated several times (2).

This commit gives each step a more meaningful name and simplify the list &
cleanup step with a generic one liner that can be copy/pasted without
modification.
2022-08-12 12:50:07 +01:00
Jan Niehusmann fbba3755ff
Merge pull request #417 from jannic/clippy
Fix clippy warnings
2022-08-12 00:22:27 +02:00
Jan Niehusmann c1df2bea2b Fix clippy warnings
Fixes a few instances of derive-partial-eq-without-eq and needless-borrow
clippy warnings.
2022-08-11 21:45:26 +00:00
Jan Niehusmann 96e15ee6de
Merge pull request #415 from jannic/features-vector_table
Enable feature "rt" when compiling vector_table example
2022-08-11 19:21:07 +02:00
Jan Niehusmann e9a720ffab
Merge pull request #416 from jannic/generic-boot-loader
Use generic boot loader for rp2040-hal examples
2022-08-11 19:20:43 +02:00
Jan Niehusmann 0f33d2b8a6 Enable feature "rt" when compiling vector_table example
Without this change, building the vector_table example fails when
building from the rp2040-hal directory:

```
rp2040-hal$ cargo build --release --example vector_table
   Compiling rp2040-hal v0.5.0 (rp2040-hal)
error[E0432]: unresolved import `pac::interrupt`
  --> rp2040-hal/examples/vector_table.rs:30:5
   |
30 | use pac::interrupt;
   |     ^^^^^---------
   |     |    |
   |     |    help: a similar name exists in the module (notice the capitalization): `Interrupt`
   |     no `interrupt` in the root

error: cannot determine resolution for the attribute macro `interrupt`
   --> rp2040-hal/examples/vector_table.rs:148:3
    |
148 | #[interrupt]
    |   ^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports
```
2022-08-11 12:09:20 +00:00
Jan Niehusmann d4743061fa Use generic boot loader for rp2040-hal examples
Those examples should be independent of a specific board.
The generic boot loader increases their compatibility.
2022-08-11 11:56:41 +00:00
9names 2bbc52ffce
RAM-based interrupt vector tables (#321)
* Add struct VectorTable to represent an interrupt vector table

* Add member function to VectorTable to initialise based on the current Interrupt Vector Table from VTOR

* Add member function to VectorTable to register an extern "C" function to call on interrupt

* Add example using VectorTable to demonstrate initialisation and interrupt function registration
2022-08-06 14:58:43 +10:00
Jan Niehusmann 575aba4bfe
Merge pull request #408 from jannic/wfi
Use wfi in otherwise empty infinite loops in examples
2022-08-04 16:49:06 +02:00
Jan Niehusmann 62f1ab2159
Merge pull request #411 from jannic/fix-usb-sie_status
Fix clearing usb sie_status flags
2022-08-03 10:20:08 +02:00
Jan Niehusmann b636afb7b5 Clear sie_status.suspended / sie_status.resume flags in poll()
usb_device ignores PollResult::Suspend when already suspended,
and PollResult::Resume when not suspended.

This may lead to repeatedly triggered interrupts if for some reason
the Suspend flag gets set while the device is already suspended.

I observed such a situation when a reset was triggered while the device
was suspended.

To make sure that this can't cause interrupt storms, clear the flags
before returning from poll()
2022-08-02 22:17:54 +00:00
Jan Niehusmann 786062aa74 To clear a bit in sie_status, just write that single bit 2022-08-02 22:11:14 +00:00
Jan Niehusmann 5448a12b31
Merge pull request #398 from jannic/defmt-0.3
Update examples to defmt 0.3
2022-08-02 22:00:11 +02:00
Jan Niehusmann fb9bac5064
Merge pull request #410 from ithinuel/bump-usb-device-to-0-2-9
bump usb-device to 0.2.9
2022-08-02 21:58:17 +02:00
Jan Niehusmann 1be329a907
Merge pull request #407 from FlorianUekermann/main
Implement NonPwmPinMode for gpio::Disabled
2022-08-02 21:46:18 +02:00
Wilfried Chauveau 60677df099
bump usb-device to 0.2.9 2022-08-02 20:43:00 +01:00