Commit Graph

1582 Commits

Author SHA1 Message Date
Fan Jiang
3473dda774
TWAI: GPIO pins are not configured as input and output (#1906)
Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2024-08-07 14:22:30 +00:00
Sergio Gasquez Arcos
e58b4d8d89
Check packages with nightly for RISC-V devices (#1881)
* ci: Check pacakges with nightly

* ci: Remove duplication

* perf: Nightly clippy fixes

* revert: Revert unsafe changes

* ci: Use an action to remove duplication

* ci: Update trigger conditions

* ci: Update S2 serial port

* ci: Rename action
2024-08-07 13:32:48 +00:00
Juraj Sadel
54ee364130
ESP32(SPI): Disable the write side when reading is being done in DMA … (#1894)
* ESP32(SPI): Disable the write side when reading is being done in DMA mode

* disable and re-enable MISO and MOSI in write and transfer methods

* changelog
2024-08-07 13:23:49 +00:00
Jesse Braham
56d8d58443
Deny Rust 2018 idioms in esp-hal (#1901) 2024-08-06 15:59:41 +00:00
Jonathan
94db708f49
Touch support for ESP32 (#1873)
* Added touch pad support

* touch: Introduced blocking mode

* touch: moved fns out of TouchPad to prepare async code

* touch: added async support and embassy example
2024-08-06 07:19:41 +00:00
Gavin Li
3049f2804a
esp-wifi/ble/npl: increase event queue size (#1891)
With my ESP32-C6 device, I saw the following panic when scanning was
enabled and there were many BLE devices in vicinity:

    unwrap of `EVENT_QUEUE.enqueue((*event).dummy as usize)` failed: 14,

This occurs because the NPL event queue has overflowed. I increased the
queue size from 10 to 16, and the panic went away. I also did some
testing and discovered that there were at most 13 elements on the queue
at any given time, so a queue size of 16 (which allows for 15 elements)
should give us some margin. This also gives a slight overhead reduction
as the heapless crate recommends the queue size to be a power of two.

Co-authored-by: Gavin Li <git@thegavinli.com>
2024-08-05 21:50:41 +00:00
Juraj Sadel
c5ea0e9149
esp-hal: Add HIL test for embassy timer and executor (#1886)
* esp_hal: Add embassy timers and executors HIL test

* Add timeout to each test

* cfg-gate out systimer tests for ESP32
2024-08-05 21:49:57 +00:00
Sergio Gasquez Arcos
0c29c4381c
ci: Use stable channel for RISCV devices (#1896) 2024-08-01 17:42:49 +00:00
Sergio Gasquez Arcos
40d5481edd
ci: Disable test_asymmetric_dma_transfer for S3 (#1888) 2024-07-31 15:47:44 +00:00
Jesse Braham
311f0127de
Implement embedded_io::{ReadReady, WriteReady} traits for WifiStack (#1882)
* implement `ReadReady` and `WriteReady` traits from `embedded-io` for Wi-Fi

* Allow non-static lifetime for `WifiStack`

* Update `CHANGELOG.md`

* clippy
2024-07-31 07:29:10 +00:00
Jesse Braham
81f3776aa7
Deny warnings in CI (#1877)
* Deny warnings when building in CI

* Build RISC-V using `stable` release channel again
2024-07-30 07:38:57 +00:00
liebman
dd2e475f00
lcd_cam: i8080 fix bad len calculation (missed from ReadBuffer update) (#1876) 2024-07-29 15:13:59 +00:00
liebman
67bb6c54bb
Implement async for lcd_cam i8080 (#1834)
* implement async for lcd_cam i8080

* lcd_cam: implement InterruptConfigurable for blocking and improve async

* lcd_cam: use new async interrupt semantics from #1835

* lcd_cam: move interrupt handler binding into `new_async()`

* lcd_cam: Instance::is_listening_lcd_done not used

* i8080: no need for seperate `new_async()`

* i8080: don't use DmaTxFuture, just test for dma error after complete

* add HIL tests for LCD_CAM i8080 in blocking and async.

* lcd_cam_i8080: test channels configured for async as well since teh compiler can't prevent it for now

* fmt :-/

* lcd_cam fix comment

* changelog

* lcd_cam async: no need to enable interrupts until polled

* lcd_cam: i8080 update for ReadBuffer changes
2024-07-29 13:59:52 +00:00
Björn Quentin
56806313bd
Fix time_driver (#1875)
* Fix time_driver

* CHANGELOG.md
2024-07-29 13:48:11 +00:00
Alexandra Clifford
36ed7bdf14
Adds temporary fix for rcv frame panic issue (#1862) 2024-07-29 07:36:39 +00:00
Jesse Braham
237804efb6
Add a new constructor to gpio::Io which does not bind an interrupt handler (#1861)
* Add a new constructor to `gpio::Io` which does not bind an interrupt handler

* Update `CHANGELOG.md`
2024-07-26 13:28:00 +00:00
Dominic Fischer
2744a5dd86
SPI: Clear DMA interrupts before (not after) DMA starts (#1859)
* SPI: Clear DMA interrupts before (not after) DMA starts

* Fix Rust 1.80 doc thingy

---------

Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-07-26 08:51:39 +00:00
Björn Quentin
c6207c0f59
Lift static requirement on DMA buffers (#1837)
* Lift `static` requirement on DMA buffers

* Seal `Word`, use `size_of_val`

* Fix

* CHANGELOG.md

* Use Clippy's safety comment style

* Top-level docs regarding mem::forget
2024-07-25 13:55:02 +00:00
Jesse Braham
45db1b55ec
Add #![deny(missing_docs)] to the aes, analog, clock, and dma modules (#1849)
* Deny missing documentation within the `analog` module

* Deny missing documentation in the `dma` module

* Remove unused `ENCRYPT_MODE`/`DECRYPT_MODE` constants from `AesFlavour` trait

* Deny missing documentation in the `aes` module

* Deny missing documentation in the `clock` module

* Update `CHANGELOG.md`
2024-07-25 13:05:59 +00:00
Jesse Braham
3215d93f53
Use peripheral ref pattern for OneShotTimer and PeriodicTimer` (#1855)
* Use the peripheral ref pattern for `OneShotTimer` and `PeriodicTimer`

* Update tests and examples to reflect changes in timer API

* Update `CHANGELOG.md`
2024-07-25 12:52:34 +00:00
liebman
c7218fba2b
Implement DMA to/from psram on esp32s3 (#1827)
* initial non-working attemt for dma from psram on esp32s3

* flush cache - now works for extmem as source but not for extmem as destination

* use cache_invalidate_addr on destination address

* update changelog

* require dma transfers to/from psram to be aligned to dcache line size

* cache_writeback_addr() should suspend/resume dcache autoload

* no need for cfg(esp32s3) in esp32s3 specific module

* dma: document alignment requirements for DMA to/from PSRAM

* fix doc typos
2024-07-25 12:51:02 +00:00
Björn Quentin
7f251b457a
Fix i2c freeze (#1847)
* Check errors while waiting for TXFIFO_WM

* Limit iterations in `wait_for_completion`

* Detect errors in async-I2C

* CHANGELOG.md

* async `wait_for_completion` ESP32 special treatment

* Simplify ESP32 workaround

* Clippy
2024-07-24 15:09:46 +00:00
Dominic Fischer
4ef91c5941
Change semantics of DMA futures (#1835)
* Change semantics of DMA futures

* Only clear specific interrupt bit when listening for an "in progress" interrupt

* Fix PARL_IO Rx

* Only enable interrupts when future is polled

---------

Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-07-24 14:26:39 +00:00
Björn Quentin
38f1d28585
Fix async PARL_IO RX (#1851)
* Fix async PARL_IO RX

* CHANGELOG.md
2024-07-24 13:19:19 +00:00
Juraj Sadel
3299348ebc
esp_hal: Warnings in examples cleanup (#1852) 2024-07-24 13:18:50 +00:00
Scott Mabin
e8b0a376eb
Check all features and targets in CI when linting (#1824)
* Check more features and targets in CI when linting

* Address clippy lints

* Address clippy lints for esp-wifi

* Expand println and storage checks

* Remove uneeded clippy lint

* Check every package for each target

* resolve esp-wifi clippy lints

* use defmt when building esp-wifi

* clean up

* fix warning in meta crate

* simplify CI workflow

* split up clippy jobs
2024-07-24 11:45:41 +00:00
BMCG0011
5d6354ccbd
Expose InputPin.is_interrupt_set in implementation of esp-hal::gpio::… (#1839)
* Expose InputPin.is_interrupt_set in implementation of esp-hal::gpio::Input

* Move entry in changelog from changed to added
2024-07-23 19:47:59 +00:00
Björn Quentin
426c8fb0bd
Improve Xtensa backtraces (#1838) 2024-07-23 19:47:46 +00:00
Björn Quentin
8be7f81e34
usb-serial-jtag example: Hint for Windows users (#1845) 2024-07-23 19:23:35 +00:00
Björn Quentin
d5bff95a1b
Fix I2s async-tx (#1833)
* Fix I2s async-tx

* CHANGELOG.md

* Add async i2s test

* Cleanup

* Use `Spawner::for_current_executor()` instead of manually creating the executor
2024-07-23 18:09:58 +00:00
Scott Mabin
c090191afb
try to fix espflash command not found in HIL CI (#1848)
* try to fix espflash command not found in HIL CI

* Specify espflash port

---------

Co-authored-by: Juraj Sadel <juraj.sadel@espressif.com>
2024-07-23 17:38:44 +00:00
Björn Quentin
1424f2a43d
Implement InterruptConfigurable (#1819)
* Implement `InterruptConfigurable`

* Fix doc-tests

* Clippy

* Fix lp_core_uart example

* CHANGELOG.md

* Have DEFAULT_INTERRUPT_HANDLER

* Fix docs

* Clippy

* Add `set_interrupt_handler` for WDT
2024-07-18 13:37:46 +00:00
Juraj Sadel
bc7c53f668
esp-hal: Remove duplicated branch in ESP32 PSRAM (#1830) 2024-07-18 11:22:46 +00:00
Björn Quentin
917756a7bf
Prettier panic message printing (#1823)
* Prettier panic message printing

* CHANGELOG.md
2024-07-18 09:32:53 +00:00
Jesse Braham
776f34cff1
Re-export the esp_hal_procmacros::main macro from esp-hal-embassy instead of esp-hal (#1828)
* Re-export the `main` procmacro from `esp-hal-embassy` rather than `esp-hal`

* Fix documentation warnings

* Flatten the `time_driver` module

* clippy

* Update `CHANGELOG.md`
2024-07-18 09:31:03 +00:00
dimpolo
02c99786f9
esp-backtrace: Add custom-pre-backtrace feature (#1822) 2024-07-18 07:38:40 +00:00
dimpolo
0eb30c5286
make esp_println::Printer::write_bytes public again (#1812) 2024-07-18 06:16:46 +00:00
Sergio Gasquez Arcos
32be53d618
CI Improvements - Part 1 (#1821)
* ci: Fix condition to erase-flash

See https://docs.github.com/en/actions/learn-github-actions/expressions#example-of-failure-with-conditions

* ci: Remove path-ignore attributes to avoid CI not being triggered

* ci: Build documentation

* ci: Install nightly toolchain

* ci: Deny warnings for building docs

* fix: Documentation warnings

* ci: Remove duplicated step
2024-07-17 15:55:27 +00:00
Björn Quentin
2c8bb07be2
Prepare esp-wifi 0.7.1 (#1820)
* Prepare esp-wifi 0.7.1

* CHANGELOG.md
2024-07-17 10:57:15 +00:00
Juraj Sadel
884db5aa32
esp-hal: Add (where missing) used GPIOs to example descriptions (#1810)
* esp-hal: Add (where missing) used GPIOs to example descriptions

* review comments
2024-07-17 08:34:13 +00:00
Jesse Braham
e33b060734
Add xtensa-lx and xtensa-lx-rt packages (#1813)
* Add the `xtensa-lx` package

* Add the `xtensa-lx-rt` and `xtensa-lx-rt-proc-macros` packages

* Exclude new packages from workspace, add to `xtask::Package`

* rustfmt

* clippy
2024-07-17 08:32:52 +00:00
Kirill Mikhailov
14baad4625
Remove raw addresses usage (part 1) (#1795) 2024-07-16 14:11:05 +00:00
Björn Quentin
37299237cb
esp-wifi: Check no password given for AuthMethod::None (#1806)
* esp-wifi: Check no password given for AuthMethod::None

* CHANGELOG.md
2024-07-16 13:46:22 +00:00
Scott Mabin
04cad71926
bump esp-backtrace to 0.13.0 (#1804)
* bump esp-backtrace to 0.13.0

* disable spi_half_duplex_write for esp32s2
2024-07-16 13:19:16 +00:00
Dominic Fischer
31a135c0f1
Add SPI Half Duplex Write HIL test (#1801)
Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-07-16 10:19:16 +00:00
Dominic Fischer
6fd9443c13
Allow users to easily name DMA channels (#1771)
* Introduce public DmaChannel trait

* Use DmaChannel trait in all peripherals

* Simplify ChannelTypes trait

* changelog

* Rename things

* missed a spot

---------

Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-07-16 08:52:48 +00:00
Jesse Braham
af1febfb8c Begin next release cycle 2024-07-15 22:56:31 +00:00
Jesse Braham
eddcb7354f
Actually bump the esp-hal version number (oops) (#1802) 2024-07-15 22:17:15 +00:00
Jesse Braham
77b6cb8615
New package releases (#1800)
* Use published versions of all dependencies, update dependencies as needed

* Fix `embassy_usb_serial` example build errors after updating `embassy-usb`

* New package releases
2024-07-15 20:23:13 +00:00
Sergio Gasquez Arcos
7ea471c1ac
Remove unnecessary delay (#1794)
* fix: Remove unnecesary delay

* docs: Update changelog

* fix: Remove unused variable

* fix: Remove clippy warning from examples
2024-07-15 13:09:47 +00:00