Commit graph

745 commits

Author SHA1 Message Date
Jan Niehusmann 171335a534
Merge pull request #2 from rp-rs/fix-repo-link
Fix repository links in Cargo.toml of board crates
2022-12-11 11:43:44 +01:00
Jan Niehusmann 4edb185ce0 Fix repository links in Cargo.toml of board crates 2022-12-11 10:33:01 +00:00
Jan Niehusmann 7c928993e6 Fix another link to a board crate 2022-12-11 10:17:51 +00:00
Jan Niehusmann 44db867944
Merge pull request #1 from rp-rs/fix-links
Fix links to board crates
2022-12-11 11:07:29 +01:00
Jan Niehusmann 8c202ca325 Fix links to board crates 2022-12-11 09:57:50 +00:00
Jan Niehusmann 6db1f3f98a Update README 2022-12-10 13:52:58 +00:00
Jan Niehusmann 89d4083dca Move board crates to separate repository rp-hal-boards 2022-12-10 13:06:23 +00:00
Jan Niehusmann 06a6e18862
Merge pull request #514 from jannic/update-changelog
Update CHANGELOG.md
2022-12-10 12:26:34 +01:00
René van Dorst d7177345af
Add board waveshare-rp2040-lcd-0.96 (#513)
* Add board waveshare-rp2040-lcd-0.96

* Update product page links in readme
2022-12-10 13:10:08 +11:00
Jan Niehusmann b80833ad62 Update CHANGELOG.md 2022-12-09 21:11:23 +00:00
Murat Ursavaş dfc790b207
Fixed: First frame is getting lost on a USB-CDC device. (#510)
**Issue**

While using `usb_device` and `usbd_serial` crates with `rp2040_hal`, the first frame from the host device is always getting lost. Consecutive frames work just fine.

**Root Cause**
The `LENGTH_0` region of the `EP_BUFFER_CONTROL` register is always reset (0) while waiting for the first frame. After the first frame failure, the poll operation implicitly sets it  to the necessary value (`max_packet_size`) and this clears the problem for the rest of the app execution life time.

The main problem is while resetting and readjustment of the bits needs a step by step operation to avoid potential issues. While doing that and setting `AVAILABLE` bit, the wrong method had been chosen and was invalidating previous changes. Hence the `LENGTH_0` param is reset, too.

**Proposed Solution**
Instead of direct register `write` operation I've used `modify` to keep current bits in the register.

Co-authored-by: Murat Ursavas <mursavas@nebra.com>
2022-12-04 10:19:06 +11:00
Jan Niehusmann 2a5b0ce01e
Merge pull request #506 from jannic/issue-503
Use generic boot loader for arduino nano connect
2022-11-28 19:11:22 +01:00
Wilfried Chauveau 34124363eb
use i2c-pio's main branch (#491) 2022-11-28 18:09:34 +00:00
Wilfried Chauveau 119534d2da
usb: Read ints rather than sie_status in poll (#493)
If the latency is too high, there is a risk that the status reverts to a
previous state while keeping the interrupt flag up.
This fixes that by relying on ints instead of sie_status to process the
events.
2022-11-28 18:08:23 +00:00
Jan Niehusmann 1c6a816182 Use generic boot loader for arduino nano connect
Fixes #503
2022-11-28 11:31:12 +00:00
Jan Niehusmann 0055dbaf87
Fix some clippy warnings flagged by current beta (#505)
* Fix some clippy warnings flagged by current beta

(One warning was just silenced because I consider the current code more readable)

* cargo fmt
2022-11-25 17:08:20 +00:00
Jan Niehusmann d1377acc19
Update dependencies on defmt-rtt to 0.4.0 (#504)
Version 0.3.0 depends on deprecated critical-section 0.2
2022-11-25 09:05:04 +00:00
Jan Niehusmann 6fca82f810
Merge pull request #502 from jannic/remove-critical-section-0.2
Remove support for deprecated version 0.2 of critical-section
2022-11-23 11:05:25 +01:00
Jan Niehusmann e3a6612366 Remove support for deprecated version 0.2 of critical-section 2022-11-22 19:38:59 +00:00
Jan Niehusmann 4b2b33b950
Merge pull request #494 from jannic/pio-change-clkdiv
Allow setting clock divisors on running state machines
2022-11-17 09:35:39 +01:00
TilCreator c5309f6a86
Add board waveshare-rp2040-zero (#500) 2022-11-17 08:53:00 +11:00
Jan Niehusmann f00ea66ccd
Merge pull request #497 from jannic/dead-code-RpSpinlockCs
Avoid dead_code warning if critical-section-impl is not enabled
2022-11-13 11:12:25 +01:00
Jan Niehusmann 40f3f42c70
Merge pull request #496 from icedrocket/main
build: add docs.rs metadata
2022-11-12 18:09:23 +01:00
Jan Niehusmann c1988432c8 Avoid dead_code warning if critical-section-impl is not enabled
Also make Spinlock31 public if it's not used by the critical section impl
2022-11-12 14:17:45 +00:00
icedrocket 1b72a48870 build: add docs.rs metadata 2022-11-12 22:26:32 +09:00
Jan Niehusmann 3744a75ba3
Merge pull request #495 from jannic/minor-readme-update
Update rp2040-hal version in README.md
2022-11-12 14:15:26 +01:00
Jan Niehusmann caea9ecfd7 Update rp2040-hal version in README.md 2022-11-11 08:34:04 +00:00
Jan Niehusmann 2f077a434b Update doc comment of set_clock_divisor, clock_divisor_fixed_point 2022-11-10 21:17:48 +00:00
Jan Niehusmann 81da6f12fe Allow setting clock divisors on running state machines
The documentation of CLKDIV_RESTART contains the following sentence:

"Note also that CLKDIV_RESTART can be written to whilst the state
machine is running, and this is useful to resynchronise clock dividers
after the divisors (SMx_CLKDIV) have been changed on-the-fly."

This implies that it's allowed to change the value of CLKDIV on a
running state machine.
2022-11-09 15:34:44 +00:00
Jan Niehusmann 0ecf27450a
Merge pull request #484 from davidcole1340/program-wrap
Add ability to modify installed program wrap bounds
2022-11-07 20:34:35 +01:00
Jan Niehusmann f0d7cd998f
Merge pull request #473 from jannic/update-changelog
Update CHANGELOG
2022-11-02 00:13:00 +01:00
Jan Niehusmann e921ce06b4
Merge pull request #490 from jannic/pico_usb_serial_fmt_string
Extend pico_usb_serial example with some string formatting
2022-11-02 00:12:02 +01:00
Jan Niehusmann 4c6600e036 Extend pico_usb_serial example with some string formatting 2022-10-30 17:24:08 +00:00
Jan Niehusmann 5ae1f90939
Merge pull request #488 from ptpaterson/eh1_0_alpha-spi
implement embedded-hal aplha SPI traits
2022-10-30 13:47:11 +01:00
9names 9bc48de974
Merge pull request #486 from 9names/error_add_debug_traits
Add derive(Debug) and derive(defmt::Format) to error types.

pll and xosc Error types didn't implement Debug, which made them annoying to work with.
And only a few of our Error types implemented derive(defmt::Format).
I added both to all the errors I could find to make things a little more consistent.
2022-10-29 08:31:02 +11:00
Jan Niehusmann f2d9fff0e2
Specify required feature critical-section-impl for some examples (#487) 2022-10-28 22:15:32 +01:00
Paul Paterson 98daa7a25d implement embedded-hal aplha SPI traits 2022-10-28 13:21:55 -04:00
Jan Niehusmann e60a979eda
Merge pull request #483 from zachs18/patch-1
Remove unnecessary `mut` from `static mut LOCK_OWNER: AtomicU8` in critical section impl.
2022-10-28 18:27:24 +02:00
Jan Niehusmann 4ca2dcfd20
Update rp2040-hal/CHANGELOG.md
Co-authored-by: 9names <60134748+9names@users.noreply.github.com>
2022-10-28 18:26:13 +02:00
9names 219d393085 Add derive(Debug) and derive(defmt::Format) to error types 2022-10-27 19:17:03 +11:00
David Cole 3c06a3359e do not include offset when checking wrap bounds 2022-10-27 12:57:35 +13:00
David Cole 1ba07b09e7 Add ability to modify installed program wrap bounds
The wrap source and target cannot change after installing the program
into the PIO at present, even though this is possible with the C/C++
HAL. This is useful when using the same program across multiple state
machines that have different wrap sources and targets.
2022-10-26 21:03:58 +13:00
Jan Niehusmann 8e79f438ba
Merge pull request #467 from jannic/fix-466
Use InstalledProgram::share() in examples/pio_synchronized.rs
2022-10-25 23:34:36 +02:00
zachs18 2b8dda74aa
Remove unnecessary mut from static mut LOCK_OWNER: AtomicU8 in critical section impl.
`LOCK_OWNER` is only accessed using the atomic APIs, which take `&self`, so it does not need to be `static mut`, `static` is fine.

(I haven't seen any miscompilations of this, but I'm unsure if Rust is allowed to assume `static mut`s are not aliased and apply optimizations based on that. If so, this would prevent that.)
2022-10-25 13:16:03 -05:00
Jan Niehusmann 3a0b33cfc8
Merge pull request #479 from tweksteen/bump_version_doc
Bump rp-pico version in README.md
2022-10-24 22:38:37 +02:00
Thiébaud Weksteen 578657a829 Bump rp-pico version in README.md 2022-10-21 15:11:14 +11:00
Jan Niehusmann 2fb3e2a7e9
Merge pull request #474 from jannic/update-pac
Update dependency on rp2040-pac to 0.4.0
2022-10-19 09:51:36 +02:00
Jan Niehusmann 018965d015 Update dependency on rp2040-pac to 0.4.0 2022-10-18 20:11:24 +00:00
Jan Niehusmann 95598ad199 Update CHANGELOG 2022-10-18 20:06:19 +00:00
Jan Niehusmann 2b941db745
Merge pull request #472 from Sizurka/uart-rx-discard
Fix UART read error discard data
2022-10-17 08:56:57 +02:00