Commit Graph

641 Commits

Author SHA1 Message Date
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
Björn Quentin
945a0d66c1
PeripheralRef: USB_OTG (#318) 2022-12-15 09:29:01 +01:00
Björn Quentin
a90aa3a2cc
PeripheralRef: DMA (#317) 2022-12-15 08:12:43 +01:00
Scott Mabin
c6a6010443
PeripheralRef: MCPWM (#314) 2022-12-14 16:42:30 +01:00
Björn Quentin
42f6f8ac4a
PeripheralRef for ClockControl (#316) 2022-12-14 15:09:46 +00:00
Juraj Sadel
0046081d0b
Merge pull request #313 from JurajSadel/PeripheralRef/i2s
PeripheralRef: I2S
2022-12-14 15:26:47 +01:00
Juraj Sadel
ca4c573660 PeripheralRef: I2S 2022-12-14 15:09:19 +01:00
Scott Mabin
3a57eb98fe
Completely remove pac references in hal drivers (#309)
* Peripheral ref/sha (#312)

* Add SHA to list of peripherals to be created

* Refactor SHA peripheral to use PeripheralRef

* Update SHA examples to get them building again

* Fix async time drivers

* Fix usb otg

* Fix s3

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2022-12-14 13:15:45 +00:00
Jesse Braham
220f812625
Peripheral ref/sha (#312)
* Add SHA to list of peripherals to be created

* Refactor SHA peripheral to use PeripheralRef

* Update SHA examples to get them building again
2022-12-14 12:19:53 +00:00
Juraj Sadel
7817e270c2
PeripheralRef: RMT (#310) 2022-12-14 11:47:50 +00:00
Jesse Braham
54e8eaf185 Use latest xtensa-toolchain version for all CI jobs 2022-12-14 01:38:58 -08:00
Scott Mabin
a9661e68be
Peripheral ref/rng (#306) (#307)
* Add RNG to list of peripherals to be created

* Refactor RNG driver to use PeripheralRef

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2022-12-14 09:34:43 +00:00
Jesse Braham
f2b59538df
Peripheral ref/rng (#306)
* Add RNG to list of peripherals to be created

* Refactor RNG driver to use PeripheralRef
2022-12-14 09:20:01 +00:00
Björn Quentin
39c5a04d05
PeripheralRef for SYSTEM/DPORT (#305) 2022-12-14 08:40:50 +00:00
Sergio Gasquez Arcos
66c1944c65
Merge pull request #304 from SergioGasquez/main
Peripheral ref/usb
2022-12-13 22:45:50 +01:00
Sergio Gasquez
0774018df5 revert: ️ impl Peripheral only for USB_DEVICE 2022-12-13 17:19:11 +01:00
Sergio Gasquez
7d4cfa2070 refactor: ♻️ impl Peripheral for USB_DEVICE, USB0, and USB_WARP 2022-12-13 17:17:24 +01:00
Sergio Gasquez
76afaa3692 refactor: ♻️ PeripheralRef usb serial 2022-12-13 17:13:47 +01:00
Jesse Braham
d7babe6ef6
Peripheral ref/i2c (#303)
* Add I2C to list of peripherals to be created

* Refactor I2C driver to use PeripheralRef
2022-12-13 07:06:27 -08:00
Scott Mabin
c7f420199e
Peripheral ref/systimer (#302)
* impl Peripheral for SYSTIMER

* PeripheralRef the Systimer driver
2022-12-13 06:52:51 -08:00
bjoernQ
dc8963c0a8 Support ESP32-C2 with 26MHz Xtal 2022-12-13 05:15:10 -08:00
Scott Mabin
cfe83827cf
PeripheralRef/spi (#299)
* Add missing UART instances

* Add SPI to list of peripherals to be created

* Refactor SPI driver to use PeripheralRef
2022-12-13 00:36:18 -08:00
Jesse Braham
2632421d86 Add a job to verify formatting 2022-12-12 07:02:29 -08:00
Scott Mabin
248fb356f8
PeripheralRef init: uart (#272)
* Add the peripheral module plus some helper macros in preparation

* peripheral macro

* Add peripheral generation macro

* Fixes after rebase

* Update the signature of Peripherals::take

* syncronise hello world example

* fmt the entire repo

Co-authored-by: Jesse Braham <jesse@beta7.io>
2022-12-12 14:45:33 +00:00
Jesse Braham
03d94a0ba2 New releases for all HALs 2022-12-12 01:29:49 -08:00
Björn Quentin
68cb35e4c4
Merge pull request #294 from IsaacDynamo/duty-cycle
Fix LEDC duty-cycle updates
2022-12-12 09:03:58 +01:00
IsaacDynamo
66b757847f Missed some changes 2022-12-10 01:51:14 +01:00
IsaacDynamo
7d985dc36a Added start_duty_without_fade() and update_channel() to set_duty() in order for the new duty-cycle to take effect 2022-12-10 01:06:02 +01:00