Commit Graph

518 Commits

Author SHA1 Message Date
bjoernQ
820fdab53c ESP32-C2: ets_update_cpu_frequency_rom fix 2023-02-22 12:58:19 +01:00
C2D
862b8580b7 Fix the SPI alignment fix 2023-02-21 11:44:36 -08:00
Jesse Braham
d3969c3130 New releases for all HAL packages 2023-02-21 07:43:44 -08:00
Scott Mabin
80996e3b6e
Add RADIO peripheral (#397)
* Allow the creation of peripherals _not_ from the pac in the peripherals macro

* Add RADIO peripheral

- Remove DerefMut hack, replace with proper Sealed impls
- Add RADIO peripheral for all chips

* Add RADIO peripheral with split method into each radio feature
2023-02-21 07:08:08 -08:00
Björn Quentin
609fa2c507
Merge pull request #395 from bjoernQ/fix/hidden-buffer-alignment-requirement-spi
Fix hidden alignment requirement (SPI)
2023-02-20 14:47:04 +01:00
Björn Quentin
0b9ebbcc79
Fix direct boot linker script for ESP32-C2/C3 (#396) 2023-02-20 13:40:12 +00:00
bjoernQ
a01ecedb0f Fix hidden alignment requirement (SPI) 2023-02-20 12:53:52 +01:00
Björn Quentin
9fa59fe127
Merge pull request #394 from RepeatedRoot/features/esp32-26mhz-support
Add support for 26Mhz xtal in ESP32-HAL
2023-02-16 08:50:54 +01:00
RepeatedRoot
912ab3008e
add support for 26mhz esp32 2023-02-16 16:54:26 +10:30
Björn Quentin
5284fc0cf3
Merge pull request #393 from bjoernQ/re-export-xtensa-lx-rt
Make sure to re-export xtensa-lx-rt
2023-02-13 12:51:00 +01:00
bjoernQ
f385a7dfd2 Make sure to re-export xtensa-lx-rt 2023-02-13 10:09:20 +01:00
Björn Quentin
4e88e48bbe
Remove unnecessary rt crate dependencies (#391)
* Remove unnecessary `rt` crate dependencies

* Bump versions, update to latest released dependencies
2023-02-10 07:24:12 -08:00
Björn Quentin
df891b4b02
Merge pull request #384 from bjoernQ/erased-pin
Erased Pin
2023-02-08 15:00:39 +01:00
Björn Quentin
ab9aeb2443 AnyPin 2023-02-08 14:31:54 +01:00
Björn Quentin
94471721b6
Merge pull request #389 from bjoernQ/bugfix/fix-circular-dma
Fix (I2S) circular DMA
2023-02-08 13:21:02 +01:00
bjoernQ
e581f7c212 Fix (I2S) circular DMA 2023-02-08 13:14:36 +01:00
Björn Quentin
7c2da6a4a3
Merge pull request #390 from bjoernQ/bugfix/allow-into_analog-for-InputOnlyAnalog-pins
Allow `into_analog` for all analog capable pins
2023-02-08 13:01:10 +01:00
Scott Mabin
3f7181fece
Async SPI (#385)
* ground work for async dma (gdma only atm)

* Add async DMA (GDMA) - esp32c3/esp32c2

* Add Async SPI impl for esp32c3/c2

* Remove private modules from DMA

* add async spi example for esp32c3

* Switch to assoc wakers instead of a static array

* add support for esp32/esp32s2

* add support for esp32s3

* run fmt

* add c2 example, fix CI

* Remove redundant comments
2023-02-08 11:02:03 +00:00
bjoernQ
08c01355ae Allow into_analog for all analog capable pins 2023-02-08 10:27:46 +01:00
Sergio Gasquez Arcos
e65cacee58
Fix CI warnings (#379)
* ci: ️ Replace `actions-rs/toolchain` by `dtolnay/rust-toolchain`

* ci: ⬆️ Bump `actions/checkout`

* ci: ⬆️ Bump `Swatinem/rust-cache`
2023-02-02 06:59:28 -08:00
Jesse Braham
75f7394986 Fix the references to the ets_update_cpu_frequency_rom ROM function 2023-01-31 09:13:22 -08:00
Scott Mabin
2b2df2dbbd
Preemptively add cfg's needed in upcoming releases for s2 (#371) 2023-01-31 11:21:07 +00:00
Scott Mabin
925e874bb5 Remove references to imac target to avoid confusion. 2023-01-30 12:03:08 -08:00
Jesse Braham
c0eaa91a6f Fix examples after a bad rebase 2023-01-27 11:06:29 -08:00
Jesse Braham
cf270700e7
Use the new esp-riscv-rt package for RISC-V HALs (#365)
* Update PACs and modify `esp-hal-common` to use new `esp-riscv-rt` package

* Update `esp32c2-hal` and `esp32c3-hal` to use `esp-riscv-rt` as well

* Update all RISC-V examples to use `esp-riscv-rt`

* Update RISC-V trap frame handling according to review feedback
2023-01-27 10:49:38 -08:00
Scott Mabin
0eac22eba1
Async: GPIO (#333)
* Add `is_listening` to `Pin` trait

* Add `Wait` impl for Gpio Input

* Add GPIO wait example for C3

* Ensure correct bank is accessed in interrupt

* Add esp32c2 wait example

* Add esp32s3 wait example

* Add esp32s2 wait example

* Add esp32 wait example

* Run fmt

* Add example to cargo tomls

* Add top level docs for embassy examples

* Mention the higher MSRV for async in the README

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2023-01-27 10:44:08 -08:00
Jesse Braham
d6c4e3e43f Update the name of the INTERRUPT peripheral to INTERRUPT_CORE0 2023-01-27 07:06:07 -08:00
Jesse Braham
d03c267084 New releases for all HAL packages 2023-01-26 08:51:24 -08:00
Scott Mabin
573c517235
Allow Debug interrupts in Xtensa critical sections (#360) 2023-01-25 09:54:49 +00:00
mhead
586276fd34 aes accelerator implementation 2023-01-24 10:04:57 -08:00
Scott Mabin
5f933aa7c1
Only set the set_suc_eof flag on the last item (#359)
It was previously hardcoded to true, which meant a DMA suc eof interrupt would fire for every descriptor that was processed
2023-01-24 09:17:24 +01:00
Jesse Braham
832f9ef4d4
Refactor the clock module, provide ROM functions via linker scripts (#353)
* Refactor `clock` and `clocks_ll` into a common module

* Add a ROM function linker script to each HAL and provide some functions

* Use the provided ROM functions instead of transmuting addresses

* Fix CI workflow for ESP32-S2
2023-01-23 07:12:33 -08:00
Björn Quentin
1ec6f98602
Make DMA marker traits available to users (#356)
* Make DMA marker traits available to users

* Fix EH1

* Hint about the descriptor size on the `dma.configure()` function
2023-01-23 14:10:25 +00:00
Jesse Braham
7f8a15ccf5
Refactor rtc_cntl module and add get_reset_reason function (#351)
* Refactor the `rtc` and `rtc_cntl` modules into a common `rtc_cntl` module

* Implement the `get_reset_reason` and add `SocResetReason` enum for each chip
2023-01-19 06:51:22 -08:00
Jesse Braham
d29c4b1dcf
Update a number of dependencies to get RISC-V HALs building again (#350)
* Update `riscv`, `riscv-rt` dependencies, plus PACs for RISC-V chips

* Update `riscv-atomic-emulation-trap` package

* Update the `embassy-executor` dev dependency to a newer version
2023-01-18 14:08:30 -08:00
liebman
ac206af656
pulse counter implementation (#328)
* start of pulse counter implementation

* implement interrupts
implement pcnt for esp32, esp32s2, and esp32s3

* implement pcnt for esp32s2

* fix esp32 PCNT signal names

* update PCNT register/fields for cleaned up PAC

* implement events/get_events (choosing what events interrupt)

* added pcnt example: simple encoder configuration

* restrict pcnt::channel::Channel::new() to super

* PcntPin -> PcntSignal
added range checks for thresholds and limits

* PcntSource is a better name I think

* handle error for PCNT Unit configure() in example

* update pac versions for status register change

* cargo fmt

* cargo fmt (examples)

* PcntSource now only stores the source id.
add a critical section to protect the ctrl & isr_en registers

* cargo fmt
2023-01-17 17:04:22 +00:00
Jesse Braham
a542735847 Add a simple pre-commit git hook to verify each package's formatting 2023-01-16 08:44:23 -08:00
Jesse Braham
4d036c38e0 Use the latest xtensa-toolchain version 2023-01-11 08:22:18 -08:00
Jesse Braham
23690a4472 Rework the CI workflow 2023-01-09 08:52:30 -08:00
Scott Mabin
9d988b3ec8 Remove the signals from the GPIO structs, instead have a signals struct which can access the signals 2023-01-06 08:22:50 -08:00
Björn Quentin
a0b976d078
Fix GPIO interrupts for pins > 31 (#335)
* Fix GPIO interrupts for pins > 31

* Align InteruptRegister and GpioRegisterAccess
2023-01-06 13:57:09 +01:00
Scott Mabin
f618490dcb
Finish PeripheralRef (#334)
- Remove the mixed pac and generated peripherals, instead all are
  generated.
2023-01-06 11:35:57 +00:00
Jesse Braham
fe6ea5321b Use the latest PACs 2023-01-04 08:56:56 -08:00
dimpolo
ba43157c5a
enable TWAI on ESP32-S3 (#325)
* enable TWAI on ESP32-S3

* add esp32-s3 TWAI example
2023-01-03 10:02:01 -08:00
Jesse Braham
432e064856 Fix the CI badge 2023-01-03 07:15:47 -08:00
Alex Bohm
1f6803776c
Initial TWAI Driver Implementation (#192)
* wip: initial implementation of transmission only.

* Moved TWAI to its own directory and added initial reception of packets.

* Added extended id transmit and receive.

* Added maybe better code for making packet filters.

* Fixed bug with ids and improved methods of copying data to the peripheral.

* Added some guards against Bus Off

* Added reception of remote frames.

* Clean up of comments, etc

* Updated TWAI naming and cleaned up example a bit.

* Updated bitselector to include better unpacking methods.

* Add embedded-can and limit initial TWAI implementation to esp32c3.

* Added embedded-can to esp32c3 twai example.

* Switched twai filter to using bytestrings.

Co-authored-by: dimi <dimi.polonski@gmail.com>

* Implemented new() for twai filters.

* Clean up TWAI docs and example.

* Fix filter constructors and add examples.

* pre driver PeripheralRef update.

* PeripheralRef/twai

* Format comments with nightly rustfmt.

* Add gpio PeripheralRef and use volatile for direct register access.

Co-authored-by: dimi <dimi.polonski@gmail.com>
2022-12-22 00:54:06 +00:00
Scott Mabin
452fde2c12
Peripheral ref/gpio (#323)
* Implement Peripheral for all GPIO pins

* Update i2c & i2s to use the new gpio peripherals ref

* gpio pref: usb

* gpio pref: pulse control (RMT)

* gpio pref: spi

* gpio pref: uart

* gpio pref: ledc

* gpio pref: mcpwm

* fixup smartleds to use new pulse controller traits

* dump msrv

* bump rust-version in cargo tomls
2022-12-19 14:40:29 +00:00
Juraj Sadel
4598df6ed6
Peripheral ref/adc (#321)
* PeripheralRef: ADC

* PeripheralRef: DAC
2022-12-15 16:03:38 +01:00
Björn Quentin
4a780bd1f5
PeripheralRef: TIMG (#320) 2022-12-15 14:03:41 +01:00
Björn Quentin
5ebd800d0e
PeripheralRef: RTC (#319) 2022-12-15 11:21:13 +01:00