Commit graph

542 commits

Author SHA1 Message Date
paddywwoof f8720fcbd2
Port HD44780 display example from rp2040-hal to rp-pico (#347) 2022-05-31 23:08:02 +10:00
Jacob Vanderkarr 882db12855
Add BSP for Arduino RP2040 Nano Connect (#345)
* Modifies:
* Cargo toml to include arduino_nano_connect package
* README to update documentation to reflect a board being added

Adds:
* Basic support package for Arduino's RP2040 Nano Connect board
* blinky example

Co-authored-by: splicedbread <jacob.vanderkarr@oit.edu>
Co-authored-by: 9names <60134748+9names@users.noreply.github.com>
2022-05-29 08:42:05 +10:00
luca zulian 3842ef2700
Add Pico PWM micro servo example (#346)
* Add micro servo with pwm working example

Signed-off-by: lucazulian <lucagiuggia@gmail.com>

* Add duty value suggestion

Signed-off-by: lucazulian <lucagiuggia@gmail.com>

* Fix code formatting

* Use CountDown instead of Delay
2022-05-26 22:25:49 +10:00
Christian Maniewski 99b8845d74
Add missing GPIO I2C trait implmentations (#344) 2022-05-25 09:03:29 +10:00
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
Wilfried Chauveau 38692dfcb9
Add defmt feature (as optional dep) and allow i2c::Error to be formatted (#328) 2022-05-09 19:22:41 +10:00
TyPott cd692427f6
Initial BSP for SparkFun Thing Plus RP2040 (#336) 2022-05-09 19:19:20 +10:00
Evan Older f4abf18be5
Merge branch 'main' into main 2022-05-08 13:31:54 -04:00
Daniel Bevenius 89371912ad Fix typo in rp2040-hal README.md 2022-04-30 12:52:19 +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
Wilfried Chauveau 977bc2732a Remove unmaintained implementation async i2c. 2022-04-30 11:46:30 +10:00
9names e9a4f7e40b Update rtic example to reset spinlocks in init 2022-04-30 11:33:22 +10:00
9names 3d8f66df78 Provide an unsafe function for resetting all spinlocks 2022-04-30 11:33:22 +10:00
9names ed0cda5269
Merge pull request #299 from Sizurka/divider-global-asm
Use optimized assembly for hardware division
2022-04-30 11:31:41 +10:00
Derek Hageman f9d2610fff Use direct assembler calls for the divider
Convert the hardware divider to optimized assembler.
2022-04-12 10:17:44 -06:00
Derek Hageman a15c109e8d Change hardware divider results structure order
Putting the quotient first makes the compiler emit slightly better
code by putting the quotient in r0 which is generally what the
intrinsics want.
2022-04-12 08:50:56 -06:00
Derek Hageman b8ef969d92 Generate intrinsic aliases directly
Using the full module structure generated by the intrinsics macro
interacts oddly with inlining on some optimization levels, causing
a duplicate identical function body to be generated.  This doesn't
affect performance, but it wastes space, so just declare the alias
directly which seems to cause the symbol to be aliased as it should
be.
2022-04-12 08:50:56 -06:00
Jan Niehusmann f67b650bb3
Remove some unused fields from UartPeripheral and Reader (#315)
* Remove unused field `effective_baudrate` from uart code

* Remove unused field `config` from uart code
2022-03-18 20:57:45 +11:00
Marius Meißner 990085948a
Using thread send safe UART* marker, as suggested by @danielzfranklin in #Issue-284 (#314) 2022-03-18 20:56:27 +11:00
Jan Niehusmann 6026ea4ae3
Allow to start multiple state machines in sync (#301)
* add example of synchronized PIOs

* Synchronize state machines using WAIT IRQ instruction

* Use "irq wait 0" instead of "wait 1 irq 0"

This way, the initial value of the interrupt flag doesn't matter

* Start state machines synchronized without IRQ WAIT instruction

* Improve API

Co-authored-by: Andrew Straw <strawman@astraw.com>
2022-03-18 20:55:31 +11:00
Jan Niehusmann f8de8755cc
Add an rp2040 specific #[entry] macro. (#300)
* Add an rp2040 specific #[entry] macro.

This macro extends the one from cortex-m-rt by code to unlock
all spinlocks on boot.

* Idiomatic pointer arithmetic

Apply suggestion by @9names, improving address calculations.
(This doesn't change the generated code at opt levels 2 or "z".)

Co-authored-by: 9names <60134748+9names@users.noreply.github.com>
2022-03-13 12:35:59 +11: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
9names a40bcc94ea
Add changes since 0.3.0 to changelog (#295) 2022-03-03 14:34:51 +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
9names 111654fc28
Merge pull request #291 from jannic/avoid-64bit-division
Avoid 64bit division
2022-02-27 10:42:56 +11:00
Jan Niehusmann 021e942e47 Fix clippy warnings 2022-02-27 09:29:54 +11:00
Jan Niehusmann 00b49d52b5 Actually run fractional_div test case from CI 2022-02-26 13:33:58 +00:00
Jan Niehusmann b46ddd7351 Add test cases for fractional_div() 2022-02-26 13:33:58 +00:00
Jan Niehusmann fecde70cf9 Derive several traits for ClockError 2022-02-26 13:33:58 +00:00
Jan Niehusmann 402b7f1eb8 Use u32 instead of u64 division in clock calculations
This saves about 1kB of flash by removing
compiler_builtins::int::specialized_div_rem::u64_div_rem if
no other code uses u64 divisions.
2022-02-26 13:33:58 +00:00
Jan Niehusmann 7750781650
Implement embedded-hal 1.0.0-alpha.7 traits (#298)
* embedded-hal v1.0.0-alpha.7 removed several traits

* bump dependency to embedded-hal 1.0.0-alpha.7

* Mention embedded-hal alpha changes in changelog
2022-02-26 21:06:55 +11:00
Emil Fresk b7e56d0869 Added so stopped PIO state machines can change their clock divider 2022-02-26 20:57:12 +11:00
Jonathan 'theJPster' Pallant 212ffec6ca
Merge pull request #294 from 9names/gpio_irq_example
Add GPIO interrupt example
2022-02-21 18:10:27 +00:00
9names 4075f81b2d
Merge pull request #272 from 9names/watchdog_fix
Set hw reset bits for watchdog
2022-02-20 16:46:12 +11:00
9names 8063882801
Add note about #[interrupt] mut -> &mut transform
Co-authored-by: Jan Niehusmann <github@gondor.com>
2022-02-16 22:48:52 +11:00
9names 35875c8756 Store pins together in a tuple to reduce boilerplate 2022-02-15 20:17:18 +11:00
9names 44a9b0f541 Add GPIO interrupt example 2022-02-14 22:47:46 +11:00
9names 78cad0df97
Merge pull request #290 from PavanKumarPothula/main
Just a typo in the hyperlink. Nothing much.
2022-02-13 13:37:43 +11:00
9names fff980611a
Merge pull request #289 from astraw/fix-typo
fix typo
2022-02-13 13:37:12 +11:00
9names f46c23d3b7
Merge pull request #288 from Sizurka/rom-intrinsics
Connect Bootrom Instrinsics
2022-02-13 13:36:39 +11:00
Derek Hageman 80c84b13ba Add ROM floating point math library
Hook up the ROM functions to floating point intrinsics.
2022-02-12 11:56:24 -07:00
Derek Hageman ce681b4f10 Move divider intrinsics to the new intrinsics macro 2022-02-12 11:56:24 -07:00
Derek Hageman a70eb89799 Add basic ROM intrinsics
Add a standardized macro for intrinsics export and connect the simple
ROM functions to intrinsics.
2022-02-12 11:56:24 -07:00