74 Commits

Author SHA1 Message Date
Scott Mabin
ec8308058b
Riscv stable CI (#1491)
* Remove interrupt and thread executor embassy features

* Reserve sw interrupt 3 (4) instead of 0 for multicore systems with the embassy feature enabled

* Add thread mode context id and fix up examples

* Use stable rust for riscv CI

* Add binary-logs feature to 8021504 driver

* Add binary-logs feature to 8021504 driver
2024-05-22 16:36:39 +00:00
Juraj Sadel
76ed67ad35
ESP32-S2: Add SPI Slave support (#1562)
* SPI Slave for ESP32 / ESP32-S2

* CHANGELOG.md

* Clippy...

* Revert ESP32 changes and keep ESP32-S2 only

* changelog

* review comments

---------

Co-authored-by: bjoernQ <bjoern.quentin@mobile-j.de>
2024-05-22 13:21:22 +00:00
Juraj Sadel
60d39e9f33
GPIO: Use Level enum instead of plain bool in constructors (#1574)
* GPIO: Use Level enum instead of plain bool in constructors

* changelog
2024-05-22 12:37:03 +00:00
Björn Quentin
ef290a9a78
Remove pin generics from PARL_IO (#1545)
* Remove pin generics from PARL_IO

* CHANGELOG.md

* Fixes after rebase
2024-05-17 14:54:48 +00:00
Björn Quentin
9edd098da5
De-duplicate DMA transfer implementations (#1550)
* De-duplicate DMA transfer implementations

* CHANGELOG.md

* Renaming

* Fix

* Get rid of the lambda

* Clippy
2024-05-15 16:42:35 +00:00
Jesse Braham
8a1df42309
Add the esp-ieee802154 package to the repository (#1554)
* Add the `esp-ieee802154` package to the repo

* Add examples for `esp-ieee802154` package
2024-05-15 15:22:27 +00:00
Björn Quentin
2faa2654cb
GPIO Refactoring (#1542)
* GPIO Refactoring

* CHANGELOG.md

* Addressed review comments

* Use `Level` instead of plain bool in public API

* Let drivers enable analog functions
2024-05-15 08:49:33 +00:00
Scott Mabin
f32565b4af
Embassy enable thread and interrupt by default, enable embassy when building docs (#1485)
* Remove interrupt and thread executor embassy features

* Reserve sw interrupt 3 (4) instead of 0 for multicore systems with the embassy feature enabled

* Remove uneeded #[feature()] from examples

* Fix HIL tests

* Add thread mode context id and fix up examples

* improve embassy module docs

* changelog

* fixup hil tests

* Fixup usb examples
2024-05-02 15:58:04 +00:00
Jesse Braham
68a4fb29ed
[1/3] Timer abstraction: refactor systimer and timer modules into a common timer module (#1527)
* Refactor `systimer` and `timer` modules into a common `timer` module

* Update `CHANGELOG.md`

* Rebase and update new example
2024-05-02 13:27:33 +00:00
Dániel Buga
fd1c7b4fc7
embassy-usb support (#1517)
* embassy-usb support

* Add changelog entry

* Update embassy-usb-synopsys-otg

* Change VID/PID to match the blocking example

* Add missing initialisation

* Clean up

* fmt

* Remove log init

* Use released crate

* Revert to released embassy-usb

* Update vid/pid

* Remove redundant TAIT feature gate
2024-05-01 20:38:59 +00:00
liebman
f70ef1a593
i2c: implement I2C:transaction for embedded-hal and embedded-hal-async (#1505)
* i2c:

* i2c: refactor transaction() and reuse for master_read, master_write, and master_write_read

* i2c: cargo fmt

* i2c: fix an issue with not clearing interrupt bits & move where we reset fifo and command_list

* i2c: fix async compile error

* i2c: fix for esp32 & esp32s2

* i2c: real fix for esp32 (End command never gets cmd_done bit set!)

* i2c: fmt and removal of an unwrap() that I was using while debugging

* i2c: only define opcode values in one place
i2c: use CommandReg in add_cmd

* i2c: async direct & embedded_hal support working

* i2c: cargo fmt

* examples: cargo fmt
2024-04-30 13:41:07 +00:00
Dominic Fischer
d5d3f1f46b
Add LCD_CAM Camera driver (#1483)
* Add LCD_CAM Camera driver

* comments

* 16 bit

* Expose most config

* Module documentation

* Remove GPIO generics

* Fix breaking change

* Remove Pin generics from Camera type

* Fix unsafe

* Another breaking change

* fmt
2024-04-29 14:23:16 +00:00
Björn Quentin
fa99a1ad43
Cleanup dma module (#1480)
* DMA Cleanup

* Fix ESP32 SPI

* Consider `unsafe fn` as `unsafe block`
2024-04-24 13:38:07 +00:00
Björn Quentin
373735f96a
Add current_time (#1503)
* Add `current_time`

* CHANGELOG.md

* Add HIL test for `current_time`

* Fix after rebase
2024-04-23 14:59:28 +00:00
Jesse Braham
086b6059b9
Remove the SystemExt trait and rename SystemParts to SystemControl (#1495)
* Convert `SoftwareInterrupt` to a unit struct

* Remove the `SystemExt` trait and rename `SystemParts` to `SystemControl`

* Update all examples an HIL tests to reflect previous API changes

* Clean up imports in `hil-test` package, address `clippy` lint warnings

* Update `CHANGELOG.md`
2024-04-23 13:25:03 +00:00
Dominic Fischer
e5b46b5024
Make software interrupts shareable (#1500) 2024-04-23 10:42:08 +00:00
Scott Mabin
56a7553b2d
Camel case structs (#1473)
* Remove uneeded usb generics

* Ensure all structs are consistently CamelCased

* changelog
2024-04-22 17:27:53 +00:00
Jesse Braham
4d2ab5bc8f
Create virtual peripherals for CPU control and radio clocks (#1428)
* Create a virtual `CPU_CTRL` peripheral for ESP32/S3

* Create a virtual `RADIO_CLK` peripherals for all devices with radios

* Use `PeripheralRef` for the `CpuControl` constructors

* Update `CHANGELOG.md`
2024-04-22 15:21:08 +00:00
Jesse Braham
822bef12c7
New package releases (#1464) 2024-04-18 16:02:45 +00:00
Kirill Mikhailov
6f91367d6c
Add mechanism to configure UART source clock (#1416)
* Creating mechanism for setting UART source clock

* Format + examples updating

* Changelog entry

* Smaller fixes (reviews)

* Move RC_FAST_CLK constant to soc

* Fix REF_TICK value

* Add doc comments

update doc comments

* fmt
2024-04-17 15:27:47 +00:00
Scott Mabin
111dcda103
SystemTimer fixups (#1455)
* Resolve TODOs, add wait_until to target alarm, add &mut self to public API

* changelog
2024-04-17 15:09:48 +00:00
Jesse Braham
71db9fa55c
Remove partial support for the ESP32-P4 (#1461)
* Remove all code for and mentions of the ESP32-P4

* Update `CHANGELOG.md`
2024-04-17 14:49:00 +00:00
Kirill Mikhailov
17492f6b62
Support 192 and 256-bit keys for AES (#1316)
* Support 192 and 256-bit keys for AES

* quick fix

* Not `panic`ing on wrong key length

* fmt + hil

Update comment

* Add more doc comments

* Use `Key` enum for DMA mode

fix

* API fix: make some critical functions private

* Use `Into<Key>` instead of forcing users to call funcs with `key.into()`
2024-04-16 16:51:25 +00:00
Jesse Braham
3c2dccd51c
Move the esp-alloc package into the repository (#1449) 2024-04-16 15:11:05 +00:00
Björn Quentin
2a750dfedc
Use esp-synopsys-usb-otg 0.4.1 (#1452) 2024-04-16 15:00:25 +00:00
Sergio Gasquez Arcos
02c2825b2c
HIL RSA tests (#1414)
* docs: Update documentation

* test: Add rsa hil test
2024-04-10 14:43:10 +00:00
Kirill Mikhailov
52e5b94bd5
PCNT: Runtime ISR binding (#1396)
* PCNT: Runtime ISR binding

* Changelog entry

* fmt + warnings

* Unify `interrupt_handler` + alignment with latest changes

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-04-05 15:16:11 +00:00
Juraj Sadel
1e6165e04b
Runtime ISR binding and simple public API docs for RTC (#1405)
* Runtime ISR binding and simple public API docs for RTC

* changelog

* import dependencies instead of using full paths
2024-04-05 14:54:13 +00:00
Jesse Braham
fd9f7895f6
Extract inner modules of gpio module into their own files (#1397)
* Extract inner modules of `gpio` module into their own files

* Update `CHANGELOG.md`

* Add missing doc comment in `gpio::lp_io` module

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-04-05 12:33:49 +00:00
Björn Quentin
b3bc28efef
Software interrupts runtime binding (#1398)
* Split software interrupts

* Make swint0 unavailable on a multi_core target when using thread-executor

* Clarify why embassy_multiprio example needs two executors

* Make interrupt-executor require a SoftwareInterrupt<n>

* Improve code

* CHANGELOG.md

* Don't use `#[interrupt]` in thread-executor

* More docs

* Typo fixed
2024-04-05 12:33:21 +00:00
dimpolo
2437d82554
fix commented out paths in adc_cal example (#1400) 2024-04-05 09:40:41 +00:00
Juraj Sadel
215573a720
Runtime ISR binding and simple public API docs for assist-debug (#1395)
* Runtime ISR binding and simple public API docs for assist-debug

* changelog

* actually use runtime ISR in example

* revert MODE generic argument
2024-04-04 15:08:12 +00:00
Jesse Braham
bf2cca90be
Provide native APIs for I2C/SPI functionality currently handled by embedded-hal@0.2.x traits (#1386)
* Provide native APIs for SPI functionality currently handled by `embedded-hal` traits

* Provide APIs for I2C functionality currently handled by `embedded-hal` traits

* Rebase and update HIL test for SPI to get it building again
2024-04-04 14:09:35 +00:00
Jesse Braham
000ed9affc
Refactor the ADC driver, allow use without embedded-hal@0.2.x traits (#1391)
* Reduce duplication of code within the `analog::adc` module

* Add a public `read_oneshot` method to the ADC driver

* Do not require `embedded-hal@0.2.x` traits for ADC examples

* Add doc comments to all public methods which do not already have them
2024-04-04 10:35:25 +00:00
Scott Mabin
b8ca1323d0
Remove remaining references to embedded-hal-02 for GPIO examples (#1392) 2024-04-04 10:33:23 +00:00
Zgarbul Andrey
13c81177c5
inherent gpio methods (#1284) 2024-04-03 16:47:47 +00:00
Björn Quentin
ba73154c36
Runtime ISR binding for TWAI (#1384)
* Runtime ISR binding for TWAI

* CHANGELOG.md

* Fix EH-0.2 TWAI implementation
2024-04-03 13:46:21 +00:00
Björn Quentin
efcf7d4074
Don't use #[interrupt} in the serial_interrupts.rs example (#1385) 2024-04-03 13:14:35 +00:00
Björn Quentin
256d7198f9
Timers runtime isr binding (#1348)
* Runtime ISR binding for TIMG/SYSTIMER

* CHANGELOG.md

* Implement `set_interrupt_handler` only for blocking

* Adapt HIL test
2024-04-03 08:14:27 +00:00
Jesse Braham
55864b1ba7
UsbSerialJtag: async/blocking constructors, runtime interrupt binding support (#1377)
* Refactor `usb_serial_jtag` driver to take an operational mode as a generic parameter

* Update module documentation

* Update `CHANGELOG.md`
2024-04-02 23:45:14 +00:00
Björn Quentin
4aca01a7b6
I2C runtime ISR binding (#1376)
* I2C runtime ISR binding

* CHANGELOG.md
2024-04-02 18:03:36 +00:00
Jesse Braham
99b0c774ac
Use fewer embedded-hal@0.2.x traits in examples, build HAL without default features in CI (#1372)
* Clean up `embedded-hal-02` related imports

* Clean up some random warnings

* Update various examples to no longer depend on `embedded-hal-02` feature

* Build `esp-hal` without default features enabled in CI
2024-04-01 17:33:23 +00:00
Jesse Braham
dc6f8378e2
Build esp-hal for the ESP32-P4 in CI (#1370)
* Build `esp-hal` for the ESP32-P4 in CI (but do not perform other checks, yet)

* Get CI passing again for ESP32-P4
2024-04-01 13:56:08 +00:00
Scott Mabin
32587d7569
cleans up some timg fixmes, allows for use of timers without eh02 (#1367) 2024-04-01 12:43:18 +00:00
Björn Quentin
6f01b5aba3
Runtime ISR binding crypto accelerators (#1354)
* Runtime ISR binding for ECC,SHA,RSA

* CHANGELOG.md

* CHANGELOG.md

* Fix examples

* Remove obsolete `free` from ECC driver

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-03-29 23:13:19 +00:00
Jesse Braham
7d5372f57d
Decouple the twai driver from the embedded-hal traits (#1355)
* Decouple the TWAI driver from the `embedded-hal` and `embedded-can` packages

* No longer require `embedded-hal`/`embedded-can` for the TWAI example

* Update `CHANGELOG.md`
2024-03-28 14:44:09 +00:00
Björn Quentin
4077734c3c
Runtime DMA interrupt binding (#1300) 2024-03-26 13:56:48 +00:00
Björn Quentin
fd4f5592a4
RMT: allow driver to init as blocking or async (#1341)
* RMT: allow driver to init as blocking or async

* CHANGELOG and minor fixes
2024-03-25 13:54:03 +00:00
Jesse Braham
ace679f13b
Make examples less dependent on embedded-hal where able (#1342)
* Add support for building a package without its default features to `xtask`

* Do not require `embedded_hal_02` traits in examples where they are not required

* Do not require `embedded_hal_02` traits for filling a buffer with random bytes
2024-03-25 13:14:22 +00:00
Jesse Braham
8da8425907
Update READMEs, housekeeping (#1339)
* Remove patches and just use git dependency for PACs instead

* Various `README.md` normalization/updates for simpler packages

* Update `README.md` for `esp-hal` and `esp-lp-hal`

* Update repo-level `README.md`
2024-03-22 17:11:20 +00:00