Commit Graph

1564 Commits

Author SHA1 Message Date
Juraj Sadel
42bbdaeb4f
Add basic HIL test for GPIO that can be configured as pin for (#1963) 2024-08-19 11:43:59 +00:00
Juraj Sadel
e708dbc777
Add more SPI DMA (full-duplex) HIL tests (blocking and async) (#1952)
* Add more SPI DMA HIL tests (blocking and async)

* move test repetitions into loops instead, add a description about why PCNT is used, import embedded_hal_async::spi

* clean up
2024-08-19 06:59:55 +00:00
Frostie314159
d1acacb757
Implement Sniffer API (#1935)
* Implemented queue_msg_waiting.

* Fmt.

* Adjusted changelog.

* Fixed CI.

* Fixed pointer mutability.

* Implemented experimental sniffer api.

* Fixed CI..

* Added safety comment.

* Featured gated, PromiscuousPkt

* Format.

* Adjusted imports.

* Added injection example.

* Made RxControlInfo::from_raw public.

* Format.

* Added sniffer example.
2024-08-19 06:51:18 +00:00
Dániel Buga
59728c523f
Some xtask/metadata cleanups (#1965)
* Clean up almost all clippy violations

* Remove redundant variable from context

* Do not clone configs

* Do not collect all config symbols into a vec needlessly

* Do not allocate so many strings
2024-08-19 06:49:05 +00:00
Dániel Buga
f95ab0def5
Simplify initialization APIs (#1957)
* Accept more types in embassy::init

* Apply the same treatment to esp-wifi

* Changelog

* Clean up

* Add doc examples

* Fix Alarm generic parameters
2024-08-16 16:33:29 +00:00
Dominic Fischer
6e706c5f11
Improve SYSTIMER API (#1871)
* Improve SYSTIMER API

* Remove config object

* fix things

* Allow erasure of unit and comparator numbers

* Merge fail

---------

Co-authored-by: Dominic Fischer <git@dominicfischer.me>
2024-08-16 14:59:34 +00:00
Dániel Buga
eb1b295116
Do not reset UsbSerialJtag peripheral (#1961)
* Fix typos

* Add a function to detect debugger connection

* Do not reset USB peripheral

* Changelog

* Fix different register names

* Reuse xtensa_lx::is_debugger_attached
2024-08-16 14:51:34 +00:00
Fan Jiang
f6e69b06d0
Fix GPIO Touch pin I/O (#1956) 2024-08-16 12:39:20 +00:00
Dániel Buga
6127f5df11
Further clean up timers/executors test (#1953)
* Further clean up embassy_timers_executors

* Do not delay for so long

* Print timer values on assert failure

* Clean up some more

* Retry test a few times to counteract probe-rs halting us

* Fix formatting
2024-08-16 06:08:32 +00:00
Dániel Buga
a10f86dbaa
Clean up i2s_async test, add option to repeat (#1951)
* Simplify I2S async test

* Allow running tests repeatedly

* Fail at the first mismatch

* Clean up
2024-08-15 11:48:23 +00:00
Scott Mabin
361a6c58b7
make contribution docs more visible (#1947) 2024-08-15 07:58:06 +00:00
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