Commit Graph

1553 Commits

Author SHA1 Message Date
Kirill Mikhailov
f1ec4a2ac9
Removing raw addresses manipulations - part 3 (#1892)
* WIP state

* More fixes

* Roll back `esp-storage` changes

* Small fixes

Will not work, needs another patch for PACs

* update pacs dep

* Lint

* Get rid of unnecessary if-else

fix

* New pacs version
2024-08-14 16:38:00 +00:00
Dániel Buga
9e87792fb9
Update probe-rs, prebuild xtask for HIL tests (#1939)
* Update probe-rs

* Differentiate jobs

* Explicitly print that probe-rs's execution failed

* Do not capture stdin/stderr

* Pre-build xtask binary

* Use current_directory

* Print more info when a file can't be read

* Do not erase flash after a failure

* get_time: fail faster

* Make xtask runnable
2024-08-14 15:47:52 +00:00
Kirill Mikhailov
460eaa254a
Adding TWAI HIL test (#1946)
* Adding `TWAI` HIL test

* add `Frame` trait

* mutability
2024-08-14 14:06:08 +00:00
Kirill Mikhailov
945f8b3a19
ESP32C6: Make ADC usable after TRNG deinitialization (#1945)
* Make `ADC` usable after `TRNG` deinicialization (esp32c6)

* Changelog entry
2024-08-14 12:46:28 +00:00
Sycrosity
c83d1de974
Update to latest release (0.6.0) for embassy-executor in esp-embassy-hal (fixes #1941) (#1942)
* Updated to latest release (`0.6.0`) for `embassy-executor`

* update changelog

* update hil-test version of embassy-executor to 0.6.0

* update embassy-executor in `examples`

* reflect esp_hal change in `OneShotTimer` to not have a lifetime.

* update changelog

* revert OneShotTimer changes
2024-08-14 12:45:46 +00:00
Frostie314159
1173aac945
Implemented queue_msg_waiting. (#1925)
* Implemented queue_msg_waiting.

* Fmt.

* Adjusted changelog.

* Fixed CI.

* Fixed pointer mutability.
2024-08-14 12:44:48 +00:00
Dániel Buga
6b6e628940
Slightly clean up embassy HIL tests (#1937) 2024-08-13 19:39:36 +00:00
Kirill Mikhailov
c53ba38c43
Fix i2c + get rid of unused constants/enums (#1940) 2024-08-13 19:17:55 +00:00
Dániel Buga
352879abce
Fix an infinite loop in interrupt executors (#1936)
* Add failing test

Fix the name of the test fn

* Fix interrupt executor looping

* Fix formatting

* Fix changelog reference

* Move changelog to the right crate

* Remove dead code
2024-08-13 12:51:26 +00:00
Jesse Braham
a6e14067ae
Deny missing docs at the package level, adding exceptions for relevant modules (#1931) 2024-08-13 12:46:17 +00:00
Juraj Sadel
64a7d49a29
Reset peripherals on driver construction (where missing) (#1893)
* Reset peripherals on driver contruction (where missing)

* Don't enable and reset SHA in HMAC ctor

* changelog

* Don't reset the TIMG0
2024-08-13 12:09:04 +00:00
liebman
23f76b0bea
DMA: Don't require implementors of Read/WriteBuffer to be Sealed (#1921)
* DMA: Don't require implementors of Read/WriteBuffer to be Sealed

* CHANGELOG

* mark dma::ReadBuffer and dma::WriteBuffer traits unsafe
2024-08-13 11:48:43 +00:00
Kirill Mikhailov
a3a3ef12e4
Add self-testing mode for TWAI peripheral. (#1929)
* Add self-testing mode for `TWAI` peripheral

* changelog entry

* fix docs build

* fix async example

* Restore example to original state

fix comment

* `NoAck` -> `SelfTest`
2024-08-12 15:22:27 +00:00
KashunCheng
888e9425a4
chore: Update TimerClockConfig to support period updating method (#1898)
* chore: Update `TimerClockConfig` to support period updating method

* docs: added a change log entry
2024-08-12 13:20:02 +00:00
Dániel Buga
63a2d407ee
Fix some typos (#1930) 2024-08-12 12:20:58 +00:00
Alexandra Clifford
1371b11f32
More bandaid fixes for invalid range index and other array access panics (#1923) 2024-08-12 08:28:51 +00:00
Sergio Gasquez Arcos
2e8937a90f
Update probe-rs version (#1914)
* docs: Update probe-rs version

* feat: Simplify probe-rs args

* ci: Update the checkout action to use the fork
2024-08-09 14:11:29 +00:00
Kirill Mikhailov
cb0016aa43
Removing raw address manipulations - PSRAM (#1854)
* WIP state

* WIP state (PSRAM ESP32)

* Use PAC - PSRAM

* Removing "leftover" debug comments

ooops

* Quick fix in `TRNG`

* remove unnecessary unsafe blocks

* Update `esp-pacs` dependency + small fix

* Update to latest PAC version

* Removing wrong code in a comment
2024-08-08 12:19:11 +00:00
Kirill Mikhailov
1574e53b0e
Make C6 ADC calibration work properly again (#1911)
* Reverting changes which provoke wrong `ADC` behaviour

* Minor example fix

* clocks update
2024-08-08 11:52:08 +00:00
Kirill Mikhailov
bb6e710327
Removing unnecessary bitfield from I2C driver (#1900)
* Getting rid of bitfield usage

fmt

* use `variant` methods for opcode

* update pacs dependency
2024-08-08 09:40:13 +00:00
Sergio Gasquez Arcos
6ac56a25dc
Update channels being used in CI jobs (#1910)
* ci: Use stable to build HIL tests

* ci: Remove useless line

* fix: Avoid setting toolchain based on the target
2024-08-08 08:37:22 +00:00
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