Commit Graph

296 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
jneem
858fd4fb1f
Add docs.rs metadata (#1129)
* Add docs.rs metadata

* changelog

* add p4

* Fix targets for c6, h2, p4
2024-01-31 14:16:09 +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
deb9f21284
Rework DMA descriptors (#1054) 2024-01-30 08:03:47 +00:00
Dániel Buga
fabb631b7d
Fix tick rates not being applied (#1124) 2024-01-29 17:53:35 +00:00
Bryant Chandler
3eb296c892
Allow for splitting of the USB Serial JTAG peripheral into tx/rx components (continuation) (#1116)
* Allow for splitting of the USB Serial JTAG peripheral into tx/rx components

* Update `CHANGELOG.md`

* Split single waker into tx/rx wakers

* Fix interrupt bug and update embassy example

The wakers were written to trigger opposite, so the rx waker
would trigger for tx interrupts and vice versa.

Also update the embassy example to run read/write in
separate tasks.

* rustfmt

---------

Co-authored-by: Jesse Braham <jesse@beta7.io>
2024-01-26 14:09:09 +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
Jesse Braham
6288e6421d
Update top-level README.md, HAL package documentation (#1017)
* Top-level `README.md` updates

* Remove mentions of image formats from documentation
2023-12-12 09:20:53 -08:00
Studiedlist
dd5bcb8509
Fix dma_read and dma_write for SPI slave dma driver (#1013)
* separate SpiDmaTransfer impl for rx and tx

* format code

* update spi_slave_dma example

* update CHANGELOG

* fix changelog entry

* add dma_read and dma_write examples for all supported chips
2023-12-12 10:09:20 +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
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
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
jneem
5503121bea
Async read implementation for usb serial jtag (#889)
* Async read implementation for usb serial jtag

* Check the example in ci

* Add the example's required features

* Add changelog entry

* Improve the example

* Add examples for other boards

* Fix changelog

* Add required features for examples
2023-11-17 18:26:45 +00:00
Dániel Buga
6814822cfd
Decouple default features from esp-hal-common (#867) 2023-11-16 14:09:47 +00:00
Jesse Braham
f729f89889
Remove the mcu-boot feature from esp32c3-hal (#938)
* Remove the `mcu-boot` feature from `esp32c3-hal`

* Update `CHANGELOG.md`
2023-11-14 11:49:40 -08:00
Björn Quentin
52da17075e
Remove unnecessary riscv::interrupt::enable() from examples (#936) 2023-11-14 09:28:39 -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
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
Scott Mabin
fb31f868f1
Remove direct boot support from esp-hal (#903)
* Remove direct boot support from esp-hal

* changelog
2023-11-07 14:34:46 +00: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
jneem
ff80b69183
Provide ADC values in mV instead of requiring the user to scale them (#836)
* Provide ADC values in mV instead of requiring the user to scale them

* Changelog

* Try converting poly calibration also

* Update changelog and comments

* Fix example
2023-10-30 10:16:45 -07:00