390 Commits

Author SHA1 Message Date
Frederick Vollbrecht
13ba61fb0b
RFC: Multi CS Spi Implementation (#150)
* initial draft

* working alternative without using i32 id's

* EspSpiDevice + SpiDriverMaster / no global statics

* start splitting implementation in spi & spi_pool

* impl SpiDevice for EspSpiDevice

* spi2_pool draft (spi with software based cs)

* pre master fetch up

* Driver accepts Optional DMA channel + fetch master

* replaced: std with core, mutex with hal's cs

* replaced HashMap with Array

* merged spi2 into spi

* clean up

* replace std with core

* updated loopback example,  spi takes dma directly

* moved criticalsection guard out of spi to spi_pool

* added paragraph to the release.md

* rm fn to add / rm device from bus or update config

* rm stored config from EspSpiDevice

* fmt'd

* grammer + changelog update

* implements inverted chipselect for spi.rs #119

* device with optional cs + guarded soft_cs wrapper

* fmt'd

* add pre / post cs delay functionality for wrapper

* no bus.finish for dev with no cs. partial fix #99

* spi driver renaming

* updated naming + locking with &mut SpiDeviceDriver

* updated naming + locking with &mut SpiDeviceDriver

* clean up

* updated CHANGELOG
2022-11-12 08:54:16 +02:00
ivmarkov
7220534544 Merge branch 'master' of https://github.com/esp-rs/esp-idf-hal 2022-11-10 20:35:50 +02:00
ivmarkov
296ec46065 Fix a typo 2022-11-10 20:35:38 +02:00
monacoprinsen
8cd8c8c207
spi/adc_st7789_example (#125)
* spi_st7789_example

* added adc example

* added ADC example

* spi and adc examples

* updated adc_st7789 example

* removed st7789 adc example

* adc up to date

* clippy and fmt

* added dependencies

* adjusted path to assets

* changed adc pin

* added compile flags

* path
2022-11-08 18:27:37 +02:00
ivmarkov
0c3a17b436 Changelog 2022-11-04 13:09:07 +02:00
ivmarkov
d700d90b23 Changelog 2022-11-04 13:00:02 +02:00
ivmarkov
d09fff3a8f Fix for ESP IDF 5 2022-11-04 09:37:57 +02:00
ivmarkov
826164d31d Pick better names to make the purpose clearer 2022-11-03 20:05:02 +02:00
ivmarkov
9b53eef25a Do not use nightly features 2022-11-03 20:04:25 +02:00
Ronen Ulanovsky
ba0f427f74 add speed mode enum, allow lpoint < hpoint < max_duty as it's explicitly supported by the chip 2022-11-02 16:27:07 +02:00
ivmarkov
1d01dfcaa9 Move all peripheral generics into the constructors 2022-11-01 12:16:00 +02:00
ivmarkov
d59ef18065 Merge branch 'master' of https://github.com/esp-rs/esp-idf-hal 2022-11-01 10:00:36 +02:00
ivmarkov
d6370068ef Move all peripheral generics into the constructors 2022-11-01 10:00:24 +02:00
Benoît Peccatte
391b63e9d7 Add half duplex and 3wire mode support to SPI 2022-10-31 11:32:12 +02:00
Kevin J. Lynagh
59629c8b49 Remove incorrect documentation about calling set_high/set_low to set initial output level.
These methods cannot be called until the pin is already converted into a type which implements OutputMode, and all those functions end up invoking `gpio_set_direction` and thus driving the pin.
2022-10-29 17:19:15 +03:00
Kevin J. Lynagh
5ad3de897c Remove incorrect docstring for gpio's into_input_output.
This sets mode to push/pull, not open drain.
2022-10-29 17:19:15 +03:00
ivmarkov
de60a903ac Switch to embassy-sync from crates.io 2022-10-26 23:24:04 +03:00
ivmarkov
af76934c52 leave out only the driver & queue impl based on ESP IDF timer service 2022-10-18 15:00:05 +03:00
ivmarkov
a8318018f0 Move cs::CriticalSection to the task module 2022-10-18 14:47:31 +03:00
ivmarkov
f1ebc6102d Latest edge-executor support 2022-10-17 11:11:24 +03:00
Ronen Ulanovsky
ad9fa1daa5 Add HPoint control to LEDC 2022-10-16 23:07:09 +03:00
ivmarkov
9a17a18723 make clippy happy 2022-10-09 11:44:04 +03:00
Ronen Ulanovsky
db54a533b1 Fixup riscv-ulp-hal delay and examples 2022-10-07 20:53:26 +03:00
Ronen Ulanovsky
d68d1db958 Migrate to embedded-hal 1.0.0-alpha.9 2022-10-07 20:53:26 +03:00
Ronen Ulanovsky
472ae286c4 fix Modem::split_ref 2022-10-03 21:22:03 +03:00
ivmarkov
f6916846bf Merge branch 'master' of https://github.com/esp-rs/esp-idf-hal 2022-09-28 21:19:24 +03:00
ivmarkov
98a7a2adae more ergonomic SPI constructor 2022-09-28 21:19:16 +03:00
Kevin J. Lynagh
74134b0604 Implement uart2 for esp32-s3. 2022-09-28 18:49:17 +03:00
ivmarkov
a964d431e4 compat with latest embassy 2022-09-27 18:11:19 +03:00
ivmarkov
46c9ff7753 Sleep wakeup reason 2022-09-25 13:18:35 +03:00
ivmarkov
22ab6f272a Native delay API does not need self 2022-09-25 12:17:59 +03:00
ivmarkov
83c1ebf4b7 Native delay API does not need self 2022-09-25 12:00:51 +03:00
ivmarkov
f094e1c688 Native delay API does not need self 2022-09-25 11:11:02 +03:00
ivmarkov
574e9764e7 Native delay API does not need self 2022-09-25 11:08:08 +03:00
ivmarkov
bdd6205a09 Replace STD delays with HAL ones 2022-09-25 10:44:24 +03:00
ivmarkov
ace34ce3e5 Remove unused imports 2022-09-25 10:42:13 +03:00
ivmarkov
98b3d98884 Fix the i2c example 2022-09-25 10:41:46 +03:00
ivmarkov
d8103637ae better handling of timeouts 2022-09-25 10:25:52 +03:00
ivmarkov
341fc871d7 restart method 2022-09-22 10:31:44 +03:00
Cody P Schafer
5d463c8c1d reset_reason: add docs, use unreachable!(), use associated pub fn get() 2022-09-22 10:25:40 +03:00
Cody P Schafer
17ca230b65 reset_reason: panic!() on unhandled esp_reset_reason_t instead of implimenting an error type 2022-09-22 10:25:40 +03:00
Cody P Schafer
961cd10b98 reset_reason: wrap esp_reset_reason()
Primarily useful because this gives me a readable `Debug` impl for the
reset reason. There may be a way to have `esp-idf-sys` generate some
more reasonable code as an alternative.
2022-09-22 10:25:40 +03:00
ivmarkov
306653e125 Fix formatting 2022-09-22 09:56:04 +03:00
ivmarkov
c4af9ab23b Merge branch 'master' of https://github.com/esp-rs/esp-idf-hal 2022-09-22 09:35:06 +03:00
ivmarkov
0a2687234a Rename Config back to TransmitConfig 2022-09-22 09:34:58 +03:00
Michael Heinrichs
84a5fd9f74 Fix wrong behavior of i2c-master transaction 2022-09-22 09:28:21 +03:00
ivmarkov
0fa24400cf Type-aliasing Rtos is backwards-incompatible change 2022-09-22 09:21:21 +03:00
ivmarkov
8c0e93ab72 Abbreviate 2022-09-20 14:23:29 +03:00
ivmarkov
db3e7eaeb2 embassy_time impl bugfixing 2022-09-20 08:43:54 +03:00
ivmarkov
997f6a1844 improve casting 2022-09-20 08:43:40 +03:00