Commit Graph

672 Commits

Author SHA1 Message Date
Jesse Braham
a95f6efb35
Update esp-hal-smartled to use the new rmt driver, remove old pulse_control driver (#694)
* Remove the old `pulse_control` driver

* Update `esp-hal-smartled` to use the new `rmt` driver instead

* Update the `hello_rgb` example for each chip

* Update CHANGELOG
2023-07-27 16:07:15 +01:00
Alex Johnson
debe2b8004
fixed async read w/o at_cmd (#652)
* fixed async read w/o at_cmd

* configurtion checks  for async `read`

* remove fifo thrhd check
2023-07-25 12:19:59 +01:00
Dániel Buga
31e3ba83ff
Clean up regi2c related warnings (#682) 2023-07-25 11:51:27 +01:00
Dániel Buga
9f5e2b59de
ESP32-S3 deep sleep (#660)
* Add changelog entry

* Copy esp32 impl, update RtcSleepConfig

* implement apply

* extract rtc_sleep_pu

* Implement base_settings based on esp-idf rtc_init

* Hide CPU-specific sleep code

* Set base_settings when constructing Rtc

* Add s3 deep sleep defaults

* Implement finish_sleep

* Turn magic constant into enum

* Clear ext1 wakeup status

* Add wakeup source impls

* Add examples
2023-07-24 20:20:30 +01:00
Dániel Buga
adeb3c67c8
Documentation fixes (#668)
* Rustdoc improvements

* Format efuse bracketed names as code

* Fix SPI docs
2023-07-24 20:16:48 +01:00
Dániel Buga
2472b6d7a9
Implement calibrated ADC API for S3 (#641)
* adc_cal: s3: Add efuse functions for reading calibration

* Add changelog entry

* Implement calibrated ADC API for S3

* adc_cal: s3: Add calibrated ADC reading example

* Clean up

* Prefer where clauses

* Clean up unnecessary unsafe blocks

* Fix autolinks

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2023-07-24 17:45:19 +01:00
Dániel Buga
10ec2647eb Only implement RTCPin for actual RTCIO pins 2023-07-24 08:45:38 -07:00
C2D
d4f5afac67
MCPWM DeadTime configuration (#406)
* Add Initial MCPWM DeadTime configuration

* Add option to use other channel for action trigger

* Fix build for non-esp32s3 (register name difference)

* Fix changelog build & add a way to update RED/FED after construction

* Fix regs
2023-07-24 08:39:10 -07:00
Kirill Mikhailov
211fc0f8a0
Implementing async feature for USB Serial/JTAG peripheral. (#632)
* Implementing ASYNC features for USB_SERIAL_JTAG (work in progress)

Fix: Interrupt name

* Async works for USB Serial/JTAG 

PS. : Yet only for esp32c3, we need to update PACs
Temporary example fix

* Adjustment for different chips

+ Update examples according to upstream
+ Code cleaning


Rust format

* Add record to the CHANGELOG

* Code cleaning, getting rid of useless generic argument


Typo fix


Fix fmt
2023-07-24 07:33:15 -07:00
Björn Quentin
170d590b67
Make in-progress DMA transfers potentially fallible (#665) 2023-07-22 20:14:57 +01:00
Dániel Buga
b0126243c0
Fix GPIO interrupt status not being cleared (#670)
* Fix clearing interrupt status

* Use simpler way to clear bits

* Add note about xtensa

* Add to changelog
2023-07-22 20:03:35 +01:00
Dániel Buga
d89bd546e9
Fix RMT spelling (#667) 2023-07-21 11:43:52 +02:00
Scott Mabin
28ac202f1a
esp32s3: usb-serial-jtag interrupt (#664) 2023-07-19 15:48:08 -07:00
Björn Quentin
213dde9304
Add a new RMT driver (#653)
* Add a new RMT driver

* Add CHANGELOG entry

* Fix typos
2023-07-19 10:54:52 -07:00
Kazuki.Iida
fe1965e322
ESP32-S3: Disable usb_pad_enable when setting GPIO19/20 to input/output (#663) 2023-07-19 08:57:05 +02:00
Jesse Braham
709dae439b
Restructure files required during build process (#662)
* Restructure files required during build process

* Update build script to reflect previous changes
2023-07-18 11:51:42 -07:00
Scott Mabin
f1fce08a94
Move segment aliasing to linkall.x (#655)
* Move segment aliasing to linkall.x, this allows other projects to define there own alias whilst still being able to use esp-hal linker scripts

* Move rwtext in front of rwdata

* Re-arrange include

* Fix s3 direct boot script
2023-07-18 07:17:52 -07:00
Jesse Braham
31f7b974fd
Ensure that documentation can be generated for all packages in CI (#659)
* Make documentation buildable again

* Ensure that documentation can be generated for all packages in CI
2023-07-17 07:33:58 -07:00
liebman
37466fd9c7
deep sleep api for esp32 (#574)
* deep sleep api for esp32

* move to list of wakeup sources

* improve Ext0WakeupSource - still WIP

* add deep sleep with timer wakeup example
add Ext0 wakeup source (WIP/Non-working)

* removed alloc (using heapless now)

* Sleep: ext0 wakeup working

* add sleep_timer_ext0 example

* API change: move sleep into RTC as sleep, sleep_deep, sleep_light

* fix sleep examples for new API

* sleep only implemented for esp32 at this time

* sleep only implemented for esp32 at this time

* Implement a simple RTCPin trait to support sleep

* implement RTCPin for all xtensa SOC

* cargo fmt & update changelog

* fix change log order (accidentally swaped during rebase)

* implement Drop for Ext0WakeupSource

* added Ext1 wakeup source

* cargo fmt

* healpess was unused, removed

* fix pase macro usage
2023-07-14 15:44:13 +00:00
Jesse Braham
b0382c8fa1
Remove the allow-opt-level-z feature from esp32c3-hal (#654)
* Remove the `allow-opt-level-z` feature from `esp32c3-hal`

* Update CHANGELOG
2023-07-14 10:30:56 +01:00
Björn Quentin
24174c840c
Update esp-synopsys-usb-otg (#656)
* Update `esp-synopsys-usb-otg`

* Add PR number to CHANGELOG.md
2023-07-14 11:22:34 +02:00
Jesse Braham
8598e188b1 Set merge=union git attribute for CHANGELOG.md
Currently all PRs add a line to CHANGELOG.md; this means they almost always run into merge conflicts since they are adding different lines at the exact same place in the file.

With `merge=union`, git will automatically resolve these merge conflicts by keeping all lines from both sides.
2023-07-12 09:24:09 -07:00
Jesse Braham
58651f03b6
Derive the Clone and Copy traits for the Rng driver (#650)
* Derive the `Clone` and `Copy` traits for the `Rng` driver

* Update CHANGELOG
2023-07-12 07:11:32 -07:00
Björn Quentin
f7831be7ae
Add basic LP_IO support (#639)
* Add basic LP_IO support

* Add CHANGELOG.md entry

* Fix after rebase
2023-07-07 10:08:52 +02:00
Jesse Braham
c1b10e7993 Use latest published release of embassy-time 2023-07-06 07:16:24 -07:00
Dániel Buga
b1e8c6e818
Some minor cleanup (#642)
* Fix typo

* Don't require importing paste

* Clean up warnings

* Clean up Clippy warnings
2023-07-05 11:09:04 -07:00
Jesse Braham
49b2a3bf21
Update embedded-hal-* alpha packages to their latest versions (#640)
* Update `embedded-hal-*` alpha packages to their latest versions

* Update CHANGELOG

* Remove unnecessary patch
2023-07-05 09:09:07 -07:00
Sergio Gasquez
c411c57743 docs: Add H2 TRM 2023-07-05 10:31:44 +02:00
Vladan Popovic
5a89d11b77 fix broken URL for installation docs 2023-07-04 12:41:33 -07:00
Jesse Braham
8b8eea66ee New package releases 2023-07-04 10:57:06 -07:00
Jesse Braham
26473baf0e
Assorted small fixes and improvements (#635)
* Include the `esp-riscv-rt` package in VS Code workspace

* Fix a couple warnings

* Update dependencies

* Top-level README improvements
2023-07-04 10:41:32 -07:00
Kayo Phoenix
74438fcec5
ADC raw values calibration (#555)
* adc_cal: c2: Add efuse functions for reading calibration

* adc_cal: c3: Add efuse functions for reading calibration

* adc_cal: c6: Add efuse functions for reading calibration

* adc_cal: Add extra traits to support calibration

- `AdcCalScheme<ADCI>` implemented for each calibration scheme (basic, linear, curved)
- `AdcCalEfuse` implemented for each ADC unit to get calibration data from efuse bits

* adc_cal: Add basic ADC calibration scheme

Basic calibration is related to setting some initial bias value to ADC unit.
Such values usually is stored in efuse bit fields but also can be measured
in runtime by connecting ADC input to ground internally.

* adc_cal: Add line fitting ADC calibration scheme

This scheme also includes basic calibration and implements gain correction based
on reference point.

Reference point is a pair of reference voltage and corresponding mean raw ADC
value. Such raw values usually is stored in efuse bit fields for each supported
attenuation.

Possibly it also can be measured in runtime by connecting ADC to reference
voltage internally.

* adc_cal: Add curve fitting ADC calibration scheme

This scheme also includes basic and linear and implements final polynomial error
correction.

* adc_cal: riscv: Add ADC calibration implementation for riscv chips

* adc_cal: c2: Add calibrated ADC reading example

This example uses line fitting calibration scheme by default.
It periodically prints both raw measured value and computed millivolts.

* adc_cal: c3: Add calibrated ADC reading example

This example uses curve fitting calibration scheme by default.
It periodically prints both raw measured value and computed millivolts.

* adc_cal: c6: Add calibrated ADC reading example

This example uses curve fitting calibration scheme by default.
It periodically prints both raw measured value and computed millivolts.

* adc_cal: riscv: Add changelog entry for ADC calibration
2023-07-04 10:14:27 -07:00
Björn Quentin
996da27f30
Bare-bones support to run code on ULP-RV/LP core (#631)
* Bare-bones support to run code on ULP-RV/LP core

* Add CHANGELOG.md entry
2023-07-03 16:15:34 +02:00
Hannah Kolbeck
a86c2ac310
Clean up a stray comment in rtc_time examples (#630)
Co-authored-by: Hannah Kolbeck <hskolbeck@gmail.com>
2023-06-30 12:30:05 +01:00
Jesse Braham
6869f8c783 Update embedded-graphics and ssd1306, address breaking changes 2023-06-28 09:47:43 -07:00
Jesse Braham
89ba8f6e30
Update esp-hal-procmacros package dependencies and features (#628)
* Remove unnecessary `riscv` and `xtensa` features from proc macro crate

* Update `darling` and `syn`, address breaking changes

* Update CHANGELOG

* Remove unneeded macro definition/invocation
2023-06-28 08:43:06 -07:00
Dániel Buga
2371c30542
Simplify user-facing DMA channel types (#626)
* Introduce a trait for DMA channels

This trait is then used to hold types related to the particular DMA channel. This change allows us to simplify user-facing types.

* Remove private type from I2s

* Remove redundant spi3 example, update examples

* Merge markdown sections

* Add changelog entry
2023-06-28 13:03:49 +01:00
Jesse Braham
c5f0060d34
Miscellaneous fixes/improvements (#627)
* Un-comment remaining device peripheral definitions for ESP32-H2

* Re-work `RadioExt` implementations, add support for ESP32-H2

* README updates for ESP32-C6/H2

* Update CHANGELOG
2023-06-27 07:14:31 -07:00
Björn Quentin
16f78b1fb2
Merge pull request #624 from bugadani/i2s
I2S cleanup
2023-06-27 08:56:52 +02:00
Björn Quentin
38a82c72e1
Merge pull request #625 from bugadani/channel2
Disallow users creating DMA channel types, fix PDMA descriptor count docs
2023-06-27 08:52:07 +02:00
Björn Quentin
73fb717618
Merge pull request #623 from bugadani/dma
Add WithDmaSpi3 to prelude on espd32s3
2023-06-27 08:46:09 +02:00
Dániel Buga
9e969883d4 Remove redundant trait bounds 2023-06-26 19:31:23 +02:00
Dániel Buga
8ffede1f68 Fix typos 2023-06-26 19:31:21 +02:00
Dániel Buga
5c2e978e07 Add changelog entry 2023-06-26 19:25:15 +02:00
Dániel Buga
7777f0ac6c Update PDMA descriptor docs 2023-06-26 18:55:53 +02:00
Dániel Buga
b83f3e87e1 Prevent constructing some types 2023-06-26 18:54:36 +02:00
Dániel Buga
660c9e056a Add an example to test the prelude 2023-06-26 18:40:31 +02:00
Dániel Buga
c0243a9729 Add WithDmaSpi3 to prelude on espd32s3 2023-06-26 18:24:02 +02:00
Alex Johnson
bce7210b01
Async serial uart read (#620)
* implement embassy async uart read

* Add embassy async read support for uart

* changes based on review

* fix CI failures

* change review #2

* fixed re-opened PR number

* changes review no.3

---------

Co-authored-by: Scott Mabin <scott@mabez.dev>
2023-06-26 16:56:32 +01:00
Dániel Buga
7f80b23c9d
Correct DMA descriptor docs, math (#622) 2023-06-26 16:39:37 +01:00