Commit graph

96 commits

Author SHA1 Message Date
9names 0e1fe81384 Remove static BOOT2 decl in BSP examples so they build 2022-01-03 23:07:03 +11:00
David Sawatzke c02984b422 boards/pico: Remove mention of boot select button
The boot selector pin is attached to SPI_SS and not easily read (an
example
https://github.com/raspberrypi/pico-examples/blob/master/picoboard/button/button.c),
since the code reading needs to reside in sram.

Simply fix the documentation
2022-01-02 14:01:23 +11:00
Jonathan 'theJPster' Pallant 43650b3248
Merge pull request #248 from jannic/bump-versions
Bump versions of HAL and BSPs
2021-12-27 11:00:31 +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 7da16a726f Fixing typos spotted in the review. 2021-12-26 19:39:16 +00:00
Jonathan Pallant (Ferrous Systems) d3bd232885 Added two UART IRQ examples.
They are in the pico BSP as they need the 'rt' feature. Also includes
changes to the UART driver for enabling/disabling interrupts.
2021-12-26 19:33:23 +00:00
Victor Koenders 86444448a4
Migrated examples to the new uart system 2021-12-25 09:46:40 +01:00
Jonathan Pallant (Ferrous Systems) 6271e8670f rp-pico will be 0.2.0 as 0.1.0 exists already.
@jannic wrote 0.1 a long time ago, and agreed we could take over the
package name.
2021-12-23 11:51:02 +00:00
Jonathan Pallant (Ferrous Systems) 8f0a2788eb Renamed pico to rp-pico. 2021-12-23 11:18:52 +00:00
Jonathan Pallant 882868c104 Formatting 2021-12-20 21:29:18 +00:00
Jonathan Pallant 4959afe151 Include manufacturer in BSP crate name.
Avoids ambiguity.
2021-12-20 21:28:00 +00:00
Jonathan Pallant 37e7d2e7b6 Update all the BSPs.
Crate names now have hyphens, to match rp2040-hal.
Every BSP has its own CHANGELOG.
Embassy stuff is removed (it blocks publishing on crates.io)
2021-12-20 21:10:10 +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
camrbuss 546ad3799b pico bsp hal pac 2021-12-08 08:20:25 -05:00
camrbuss f2f50d0fc3 update pico rtic example to use timer alarm hal 2021-12-07 19:24:35 -05:00
Jonathan 'theJPster' Pallant 539f6db0f7
Merge pull request #231 from ithinuel/bump-embassy
Bump embassy's dependencies
2021-12-05 18:03:03 +00:00
Jonathan 'theJPster' Pallant b94a5ab885
Merge pull request #232 from jannic/refactor-uart-init
Refactor uart init
2021-12-05 18:02:44 +00:00
Jonathan 'theJPster' Pallant e64f307d47
Merge pull request #227 from 9names/reexport_mod_structs
Re-export mod structs to avoid repeating ourselves
2021-12-05 18:02:30 +00:00
Wilfried Chauveau fee8881801
bump embassy's dependencies 2021-12-05 12:39:25 +00:00
Wilfried Chauveau b363038477 Bump i2c_pio to an API with better inference. 2021-12-05 23:32:57 +11:00
9names 422da14e19
Merge branch 'main' into reexport_mod_structs 2021-12-05 01:04:08 +11: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 978f846805 Replace rp2040_hal::pio::PIOExt with bsp::hal::pio::PIOExt in BSPs 2021-12-04 23:53:00 +11:00
9names 6e184a91a7 Replace hal::timer::Timer with hal::Timer or Timer 2021-12-04 17:39:32 +11:00
9names def0ed97f7 Replace uses of hal::watchdog::Watchdog with hal::Watchdog 2021-12-04 17:30:47 +11:00
9names dc8ceffd09 Move uses of sio::Sio to Sio 2021-12-04 16:20:27 +11:00
9names 11aa0b87af Cargo fmt 2021-12-04 15:38:25 +11:00
Jan Niehusmann 26fa532fa3 Refactor Uart initialization 2021-12-03 21:24:50 +00:00
9names 33ff337631
Merge branch 'rp-rs:main' into reexport_mod_structs 2021-12-04 00:43:14 +11:00
Andrew Christiansen 92f7c68d57
BSP for the Adafruit KB2040 (#217)
* Created a BSP for the Adafruit KB2040
2021-12-04 00:12:01 +11:00
9names 55a8b4acf9 Re-export mod structs 2021-12-04 00:04:45 +11:00
Jan Niehusmann de53600199 pico_usb_serial: Handle errors of serial.write()
Fixes: #194
2021-11-29 00:05:03 +11: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
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
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
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 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
Wilfried Chauveau 46e580b852
Adds an example of using the PIO as I2C driver to control an LM75B temperature sensor (#180)
* Add pico_i2c_pio example

* Update pico_i2c_pio's main function documentation

* Update bootloader reference.

* Implement uart output for the pico_i2c_pio example.

* pin to a specific rev of i2c-pio

* Bump i2c-pio to get the fix for write_read
2021-10-23 22:45:13 +11:00
Jonathan Pallant (42 Technology) 8e66ddcfb1 Switch to new rp2040-boot2 crate. 2021-10-18 10:53:17 +01:00
Wilfried Chauveau c8609e9ef1 Update WS2812 usage after PIO api's breaking change. 2021-10-02 20:05:22 +10:00
Stephen Onnen 800f71a1b8 Implement QT Py BSP with example 2021-10-02 17:42:03 +10:00
9names 666b22f56b
Update example feather_neopixel_rainbow.rs with new Timer syntax (#148) 2021-10-02 16:03:36 +10:00
Jordan Williams 82dfd8e2cc Add an example using the Feather RP2040's onboard NeoPixel
This uses PIO just like the Pro Micro does.
2021-10-02 15:46:09 +10:00
Alexander Meißner 90470b6ff3
Adds reset for timer, otherwise it would not run. (#136) 2021-10-02 15:41:04 +10:00
Jonathan Pallant (42 Technology) fc0075a381 Addressing review comments. 2021-09-28 09:26:31 +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) c531eb976e Say nothing about the default input clock frequency - it's given! 2021-09-27 18:37:59 +01:00