set shell := ["bash", "-cu"]

# ESP docs only
update-docs-esp:
    ./scripts/update-docs.sh

# ESP docs fast path (no extra validation/generation steps)
update-docs-esp-fast:
    source "$HOME/export-esp.sh" && cargo doc --no-deps --release --target riscv32imac-unknown-none-elf --features doc-images --no-default-features

# Build docs and open them in a browser
show-docs-esp:
    just update-docs-esp
    ./scripts/open-docs-esp.sh

attach-esp:
    source "$HOME/export-esp.sh" && espflash monitor

blinky-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example blinky --target xtensa-esp32s3-none-elf --release --no-default-features

blinky-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example blinky --target xtensa-esp32s3-none-elf --release --no-default-features

led2d-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example led2d --target xtensa-esp32s3-none-elf --release --no-default-features

led2d-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example led2d --target xtensa-esp32s3-none-elf --release --no-default-features

led-example1-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example led_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

led-example1-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example led_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

led-strip8-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example led_strip_len8 --target xtensa-esp32s3-none-elf --release --no-default-features

led-strip8-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example led_strip_len8 --target xtensa-esp32s3-none-elf --release --no-default-features

button-read-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example button_read --target xtensa-esp32s3-none-elf --release --no-default-features

button-read-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example button_read --target xtensa-esp32s3-none-elf --release --no-default-features

button-example1-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example button_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

button-example1-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example button_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

wifi-auto-example1-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example wifi_auto_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

wifi-auto-example1-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example wifi_auto_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

ir-example1-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example ir_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

ir-example1-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example ir_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

ir-mapping-example1-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example ir_mapping_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

ir-mapping-example1-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example ir_mapping_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

ir-kepler-example1-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example ir_kepler_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

ir-kepler-example1-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example ir_kepler_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

rfid-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example rfid --target xtensa-esp32s3-none-elf --release --no-default-features

rfid-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example rfid --target xtensa-esp32s3-none-elf --release --no-default-features

flash-block-example1-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example flash_block_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

flash-block-example1-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example flash_block_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

clock-led8x12-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example clock_led8x12 --target xtensa-esp32s3-none-elf --release --no-default-features

clock-led8x12-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example clock_led8x12 --target xtensa-esp32s3-none-elf --release --no-default-features

clock-led4-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example clock_led4 --target xtensa-esp32s3-none-elf --release --no-default-features

clock-led4-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example clock_led4 --target xtensa-esp32s3-none-elf --release --no-default-features

clock-servos-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example clock_servos --target xtensa-esp32s3-none-elf --release --no-default-features

clock-servos-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example clock_servos --target xtensa-esp32s3-none-elf --release --no-default-features

clock-lcd-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example clock_lcd --target xtensa-esp32s3-none-elf --release --no-default-features

clock-lcd-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example clock_lcd --target xtensa-esp32s3-none-elf --release --no-default-features

servo-basic-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example servo_basic --target xtensa-esp32s3-none-elf --release --no-default-features

servo-basic-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example servo_basic --target xtensa-esp32s3-none-elf --release --no-default-features

servo-example1-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example servo_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

servo-example1-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example servo_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

servos-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example servos --target xtensa-esp32s3-none-elf --release --no-default-features

servos-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example servos --target xtensa-esp32s3-none-elf --release --no-default-features

servo-player-example1-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example servo_player_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

servo-player-example1-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example servo_player_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

servo-player-example2-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example servo_player_example2_trait --target xtensa-esp32s3-none-elf --release --no-default-features

servo-player-example2-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example servo_player_example2_trait --target xtensa-esp32s3-none-elf --release --no-default-features

wifi-scan-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example wifi_scan --target xtensa-esp32s3-none-elf --release --no-default-features

wifi-scan-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example wifi_scan --target xtensa-esp32s3-none-elf --release --no-default-features

audio-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example audio --target xtensa-esp32s3-none-elf --release --no-default-features

audio-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example audio --target xtensa-esp32s3-none-elf --release --no-default-features

audio-example1-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example audio_example1 --target xtensa-esp32s3-none-elf --release --no-default-features

audio-example1-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example audio_example1 --target xtensa-esp32s3-none-elf --release --no-default-features

lcd-text-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example lcd_text --target xtensa-esp32s3-none-elf --release --no-default-features

lcd-text-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example lcd_text --target xtensa-esp32s3-none-elf --release --no-default-features

lcd-texts-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example lcd_texts --target xtensa-esp32s3-none-elf --release --no-default-features

lcd-texts-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example lcd_texts --target xtensa-esp32s3-none-elf --release --no-default-features

lcd-text-example1-trait-s3:
    source "$HOME/export-esp.sh" && cargo +esp run -Z build-std=core,alloc --example lcd_text_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features

lcd-text-example1-trait-s3-check:
    source "$HOME/export-esp.sh" && cargo +esp check -Z build-std=core,alloc --example lcd_text_example1_trait --target xtensa-esp32s3-none-elf --release --no-default-features
