Commit graph

182 commits

Author SHA1 Message Date
Paul Daniel Faria a4b04862ae
Add missing copi pin for sparkfun-pro-micro-2040 (#341) 2022-05-20 15:31:05 +10:00
Jan Niehusmann db1b5d36b5 Set device_class of twitchy_mouse example to 0
This fixes the mouse on Mac.

Closes #327
2022-05-16 22:32:08 +10:00
TyPott 27509090bf
Fix typo in License section of READMEs (#338) 2022-05-13 17:00:26 +10:00
Jordan Williams cf86e08749
Add the Pimoroni Plasma 2040 board (#337)
* Add the Pimoroni Plasma 2040 board

This PR adds the board support package and a simple example.
The example just blinks the on-board RGB LED.

An example should be added for using the board to control an LED strip.
This should probably use smart-leds with the associated PIO driver.

An example or functionality should be added for the current sensor.

* Rename LED data line from dat to data to match schematic

* Add an example for driving WS2812 LEDs

This is pretty much a copy-paste of the awesome pico_ws2812_led example.

* Remove reference in README to rp-pico

* Remove reference to pico board clock speed

I have removed this in the Plasma 2040 repository and where I copied it from, tiny2040_blinky.

* Remove redundant namespace

* Add self-reference in README to the current board's GitHub README

Fix the erroneous link in the pimoroni-tiny2040 README from which I copied.
2022-05-12 11:17:11 +10:00
TyPott cd692427f6
Initial BSP for SparkFun Thing Plus RP2040 (#336) 2022-05-09 19:19:20 +10:00
mqy 623457a498 fixed typos 2022-04-30 12:51:45 +10:00
Jan Niehusmann 5f793cde69 Add adafruit-macropad_blinky example
Also adds const XOSC_CRYSTAL_FREQ = 12_000_000, which is the right
value according to https://learn.adafruit.com/assets/103270

Fixes #302
2022-04-30 12:27:48 +10:00
Wilfried Chauveau bb07402fc9 Abstract alarms 2022-04-30 11:54:54 +10:00
9names e9a4f7e40b Update rtic example to reset spinlocks in init 2022-04-30 11:33:22 +10:00
9names 12cbab967c Update all BSP examples to use the BSP's re-exported entry macro 2022-04-10 21:54:56 +10:00
9names f38847a318 Update BSPs to use rp2040_hal::entry instead of cortex_m_rt::entry 2022-04-10 21:43:15 +10:00
9names 7aefb8680d
Update BSPs prior to release (#313)
* Update BSP authors to include 'rp-rs developers'

* Update BSP readme's to reflect current release version

* Update BSP changelogs

* Fix version number in HAL README
2022-03-12 22:43:16 +11:00
9names b81955c2a8
Prep for 0.4.0 release (#312)
* Update changelog for 0.4.0 release

* Enable rt feature for irq example in Cargo.toml

* Bump pio/pio-proc deps to 0.2.0, update pio examples

* Update BSPs to latest ws2812-pio, remove unused pio dep

* Fix usage of pio_proc in doc comment

* Clean up pio doc-example

* Update rp-pico to latest i2c-pio

Co-authored-by: Jan Niehusmann <jan@gondor.com>
2022-03-11 22:37:34 +11:00
Eivind Alexander Bergem da2372b19c Fixed broken link in rp-pico Cargo.toml 2022-03-04 21:27:43 +11:00
Mike Bell 70be6ac766
Add Tiny2040 board support (#305)
* Add Tiny2040 board support

* Remove unnecessary dev-dependencies

* Remove unnecessary dependencies
2022-03-01 07:21:52 +11:00
Jonathan 'theJPster' Pallant 8bdecd2058
Merge pull request #283 from Sizurka/rom-functions
Improve ROM function access
2022-02-04 09:53:59 +00:00
Derek Hageman a6daaf9fa3 Standardize ROM function access
Make all ROM functions (normal and floating point) provide both a direct
call that does the operation and a module with a ptr() function to get
the function pointer.
2022-02-03 13:32:18 -07:00
9names f51a84f070 Use new alarm syntax in pico_rtic example 2022-01-30 23:04:16 +11:00
9names 8b7b0b168b Make boot2 optional 2022-01-20 20:14:09 +11:00
9names 332fe645a8 Add boot2 feature to kb2040 BSP 2022-01-20 20:03:33 +11:00
Dylan Ede 6478917e51 Board support for Adafruit Trinkey QT2040 2022-01-15 15:49:52 +00:00
Jonathan 'theJPster' Pallant ce7c9f4be3
Merge pull request #264 from WeirdConstructor/pico_i2c_oled_text_display_ssd1306_example
Pico i2c oled text display ssd1306 example
2022-01-12 22:03:58 +00:00
Weird Constructor 3f9535cc1f Cleaned up the code and made it more idiomatic. 2022-01-12 21:48:22 +01:00
Jonathan 'theJPster' Pallant f7b8abfeb0
Merge pull request #259 from WeirdConstructor/pico_board_documentation
Added pin function documentation from the datasheet to rp-pico
2022-01-12 20:05:11 +00:00
Weird Constructor e22540be20 Mention the assumed display size of 128x64. 2022-01-12 19:28:51 +01:00
Weird Constructor 2f1e77d0b2 Added documentation for the OLED example and fixed formatting. 2022-01-12 19:25:06 +01:00
Weird Constructor 2f418bbf8f Add an example for using the SSD1306 I2C display driver crate with the Raspberry Pi Pico 2022-01-12 19:25:06 +01:00
Jonathan 'theJPster' Pallant 0cb171ffc8
Merge pull request #261 from jkristell/solderparty-stamp
Add Solder Party RP2040 Stamp board
2022-01-11 20:58:02 +00:00
Weird Constructor 0b31054429 Formatted the tables in the comments properly. 2022-01-09 22:14:34 +01:00
Weird Constructor 5b07c09cfb Removed weird rom function usage, reformulated comments and cleaned up hsv2rgb() code. 2022-01-09 22:02:31 +01:00
Johan 21a4fde0c8 Add Solder Party RP2040 Stamp board 2022-01-09 21:52:45 +01:00
Weird Constructor 2b49bc6b60 Add Raspberry Pi Pico WS2812 LED example 2022-01-09 15:27:29 +01:00
Weird Constructor adfe63f0df Improved the rp_pico pin documentation with aliases, table and cross links. 2022-01-09 15:09:57 +01:00
Weird Constructor 0e3136da11
Add an example for accessing an SD/MMC card via SPI (#258) 2022-01-10 00:16:35 +11:00
Weird Constructor f4a4b80459 remove trailing spaces 2022-01-09 13:31:10 +01:00
Weird Constructor 160099b6d8 Added pin function documentation from the datasheet to rp-pico 2022-01-09 13:24:00 +01:00
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
Jonathan Pallant (42 Technology) 29dd755b30 Ensure the bootloader static gets documented. 2021-09-27 17:30:50 +01:00
Jan Niehusmann 389e0ea715 fix pico_usb_twitchy_mouse with usbd-hid >= 0.5.1
usbd-hid 0.5.1 contained an accidental semver breaking change

fix example accordingly
2021-09-25 20:33:31 +10:00
MGlolenstine 87b29bf9f4 Fixed a formatting typo 2021-09-25 00:53:30 +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
Jonathan Pallant (42 Technology) cbff22b911 Fix the pico lipo example. 2021-09-21 16:38:03 +01:00
Jonathan Pallant (42 Technology) 1e6d14abb0 Correct typo. 2021-09-21 16:18:19 +01:00
Jonathan Pallant (42 Technology) 43a22e6e42 Add Feather RP2040 README 2021-09-21 16:17:51 +01:00
Jonathan Pallant (42 Technology) 34687a2ebe Add Adafruit Macropad README 2021-09-21 16:17:35 +01:00
Jonathan Pallant (42 Technology) efe32e627f Add Pico Explorer README 2021-09-21 16:17:24 +01:00
Jonathan Pallant (42 Technology) bc68ee32fb Add Pimoroni Pico Lipo README and example. 2021-09-21 16:17:14 +01:00
Jonathan Pallant (42 Technology) f0fc4ed3ad Typo in comments. 2021-09-21 12:43:16 +01:00
Jonathan Pallant (42 Technology) 25d87b838b Good ol' clippy. 2021-09-21 12:42:34 +01:00
Jonathan Pallant (42 Technology) b89e728e9c Polishing the USB interrupt examples.
Answers on a postcard please on how to avoid `static mut` when you have
lazy initialization, and static objects holding references to other
static objects.
2021-09-21 12:37:44 +01:00
Jonathan Pallant (42 Technology) ba6c409f21 Update non-IRQ USB example. 2021-09-21 10:54:13 +01:00