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
2022-02-05 18:57:46 +02:00
2022-11-04 09:37:57 +02:00
2022-01-19 21:35:44 +02:00
2022-05-02 15:45:49 +03:00
2022-11-08 18:27:37 +02:00
2021-08-31 21:21:41 +03:00
2021-08-31 21:21:41 +03:00

An embedded-hal implementation for ESP32[-XX] + ESP-IDF

CI Documentation

  • This crate is intended for usage in ESP32[-XX] embedded projects that utilize and link with the ESP-IDF SDK.
  • For embedded projects that don't need Rust STD support, WiFi or BLE (and thus don't link with the ESP-IDF SDK), please check esp-hal.

For more information, check out:

Hardware Notes

Each chip has a number of GPIO pins which are generally used by the SPI0 and SPI1 peripherals in order to connect external PSRAM and/or SPI Flash memory. The datasheets explicitly state that these are not recommended for use, however this crate includes them anyways for completeness.

Please refer to the table below to determine the pins which are not recommended for use for your chip.

Chip GPIOs
ESP32 6 - 11, 16 - 17
ESP32-C3 12 - 17
ESP32-S2 26 - 32
ESP32-S3 26 - 32, 33 - 37*

* When using Octal Flash and/or Octal PSRAM

Examples

The examples could be built and flashed conveniently with cargo-espflash. To run ledc-simple on an ESP32-C3:

$ cargo espflash --release --target riscv32imc-esp-espidf --example ledc-simple --monitor /dev/ttyUSB0

In order to run the examples on other chips you will most likely need to adapt at least the used pins.

Description
embedded-hal implementation for Rust on ESP32 and ESP-IDF
Readme 20 MiB
Languages
Rust 100%