14 Commits

Author SHA1 Message Date
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
Mikael Lund
091128a282
Refactor Rgb struct (#265)
* Refactor Rgb struct

Moves hsv convertion into
an associated function and further
implements From<Rgb> for u32.

* Update rmt_neopixel.rs

* Replace if-else with pattern matching
2023-06-22 18:31:54 +03:00
ivmarkov
ba9cc4246a Interrupt flags 2023-05-13 10:07:38 +00:00
Sergio Gasquez Arcos
061a234ba9
Update ledc examples names (#214)
* style: 🎨 Rename ledc examples to be consistent

* docs: 📝 Update rust-board name
2023-03-08 07:43:02 +02:00
Adam Mashrique
28a3aad231
Correct endianness of RMT signal in neopixel example (#195)
* Correct endianness of RMT signal

Bits were sent reversed, which worked for 0xff but not at smaller values to dim the LED. Also added rainbow example using a hsv function.

* cargo fmt

* Removed logger and fixed delays
2023-01-14 12:49:55 +02:00
enelson1001
8e312529b9
Add RMT receiver (#104)
* Add RMT receiver

* Changed line 891 to rmt_item32_t,
Changed line 835 to carrier_rm

* rmt.rs - changed line 891 to rmt_item32_t
rmt.rs - changed line 835 to carrier_rm

* Changed rmt channel implementation

* wrong rx_config_t field name

* More cleanup from rebase

* Fix cargo fmt check errors

* guess #1 to fix errors

* Try to fix clippy error

* Can't use log change to println
Change gpio pins for esp32-c3

* old update to esp-idf-hal newer one coming

* Fix format errors

* Update TxRmtDriver and RxRmtDriver

* Fix compile errors

* fix rmt_morse_code.rs error

* Fix format failure

* Fix more errors

* Fix examples

* Change PulsePair durationX type
 - use u16 instead of PulseTicks

Co-authored-by: enelson1001 <ednelson5080@gmail>
2022-11-12 13:01:37 +02:00
Ronen Ulanovsky
db54a533b1 Fixup riscv-ulp-hal delay and examples 2022-10-07 20:53:26 +03:00
ivmarkov
22ab6f272a Native delay API does not need self 2022-09-25 12:17:59 +03:00
ivmarkov
f094e1c688 Native delay API does not need self 2022-09-25 11:11:02 +03:00
ivmarkov
0a2687234a Rename Config back to TransmitConfig 2022-09-22 09:34:58 +03:00
Ivan Markov
baf9bae9a9 Fix examples
Fix examples

Fix examples

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
gak
2b6fe48fa0
WIP: RMT (tx) (#44)
* WIP: Initial tx rmt implementation

* Rename Bulder to Config to line up with other mods

* WIP Potential traits for a "pulses" mod in embedded-hal

* WIP: Initial tx rmt implementation

* Rename Bulder to Config to line up with other mods

* WIP Potential traits for a "pulses" mod in embedded-hal

* Copied example code from ledc fork. Semi-working example.

* Rename level to pulse. dev-dep versions.

* WIP RMT, Examples

* WIP RMT Fix neopixel example

* WIP RMT morse code work

* WIP RMT fixed morse example

* WIP RMT more config, docs.

* WIP RMT fix compilation

* WIP RMT Fix doc comment in example.

* WIP RMT: notes on examples

* WIP RMT Group up same level config items.

* WIP RMT Change half_inserted to an Option

* WIP RMT Don't need to return Result in clear()

* WIP RMT Config refactor. Into for enum.

* Result instead of Option in PulseTick

* Don't use floats for ticks calcs

* WIP Duration for ticks

* Cleanups.

* Moved Duration logic into PulseDuration.

* Remove unused tick_hz field.

* Cleanups.

* WIP playing around with generics

* Refactored out Vec storage out of Writer

* WIP Heap and Stack implementations for data

* WIP about to nuke tricky const code

* Cleanups

* Own PinState. start/start_blocking.

* Wrap duty percent with range safety.

* Use units::Hertz

* Use Hertz in ticks_hz

* Stop transmitting implementation

* Fix morse example

* rmt peripheral for channels (4 for now)

* Small tweaks

* Morse example to demo more functionality

* WIP Fixes and testing functionality

* Cleanups and notes

* Assign devices to number of channels. Cleanups.

* Sprinkled TODO's around for docs/fixes

* Longer messages don't repeat so remove it for now

* Rename data to signal because data is a too generic term

* More docs

* Don't mention receiving in description.

* More docs

* Rename `add` to `push` like Vec. More docs.

* Rename `Writer` to `Transmit` to line up with rmt docs.

* Accidentally had idle_level in carrier config.

* More docs and cleanups. std compatibility.

* Remove chip::HwChannel import because of a * import later.

* Separate duration to ticks calc. Music example.

* Added comment on example.

* clippy: ok_or_else, Default.

* fixes: mut self, allows/features, alloc, &Pulse.

* only need feature alloc for the use warning.

* rename Signal implementations

* Alloc, morse example fix.

* Didn't need that map. iter does the ref.

* Clippy repairs. println! instead of info!
2022-03-02 19:11:30 +02:00