Skip to content

Instantly share code, notes, and snippets.

View jessebraham's full-sized avatar
🙃

Jesse Braham jessebraham

🙃
View GitHub Profile
use embedded_hal::adc::{Channel, OneShot};
/// The ESP8266 has only a single ADC channel, which is multiplexed with the
/// system voltage. You can use the ADC to read an external voltage, or read
/// the system voltage (VDD33), but not both.
#[derive(Debug, Copy, Clone)]
pub enum AdcMode {
External,
Vdd33,
}
diff --git a/src/main.rs b/src/main.rs
index 5a5df71..c320df1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -127,7 +127,7 @@ pub struct UninstallOpts {
}
/// Installs the Rust for ESP chips environment
-fn install(args: InstallOpts) -> Result<()> {
+fn install(args: InstallOpts) -> Result<(), Error> {
jesse@mbp ~/W/esp-wifi git:main [ ✚ ✎ ⚑ ] +
🦀 nightly@1.67.0 λ SSID="******" PASSWORD="******" cargo "+nightly" build --example dhcp --release --target riscv32imc-unknown-none-elf --features "esp32c3,embedded-svc,wifi"
Updating git repository `https://github.com/esp-rs/esp-hal/`
Updating crates.io index
Compiling proc-macro2 v1.0.43
Compiling memchr v2.5.0
Compiling unicode-ident v1.0.3
Compiling quote v1.0.21
Compiling syn v1.0.99
Compiling regex-syntax v0.6.27

Bare-Metal RUWM

Can we use RUWM as an ongoing litmus test for our bare-metal portfolio readiness?

Stuff that RUWM core would need to run on bare-metal:

  • An executor - can be either embassy-executor or edge-executor (as ESP bare-metal has a generic allocator now) and we can make it configurable
  • Blocking or async drivers for SPI, I2C, one-shot calibrated ADC and pin peripherals (pin peripherals need interrupt support)
    • Blocking drivers
      • ADC
  • Need to implement calibration

Organization Overview - esp-rs

January, 2023

This a collection of repositories from within the esp-rs organization that I feel are the main points of interest. I've included any ongoing projects as much as possible.

A repository be omitted from this list does not mean that it is not important or useful, only that it requires much less development effort than other projects.

HARDWARE SUPPORT

jesse@mbp ~
λ espup update
[2023-01-20T15:19:24Z WARN ] ⚠️ A new version of espup ('v0.2.6') is available.
[2023-01-20T15:19:24Z INFO ] 💽 Updating ESP Rust environment
Error: espup::config::file_not_found
× ⛔ No config file found in '/Users/jesse/Library/Application Support/rs.esp.espup/espup.toml'
jesse@mbp ~
jesse@mbp ~/W/esp-riscv-rt git:main [ ✔ ⚑ ]
🦀 nightly@1.69.0 λ cargo publish --dry-run
Updating crates.io index
Packaging esp-riscv-rt v0.1.0 (/Users/jesse/Work/esp-riscv-rt)
Verifying esp-riscv-rt v0.1.0 (/Users/jesse/Work/esp-riscv-rt)
Compiling proc-macro2 v1.0.49
Compiling quote v1.0.23
Compiling unicode-ident v1.0.6
Compiling syn v1.0.107
Compiling nb v1.0.0
DEBUG probe_rs::probe::cmsisdap::tools > Searching for CMSIS-DAP probes using libusb
DEBUG probe_rs::probe::cmsisdap::tools > Found 0 CMSIS-DAP probes using libusb, searching HID
DEBUG probe_rs::probe::cmsisdap::tools > Found 0 CMSIS-DAP probes total
DEBUG jaylink > libusb 1.0.26.11724
DEBUG jaylink > libusb has capability API: true
DEBUG jaylink > libusb has HID access: false
DEBUG jaylink > libusb has hotplug support: true
DEBUG jaylink > libusb can detach kernel driver: true
DEBUG jaylink > open_usb: device descriptor: DeviceDescriptor {
bLength: 0x12,
espefuse.py v4.7.dev3
Connecting...
Detecting chip type... ESP32-C3
=== Run "summary" command ===
EFUSE_NAME (Block) Description = [Meaningful Value] [Readable/Writeable] (Hex Value)
----------------------------------------------------------------------------------------
Calibration fuses:
K_RTC_LDO (BLOCK1) BLOCK1 K_RTC_LDO = 48 R/W (0b0001100)
K_DIG_LDO (BLOCK1) BLOCK1 K_DIG_LDO = -20 R/W (0b1000101)