269 Commits

Author SHA1 Message Date
W Etheredge
c92d69cb09
esp-hal-smartled: Calculate cycles from clocks (#1154) 2024-02-12 15:36:30 +00:00
Alexander Ananiev
3a456bb9dd
Add type for gpio::AnyPin (#1067)
This makes it possible to safely implement the InputPin and OutputPin
traits for AnyPin. Now you can convert any pin to AnyPin with the
appropriate type and use it in other library modules

Added:
- Peripheral implementation for AnyPin
- Implementation of Pin for AnyPin
- Implementation of OutputPin for AnyPin with type IsOutputPin
- Implementation of InputPin for AnyPin with type IsInputPin
- Upgrade types for AnyPin (for example InputOutputAnalogPinType ->
InputOutputPinType)
- Implementation of From<Gpio> for AnyPin with the appropriate type

Changed:
- The Gpio::degrage method returns AnyPin with the appropriate type
2024-02-08 07:29:30 +00:00
Jesse Braham
a586cb311e
Rename the ADC constructor to new, make it infallible (#1133)
* Rename the ADC constructor to `new`, make it infallible

* Update `CHANGELOG.md`
2024-02-01 11:51:05 +00:00
Jesse Braham
eff8f4b222
Unify: rename the esp-hal-common package to esp-hal [0/?] (#1131)
* Rename the `esp-hal-common` package to `esp-hal`

* Update all references to `esp-hal-common`

* Update `CHANGELOG.md`
2024-01-31 16:26:20 +00:00
Jesse Braham
c42a96c987
Refactor DMA to make API more consistent across devices (#1125)
* Make the `DMA` peripheral API more consistent

* Update examples for devices with `PDMA`

* Update examples for devices with `GDMA`

* Update `CHANGELOG.md`

* Update example after rebasing
2024-01-30 14:58:48 +00:00
Dániel Buga
fabb631b7d
Fix tick rates not being applied (#1124) 2024-01-29 17:53:35 +00:00
Jesse Braham
9bf70ff792
Combine the esp-ulp-riscv-hal and esp32c6-lp-hal packages (#1115)
* Combine `esp-ulp-riscv-hal` and `esp32c6-lp-hal` into a single package

* Update LP core examples

* Update CI workflow

* Fix `LP_UART` example
2024-01-26 13:46:51 +00:00
Jesse Braham
f52aa1351c
Refactor the analog module (#1100)
* Create virtual peripherals for `ADC`/`DAC`

* Refactor the `analog::dac` module

* Refactor the `analog::adc` module

* Decouple the ADC driver from the `embedded-hal` traits

* Update `CHANGELOG.md`

* Seal the `AdcCalScheme` trait, reduce visibility of `AdcCalEfuse` trait

* Remove `APB_SARADC`/`SENS` peripherals from the `Peripherals` struct
2024-01-25 16:46:27 +00:00
Jesse Braham
5391e68668
Use the document-features crate instead of manually writing package feature docs (#1107)
* Add `document-features` dependency to all HAL packages

* Update package-level documentation for each chip-specific HAL package

* Document package features for all chip-specific HALs
2024-01-23 15:49:06 +00:00
Jesse Braham
567a44f28c
New package releases (#1098) 2024-01-19 14:40:16 +00:00
Jesse Braham
d3674f5724 Update to latest smart-leds-trait and smart-leds packages 2024-01-18 17:30:30 +00:00
Jesse Braham
0e927d25cf
No longer depend on embassy-time (#1092)
* No longer depend on `embassy-time`

* Update `CHANGELOG.md`
2024-01-17 16:45:11 +00:00
Björn Quentin
ebe4149c39
Fix time-driver-timg timer1 (#1091)
* Fix time-driver-timg timer1

* CHANGELOG.md entry

* Fix examples

* Fix CHANGELOG.md
2024-01-17 16:20:46 +00:00
Sycrosity
842eb7c92e
Update embassy to its embedded-* v1.0.0 versions (#1076)
* update embassy in Cargo.toml and add embassy-time-driver

* fix embassy-time for esp-hal-common

* update CHANGELOG.md

* fix clippy warning by removing manual adc implimentation for esp32

* undo change, fixing clippy error by removing unused use statement

* remove embassy crates-io patches

* remove a remaining embassy patch

* Update embassy-time version in esp-hal-common/Cargo.toml

Co-authored-by: Scott Mabin <scott@mabez.dev>

* remove the remaining embassy patches

* remove embassy-time as a dependency for esp*-hal

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2024-01-16 20:25:22 +00:00
Jesse Braham
63408cf8a3
Update to 1.0.0 releases of embedded-hal-* packages (#1068)
* Update to `1.0.0` releases of `embedded-hal-*` packages

* Update `CHANGELOG.md`
2024-01-11 14:33:23 +00:00
Jesse Braham
c53f3095ec
Add embedded-io feature to each chip-specific HAL (#1072)
* Add `embedded-io` feature to each chip-specific HAL

* Update `CHANGELOG.md`
2024-01-11 14:03:04 +00:00
Kirill Mikhailov
fdc1dbfa1d
Unify the low-power peripheral names (RTC_CNTL and LP_CLKRST to LPWR) (#1064)
* WIP

* Adjusting to changes in driver

* Adding CHANGELOG entry
2024-01-08 14:00:26 +00:00
Jesse Braham
cf66cc05fc
Move initialization functions into esp-hal-common package's soc module (#1049)
* Move initialization functions into `esp-hal-common` package's `soc` module

* Simplify module paths
2024-01-03 15:38:33 +00:00
Jesse Braham
62ae9dc05c
Add rt-riscv and rt-xtensa features to esp-hal-common (#1057)
* Add `rt-riscv` and `rt-xtensa` features to `esp-hal-common` to allow enabling/disable runtime support

* Update the CI workflow to check the chip-specific HAL packages without default features

* Update `CHANGELOG.md`
2024-01-03 14:24:05 +00:00
Juraj Sadel
244c74776a
Don't enable async interrupts without async feature (#1042)
* only enable interrupts if the async feature is present

* remove warnings and fmt

* changelog
2023-12-19 16:34:17 +00:00
Jesse Braham
82c579eb14
Clean up example imports (#1027)
* Don't import directly from `esp-hal-common` in examples

* Do no alias the HAL packages in examples
2023-12-14 15:56:04 +00:00
Jesse Braham
58baecc0d2
Assert that the hardware and software digests match for SHA examples (#1026) 2023-12-14 15:04:46 +00:00
Jesse Braham
c55a6b70ae
New package releases (#1018)
* Fix typos in top-level `README.md`

* Bump version numbers of all packages and update necessary dependencies

* Update `CHANGELOG.md` files
2023-12-12 10:17:17 -08:00
Scott Mabin
19c9cef9a8
auto enable interrupts (#1014)
* auto enable interrupts

* changelog

* cfgs
2023-12-12 17:55:37 +00:00
Björn Quentin
eef9cdb0a7
Update esp-synopsys-usb-otg (#1015) 2023-12-11 17:12:17 +00:00
Jesse Braham
1130ae4f0d
Update to latest release candidate of embedded-hal{-async,-nb} (#994)
* Update to `embedded-hal@1.0.0-rc.2` and friends, bump some other deps

* Update method name in `SetDutyCycle` trait implementation

* Implement `DelayNs` trait

* Update `CHANGELOG.md`

* Update `usb-device` as well

* Use latest `embassy-executor` release
2023-12-08 10:56:27 +00:00
dimpolo
08bfbbe8d4
let SmartLedsAdapter take its buffer by value (#1002) 2023-12-06 10:38:45 +00:00
Scott Mabin
05f9d2109a
Completely remove atomic emulation (#985)
* Completely remove atomic emulation

* changelog
2023-12-04 14:22:15 +00:00
Jesse Braham
84e5a00361
Update heapless to 0.8.0, modify esp-hal-smartled job to build for correct targets (#993)
* Update `heapless` dependency to latest version

* Update CI job for `esp-hal-smartled` to build for correct targets
2023-12-04 10:46:30 +00:00
Björn Quentin
f1e1ec574f
Remove unnecessary pin required by USB peripheral (#990)
* Remove unnecessary pin required by USB peripheral

* CHANGELOG.md
2023-12-01 13:24:38 +00:00
Björn Quentin
17884743bd
Dma convenience macro (#935)
* Add macro to create DMA buffers and descriptors

* Remove WDT disabling from remaining examples

* CHANGELOG.md entry

* Remove redundant `unsafe`

* Easier way to make RX and TX same sized
2023-12-01 10:22:39 +00:00
Björn Quentin
6005f802ad
I2S: Less generics, nicer API (#983)
* I2S: Less generics, nicer API

* CHANGELOG.md
2023-11-30 07:55:03 +00:00
Anthony Grondin
755fdd32b5
fix!: Use u32 words instead of u8 bytes for the RSA driver (#981)
BREAKING CHANGE: The RSA driver now takes u32 slices instead of u8
2023-11-29 08:49:53 +00:00
Björn Quentin
e7e0af2135
Improve SmartLED init (#980) 2023-11-28 13:30:42 +00:00
Dániel Buga
4a0af66884
Remove SpiBusDevice and SpiBusController (#978)
* Remove SpiBusDevice and SpiBusController

* Update examples
2023-11-28 08:55:55 +00:00
Scott Mabin
6005f92566
Align stack variable names (#970) 2023-11-22 15:16:16 +00:00
Dániel Buga
39519dfdc9
RISC-V executors (#947)
* RISC-V executors

* Add multiprio example to RISC-V SoCs

* Check new examples

* Hack in support for generic queue

* Reserve SoftwareInterrupt0 for multicore thread-mode executors

* Merge interrupt executors

* Merge thread-mode executors

* Document the new features and expand on time drivers

* Main tasks don't have to return !

* Unify multiprio examples

* Undo C6 log output change
2023-11-22 14:36:53 +00:00
Jesse Braham
04f63b7c7b
Move remaining device-specific linker scripts into esp-hal-common (#963)
* Move remaining linker scripts to `esp-hal-common`, rename as needed

* Update build scripts
2023-11-20 12:25:23 +00:00
Dániel Buga
07ed22df17
Clean up (#920) 2023-11-10 06:04:05 -08:00
Dániel Buga
280caad378
RISC-V: Make atomic emulation opt-in (#904)
* RISC-V: Make atomic emulation opt-in

* Update embassy-executor, embassy-sync

* Don't automatically enable portable-atomic

* Update changelog

* Fix warnings
2023-11-10 11:51:47 +00:00
Björn Quentin
c612fecfae
Clear LP/RTC RAM (#916)
* Clear LP_RAM/RTC RAM to make sure .bss is cleared

* Rename `ulp-riscv-hal` to `esp-ulp-riscv-hal`

* CHANGELOG.md entry
2023-11-09 14:06:58 +01:00
sanxus
c196b67587
Improve spi master constructor (#901)
* make pins optional for Spi::new (master, full-duplex mode)

* add additional method to setup spi pins (master, full-duplex mode)

* add additional method to setup spi pins (master, half-duplex mode)

* remove generic type parameters for Spi::new

* update documentation

* make `with_pins` could be chained

* update CHANGELOG.md

* update CHANGELOG.md

* make the return value of a method like `with_{*}` owned

* fix (maybe?) all broken examples caused by the change (esp32-hal)

* fix (maybe?) all broken examples caused by the change (esp32c2-hal)

* fix (maybe?) all broken examples caused by the change (esp32c3-hal)

* fix (maybe?) all broken examples caused by the change (esp32c6-hal)

* fix (maybe?) all broken examples caused by the change (esp32h2-hal)

* fix (maybe?) all broken examples caused by the change (esp32s2-hal)

* fix (maybe?) all broken examples caused by the change (esp32s3-hal)

* rerun 'cargo fmt' for esp-hal-common

* rerun 'cargo fmt' for the rest of examples
2023-11-08 12:11:58 +01:00
Dániel Buga
9f0d384ebf
Pin static_cell (#899) 2023-11-03 08:05:37 +01:00
Jesse Braham
8a3e63cdeb
New package releases (#887)
* New package releases

* Update `CHANGELOG.md`
2023-10-31 09:18:20 -07:00
Jesse Braham
9cb8f7e941
Miscellaneous pre-release fixes (#883)
* Temporarily disable async `SYSTIMER` implementation, remove mention from `CHANGELOG.md`

* Remove a couple files which are not required

* Fix warning for `sha` examples

* Fix warning for non-C3 devices

* s/interrupt_clear/clear_interrupt/
2023-10-31 06:50:54 -07:00
Jesse Braham
29ebd170ee
Update dependencies, miscellaneous fixes/improvements (#878)
* Force frame pointers for RISC-V chips

* Various dependency updates

* Update to latest published PACs and resolve build errors

* Top-level `README` updates

* Further clarify when `RUSCT_BOOTSTRAP=1` is required
2023-10-27 06:41:04 -07:00
Scott Mabin
6b04092bd8
Remove variable from s2 linker because it no longer exists (#875) 2023-10-26 10:49:24 +01:00
Scott Mabin
94a07da47b
Fix Async UART (#871)
* Fix Async UART

The uart handler was `writing` to the enable register instead of
`modify`, which meant any wake would see the cleared enabled bit and
think the event had occurred. This wasn't seen before the split of uart
because it was only possible to listen to one thing at a time.

This PR also removes the ReadBufferFull error in favour of returning the
max bytes in the buffer.

The serial examples has been updated to actually have some cross task
communication.

* changelog

* fix dev deps
2023-10-25 10:25:25 -07:00
Scott Mabin
6eca968bb8
Add LLD option for all Xtensa chips (#861)
* Add LLD option for all Xtensa chips

* changelog

* Fix linkerscript for esp32s3 rtc fast ram region
2023-10-25 11:49:42 +01:00
Jesse Braham
33bfe80d95
Prelude improvements/fixes (#860)
* Move SPI-related traits into their own preludes in the `spi` module

* Remove the `embedded-hal-async` trait re-exports and the `eh1` module from the prelude

* Update `CHANGELOG.md`
2023-10-20 06:56:17 -07:00