Jonathan Pallant (Ferrous Systems)
69255f7b8c
Fix wfe/sev semantics.
...
We must sev on write, so the other core can wfe on read.
2021-11-25 15:14:03 +00:00
Jonathan Pallant (Ferrous Systems)
e9694bbb91
Use released 0.2.0 PAC.
2021-11-25 14:45:28 +00:00
Jonathan Pallant
ed860ed106
Merge pull request #208 from VictorKoenders/spinlock
...
Added spinlocks
2021-11-25 14:44:46 +00:00
Jonathan Pallant
968e49aa03
Merge pull request #198 from VictorKoenders/alarm
...
Added timer alarms
2021-11-25 14:33:06 +00: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
Victor Koenders
111b355da2
Fixed error in spinlock's documentation
2021-11-24 11:59:43 +01:00
Victor Koenders
88fbc38f8b
Added spinlocks
2021-11-24 08:19:42 +01:00
Victor Koenders
a9d96f352e
Removed incorret unsafe impl Sync, added interrupt_free around obtaining an alarm
2021-11-24 07:41:04 +01:00
Victor Koenders
1fd04d3384
Made the alarmX take exclusive ownership of Timer on functions that could cause UB when run in parallel
2021-11-24 07:41:03 +01:00
Victor Koenders
97a5bd355c
Added AlarmX::disable_interrupt, made AlarmX::schedule able to return an error if the time is too short
2021-11-24 07:41:00 +01:00
Victor Koenders
119c5a94e8
Added timer alarms
2021-11-24 07:40:56 +01:00
Jonathan 'theJPster' Pallant
4fb005f5b6
Merge pull request #199 from ithinuel/simplify-types
...
Bump to latest ws2812 driver's revision.
2021-11-22 07:56:21 +00:00
Damian J Pound
c7c5fb00d8
pio: Fix unsound Send clippy warning
2021-11-21 22:32:22 -06:00
Jan Niehusmann
3ab84702b7
Update comments
2021-11-21 13:16:03 +00:00
Jonathan 'theJPster' Pallant
8e07b2c8c2
Merge pull request #206 from rp-rs/pac_020_changes
...
PAC 0.2.0 changes
2021-11-20 14:19:43 +00:00
Jan Niehusmann
9a018ac359
Update uart implementation of embedded-hal 1.x to 1.0.0-alpha.6
2021-11-19 22:46:55 +00:00
Jan Niehusmann
1294f556e9
Update SPI implementation of embedded-hal 1.x to 1.0.0-alpha.6
2021-11-19 22:46:55 +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
0f3bb8e88c
Update I2C implementation of embedded-hal 1.x to 1.0.0-alpha.6
2021-11-19 21:41:45 +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
038f792e21
Apply clippy's suggestions.
2021-11-19 17:38:32 +00:00
Jonathan Pallant
68014469dd
Add SIO FIFO interface.
2021-11-19 17:19:04 +00:00
Jonathan Pallant
23bafb6980
Point at PAC release branch.
2021-11-19 12:22:52 +00:00
Jonathan Pallant
0a082c0f03
Changes to work with upcoming PAC 0.16.
2021-11-19 12:16:50 +00:00
Jonathan 'theJPster' Pallant
9d56062e44
Merge pull request #201 from rp-rs/rename-gpio23
...
GPIO23 actually controls the 'power save' function on the SMPS.
2021-11-16 23:04:08 +00:00
Jonathan Pallant
ffffa7368a
Set button as pull-up.
2021-11-16 22:47:30 +00:00
Jonathan Pallant
ac88d89939
Fix-up the examples and BSPs.
...
On the Pico Lipo GPIO23 is actually the boot mode select switch.
2021-11-16 22:46:35 +00:00
Jonathan Pallant
cc612b89fd
GPIO23 actually controls the 'power save' function on the SMPS.
...
If GPIO23 is low, the power supply is in low-power mode. But it
generates some noise. If GPIO23 is high, the power supply is less
efficient, but it generates less noise too.
2021-11-16 22:46:35 +00:00
Jonathan 'theJPster' Pallant
1541e0dfa4
Merge pull request #200 from rp-rs/pio_helpers
...
PIO helper functions
2021-11-16 22:45:20 +00:00
Jan Niehusmann
aafa3dd587
Keep old function as a deprecated alternative, for now
...
Mainly so i2c-pio-rs doesn't fail, as it is used by examples.
Should be removed once i2c-pio-rs is updated.
2021-11-16 22:27:08 +00:00
Jan Niehusmann
3756cd2fb5
Rename set_instruction to exec_instruction
2021-11-16 22:27:08 +00:00
Jonathan Pallant
b9497d9b82
Resolve review comments.
...
Adds same functions to RX FIFO.
2021-11-16 21:45:52 +00:00
Jonathan Pallant
5c1bcd2604
Adds some useful functions when using PIO FIFOs with DMA.
2021-11-16 19:18:32 +00:00
Wilfried Chauveau
4ccf71a6de
Bump to latest ws2812 driver's revision.
...
This change makes the ws2812 driver take ownership of the pin rather than
its id.
2021-11-15 23:21:30 +00:00
Damian Pound
3977bdd8c5
Add --locked to second cargo install elf2uf2-rs
2021-11-11 08:24:53 +11:00
contradict
f9b3d8341d
Document properties needed for PIO Send safety ( #190 )
...
Start to address #186 (Safety requirement must be verbosely advertised to not be overlooked in future changes).
#177 (Mark PIO StateMachine, Rx and Tx as Send) added the Send trait to StateMachine, Tx and Rx, That documentation was expanded as suggested.
PIO, UninitStateMachine, Interrupt were marked Send before #177 , added some documentation to those as well.
2021-11-10 21:55:37 +11:00
Wilfried Chauveau
c396423474
pin ws2812-pio to a specific sha ( #195 )
...
This will help future update of the driver without breaking rp-hal's main
branch.
2021-11-10 21:50:16 +11:00
Wilfried Chauveau
620d5f0e0c
Use the PIOn peripherals in pin functions rather than creating an enum. ( #193 )
...
This allows the `FuncionPio?` to be inferred from the `pac::PIO?` used.
This change shall be transparent for anyone using the `FunctionPio?` aliases.
2021-11-10 21:27:46 +11: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
Andrew Christiansen
612c44db46
Adafruit ItsyBitsy RP2040 Board Support Package ( #192 )
...
* Created an itsy bitsy rp2040 board support package adapted from the bsp of the qt py rp2040. Special thanks to ithinuel for help in matrix
* Changed the board description so it doesn't match the qt py rp2040
* Changed blinky.rs to itsy_bitsy_blinky.rs and ran changes through cargo fmt
2021-11-08 09:19:35 +11:00
Benno
6d917f498e
Change UART raw read return type and fix full read ( #189 )
...
* UART read_raw returns bytes read
This also fixed broken read_full_blocking code.
* chang documentation to reflect return value change
2021-11-01 10:24:24 +11:00
contradict
fb69308058
Add methods to set and clear the PWM Interrupt force register.
2021-10-30 20:40:33 +11:00
Jan Niehusmann
b1dc9aec8c
Fix UART init code
...
Set uartlcr_h before enabling the UART.
Writing uartlcr_h while the UART is enabled is forbidden by the datasheet.
Details can be found here:
https://developer.arm.com/documentation/ddi0183/g/programmers-model/register-descriptions/line-control-register--uartlcr-h?lang=en
(As referenced from the Datasheet)
2021-10-30 10:19:13 +11:00
Jan Niehusmann
73431a847b
fix UART rx ( #187 )
2021-10-30 10:16:43 +11:00
contradict
fe1e55b8c0
Mark PIO StateMachine, Rx and Tx as Send ( #177 )
...
* Mark PIO StateMachine, Rx and Tx as Send
* Improve comment grammar.
Co-authored-by: Wilfried Chauveau <wilfried.chauveau@ithinuel.me>
2021-10-27 21:34:08 +11:00
Wilfried Chauveau
73e2c6921f
Make ReadableOutput public to match the visibility of other Type-level variant of PinMode.
2021-10-27 21:32:38 +11:00
Jonathan 'theJPster' Pallant
3b019fb91d
Merge pull request #182 from jannic/issue-181
...
Correct limit for PIOBuilder::out_pins count argument
2021-10-25 13:17:05 +01:00
Jan Niehusmann
9f55608f92
Correct limit for PIOBuilder::out_pins count argument
...
This value is written to the PINCTRL register field
OUT_COUNT, which accoding to the data sheet has a valid range
of 0-32.
Fixes #181
2021-10-23 13:34:05 +00:00
contradict
11aaf9be79
API to enable/disable interrupts for each PWM channel. ( #175 )
...
* API to enable/disable interrupts for each PWM channel.
* Better name for overflow check.
2021-10-23 22:47:08 +11:00