Commit Graph

1738 Commits

Author SHA1 Message Date
Jesse Braham
c55ef277d8 Add the ESP32-C2 to the CI workflow, update README 2022-10-11 10:12:42 -07:00
Jesse Braham
05fd5a64de Update dependencies, fix some errors after rebase, add RTC_CNTL 2022-10-11 10:12:42 -07:00
Jesse Braham
140333ff86 Begin adding some working examples 2022-10-11 10:11:36 -07:00
Jesse Braham
3019b78d6a Fix clock and GPIO drivers, add analog GPIO pins 2022-10-11 10:11:36 -07:00
Jesse Braham
f5f475923f Add startup code and build/linker scripts, add ADC, eFuse, GPIO, and TIMG 2022-10-11 10:11:36 -07:00
Jesse Braham
455965d471 Create the esp32c2-hal package and add it to the workspace
Add a feature for the ESP32-C2 to`esp-hal-common` and update some `cfg`s


Organize the `esp-hal-common` imports and exports and update to include the ESP32-C2
2022-10-11 08:03:43 -07:00
Björn Quentin
82c3ca29be
Merge pull request #198 from rustbox/opt-level-z-check-prototype
Check for opt-level="z" in `build.rs`, provide feedback about dangers
2022-10-11 16:56:21 +02:00
Andreas Hartmann
2b98932028 common/spi: Implement hardware CS
Removes a lot of generic arguments and hard-codes the `SpiBusController`
and `SpiBusDevice` to work with the `Spi<T>` defined in the HAL instead.
This allows us to access the `cs_signal()` trait function from `T:
Instance`, which we need to connect/disconnect the CS I/O as
appropriate.
2022-10-11 16:06:45 +02:00
Björn Quentin
ed9a074a46
Merge pull request #209 from luojia65/patch-1
crate: update riscv dependency crate to v0.9.0
2022-10-10 08:06:29 +02:00
Luo Jia / Zhouqi Jiang
efced81d94
crate: update riscv dependency crate to v0.9.0
The `riscv` crate has introduced several fixes which newer users would take advantage of (https://github.com/rust-embedded/riscv/pull/112)
2022-10-08 20:18:49 +08:00
Jesse Braham
4cc7ed5c0a Mention esp-template in the README 2022-10-06 19:02:17 +02:00
Björn Quentin
af745ac7b0
Fix ESP32-C3 interrupt/exception handling (#207)
* Fix ESP32-C3 interrupt/exception handling

* Use riscv-atomic-emulation-trap 0.2.0
2022-10-05 14:15:17 +01:00
sethp
3832008565
Merge branch 'main' into opt-level-z-check-prototype 2022-09-30 07:52:41 -07:00
sethp
11e988b8f0
Fix message spelling
supress -> suppress

Co-authored-by: Gustavo Henrique Nihei <38959758+gustavonihei@users.noreply.github.com>
2022-09-30 07:51:25 -07:00
Jesse Braham
5054681ba3 Update to newest embedded-hal alpha and add embedded-hal-nb 2022-09-29 16:07:49 +02:00
Björn Quentin
b91d57af88
Merge pull request #202 from jessebraham/fixes/println
Use `esp_println` in favour of the Serial peripheral wherever possible
2022-09-29 08:40:59 +02:00
Jesse Braham
d885054fd2 Use esp_println in favour of the Serial peripheral wherever possible 2022-09-28 13:09:06 -07:00
Jesse Braham
288ab12787 Add a section to the README listing some other useful crates 2022-09-28 17:59:56 +02:00
Seth Pellegrino
3f704eba0d Reword message to make it clear user code will also fail 2022-09-27 08:35:32 -07:00
Seth Pellegrino
c6ac87f4dc Add check for opt-level="z" for esp32c3 2022-09-26 11:01:25 -07:00
Jesse Braham
7889a992d7 Add cfg symbols for SYSTIMER and USB_SERIAL_JTAG peripherals 2022-09-20 16:41:39 +02:00
Björn Quentin
f0350d4ffb
Merge pull request #194 from JurajSadel/refactor/rmt
RMT: Shouldn't be possible to assign pins multiple times into channel
2022-09-20 13:03:15 +02:00
Juraj Sadel
0f9fdb7c15 RMT: Shouldn't be possible to assign pins multiple times into channel 2022-09-20 12:33:17 +02:00
Björn Quentin
b1d5e37f36
Merge pull request #193 from bjoernQ/prepare_esp32s2_wifi
ESP32-S2: add WiFi sections and fix linker script
2022-09-20 09:26:50 +02:00
bjoernQ
2afa38b240 ESP32-S2: add wifi sections and fix linker script 2022-09-19 09:14:22 +02:00
bjoernQ
6eea2f266a Prepare linker scripts for ESP32-S3 wifi 2022-09-14 17:58:40 +02:00
Jesse Braham
5ca771a12e
Inject configuration symbols in build script, simplify cfg gating (#187)
* Update the build script to inject a configuration value for the enabled chip

* Update all cfg gates to use the new symbols instead of the chip features

* Inject architecture and core count symbols as well, update as needed

* Organize the imports and exports of `esp-hal-common`
2022-09-14 07:46:23 -07:00
Jesse Braham
ee7e9bd0a1 Bump version numbers and update dependencies 2022-09-13 21:01:08 +02:00
Jesse Braham
252fa27c2e Change target_arch cfgs to chip features
This hopefully will allow the documentation's build to succeed on docs.rs, as it uses the `x86_64-unknown-linux-gnu` target by default
2022-09-13 19:46:41 +02:00
Björn Quentin
cfcadc882b
Merge pull request #184 from JurajSadel/refactor/adc
ADC: Add compile time check for using unconfigured PIN, add AdcPin wr…
2022-09-13 13:31:10 +02:00
Juraj Sadel
3ebfbc44c3 ADC: Add compile time check for using unconfigured PIN, add AdcPin wrapper around PIN 2022-09-13 08:41:04 +02:00
Björn Quentin
da3ec47b30
Merge pull request #183 from bjoernQ/esp32-linkerscripts-adjustments
Prepare for updated wifi drivers
2022-09-09 12:43:35 +02:00
bjoernQ
c28f44e0dc Prepare for updated wifi drivers 2022-09-09 11:05:26 +02:00
9names
c896e6c8d2 Fixed defmt on direct-boot mode 2022-09-07 06:20:24 +02:00
Björn Quentin
dd1f94f347
Merge pull request #181 from JurajSadel/refactor/LEDC_ctor
Make it impossible to create multiple instances of LEDC
2022-09-06 11:50:43 +02:00
Juraj Sadel
f11a23dddb Make it impossible to create multiple instances of LEDC 2022-09-06 11:37:05 +02:00
Juraj Sadel
e9f22aca63
Merge pull request #176 from bjoernQ/bugfix/pin-paste-to-fix-sudden-build-errors
Pin version of paste to fix build errors
2022-08-31 16:28:03 +02:00
bjoernQ
b9f38aae7c Pin version of paste to fix build errors 2022-08-31 11:28:42 +02:00
Jesse Braham
797d9b5e02 Minor CI tweaks 2022-08-30 11:32:31 -07:00
har7an
8b9fd8b7a0
embedded-hal SpiDevice on all esp32 variants (#106)
* WIP: common/spi: Implement `SpiDevice`

to get shared access to an SPI bus directly via the HAL.

* WIP: common/spi: add SpiBusDevice::new

to create instances via a function call.

* esp32/examples: Add example for spi device trait

* common/spi: Finish "SpiDevice" implementation

for esp32. Abandons the approach of having the user pass in some generic
mutex in favor of creating the Mutex as part of the API so it isn't
exposed to the user in the first place.

* common/spi: Add more thorough docs

* esp32/examples: Fix example for eh1 "SpiDevice"

* common/spi: Implement `SpiDevice` for xtensa arch

and move the code into a submodule that is fenced with conditional
compilation directives.

* esp32/examples: Update spi device example

to the changed APIs for the timers and clocks, and add more transmission
tests to the example code.

* common/spi: Create devices from buscontroller

directly, instead of offering only the `new` method.

* common/spi: Finish `SpiBusDevice` trait

from embedded-hal 1.0.0-alpha.8.

* esp32: Update `SpiBusDevice` usage example.

* common/spi: Fix mutex types for xtensa32 esp

because the esp32/esp32s3 can use `SpinLockMutex`, whereas the esp32s2
has access only to `CriticalSectionMutex`.

* common/spi: Implement `SpiBusDevice` for riscv

based esp32c3.

* general: Add examples for spi device loopback

to all esp variants.

* common: Use esp_backtrace in spi_eh1_device examples

* common/spi: Update module documentation.

* common/spi: Use `critical_section::Mutex`

to unify locking across all esp variants.

* esp32c3-hal: Fix spi device example

* esp32c3/examples: Fix typo in used spi pins

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>

Co-authored-by: Jesse Braham <jessebraham@users.noreply.github.com>
2022-08-30 06:55:53 -07:00
Björn Quentin
46a8470ff5
Merge pull request #173 from JurajSadel/fix/floats
Replace all float calculations with fixed ones
2022-08-30 15:23:56 +02:00
Juraj Sadel
9911a1e359 Replace all float calculations with fixed ones 2022-08-30 13:43:48 +02:00
Björn Quentin
32368c6b2b
Merge pull request #171 from maximeborges/features/gpio_into
gpio: Impl From<>
2022-08-29 08:25:03 +02:00
Maxime Borges
04c8721e60 gpio: Impl From<> 2022-08-28 01:22:33 +02:00
Jesse Braham
36e13b0d7c Bump esp32-hal version number to 0.4.0 2022-08-25 09:48:01 -07:00
Jesse Braham
6f20358124
Update the Cargo manifests and top-level README (#168)
* Add the `rust-version` key to each Cargo manifest

* Normalize dependencies and features in each Cargo manifest

* Enable all features in CI when checking examples

* Update the top-level README
2022-08-25 09:20:05 -07:00
Scott Mabin
b30886cce6
Periodic system timer & esp32s2 fixes & edge interrupt fixes (#167)
* Add Periodic mode to SYSTIMER

* Deduplicate shared code in SYSTIMER

* esp32s2 edge mode systimer interrupt

- Make systimer interrupts edge mode
- fix examples for s3 & s2

* Fix TPS for esp32s2, clean up examples
2022-08-25 07:13:56 -07:00
bjoernQ
5e6234dcc4 Fix embedded-hal 0.2.x SPI implementation 2022-08-24 19:49:47 +02:00
Scott Mabin
4c943378f8 Use vscode multi-root ws for esp-hal 2022-08-23 21:24:04 +02:00
Björn Quentin
22ac479bff
Optimize the ESP32-S3 linker script (#164)
* Optimize the ESP32-S3 linker script

* Incorporate suggestions from review

* Extend the size of dram_seg as suggested in the review
2022-08-23 08:00:20 -07:00