19 Commits

Author SHA1 Message Date
ivmarkov
6eeeae1018 Use better pins for esp32 2023-10-16 19:27:53 +00:00
ivmarkov
bb92e2a47e Async examples 2023-10-14 07:36:30 +00:00
ivmarkov
8cc193aa35
TWAI driver async hack; examples cleanup (#292)
* Hacky async TWAI driver

* Async TWAI: Custom priority and pin to core

* Async TWAI: Proper configuration of alerts

* Do not refer to esp-idf-sys as it is not an explicit dependency anymore
2023-08-27 10:47:18 +03:00
ivmarkov
ba9cc4246a Interrupt flags 2023-05-13 10:07:38 +00:00
Frederick Vollbrecht
b739c46b12
Embedded-Hal PR - incoorparate e-hal master changes in spi / i2c / gpio / delay (#224)
* embedded-hal::delay no longer returns Error

* embedded_hal::digital add generic GpioError

* spi: init work: from closure to Operation pattern

* first full implementation

* i2c: remove iter fn droped by e-hal master

* make ci work by temp. refere to e-hal master

* more ci fix

* make clippy happy

* more ci fighting

* gpio: cursed repair of ulp_processor

* fmt

* spi: repair example + get rid of generic's

* dep: change to new e-hal release

* fix e-hal 0.2 comp &  fix bus

* fmt

* clippy

* remove debug artifacts

* test ci with e-hal-nb-alpha.1

* e-hal-nb to alpha.2

* modified comments

* impl e-hal delay to general purpose provider

* use embedded_hal_error macro for riscv-ulp-hal

* typo

* impl pwm alpha10

* fixed wrong return error on async gpio

* duplicated impl error macro for ulp
2023-05-08 20:59:45 +03:00
Ivan Markov
81a7e3d84c clippy 2022-12-04 16:21:28 +00:00
ivmarkov
5667be95ac Fix examples 2022-11-12 16:25:38 +02:00
ivmarkov
555dfafec6 Fix the SPI example 2022-11-12 14:26:10 +02:00
ivmarkov
35609be6b6 Convenience methods and types for the single SPI device case 2022-11-12 13:48:23 +02:00
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
d6370068ef Move all peripheral generics into the constructors 2022-11-01 10:00:24 +02:00
Ronen Ulanovsky
db54a533b1 Fixup riscv-ulp-hal delay and examples 2022-10-07 20:53:26 +03:00
Ivan Markov
21fb86b36b Fix examples
Fix examples
2022-09-18 11:01:33 +03:00
Ivan Markov
9a1ade644f Update examples
Restore LedcTimerDriver

Fix the ledc driver code
2022-09-18 11:01:33 +03:00
Brendan Horan
076390200a
Fix SPI loopback exmaple -- mixed up SDI and SDO (#72)
* Fix SPI loopback exmaple

Fix SDI and SDO been mixed up in example
Update to new names

* change SPI println back to orignal

* run cargo fmt
2022-05-16 13:52:58 +01:00
Dominic Fischer
b134d3dbc6
Migrate to e-hal 1.0.0-alpha.8 (#61)
* Migrate e-hal 1.0.0-alpha.8

* Implement SpiDevice trait

* Fix bugs after real testing

* Fix transfer
2022-04-17 08:14:39 +03:00
ivmarkov
a47d38b919 Remove esp_idf_svc references from examples 2022-02-20 19:26:37 +02:00
ivmarkov
36e146c615 Remove the esp-idf-svc dependency 2022-02-20 18:18:27 +02:00
Björn Quentin
e57736e4c2
Add some basic examples (#46) 2022-02-20 15:14:36 +02:00