🛡️ eldritch_shield
Eldritch Shield is a Rust library for interfacing with the Blackmagic Design 3G-SDI Shield for Arduino over I²C.
It provides a safe, high-level API for controlling and querying the shield’s peripheral functions, while remaining agnostic of the underlying I²C transport implementation.
Designed to integrate cleanly with eldritchwire or any existing I²C client.
✨ Features
- 🧩 Transport-agnostic: works with any I²C client —
linux-embedded-halorrppal, custom hardware clients, or mocks for testing. - 🧠 Strongly typed API: interact with camera control and SDI features using well-defined Rust types.
- ⚙️ Blackmagic-specific: implements the protocol for the Blackmagic 3G-SDI Shield for Arduino.
- 🧪 Test-friendly: easy to mock the transport layer for integration testing.
🚀 Example
use ;
use I2cdev;
🧱 Architecture
eldritch_shield/
├── src/
│ ├── lib.rs # Crate entry point
│ ├── traits.rs # I²C transport abstraction
│ ├── shield.rs # High-level Blackmagic-specific logic
│ ├── registers.rs # Register constants
│ └── errors.rs # Unified error type
I2cTransporttrait: abstracts read/write operations, allowing pluggable backends.EldritchShieldstruct: encapsulates all shield functionality.PeripheralError: unifies I²C transport and device-specific errors.
🔌 Transport Abstraction
Eldritch Shield doesn’t implement its own I²C driver. Instead, it defines a small trait you can implement for any backend:
Implement this for your own I²C layer, and you’re ready to go.
🧩 Integration with eldritchwire
eldritchwire handles Blackmagic SDI camera control protocol parsing and serialization.
eldritch_shield handles the physical I²C link to the 3G-SDI Shield.
Together, they form a full control pipeline:
Camera Control ⇄ eldritchwire ⇄ eldritch_shield ⇄ I²C Transport ⇄ SDI Shield ⇄ Camera
📦 Installation
Add to your Cargo.toml:
[]
= "0.1"
🛠️ Development
Build
Test
Lint & Format
🧰 Future Plans
- Implement support for non-default I2C addressing for rppal transport
- Add async support via
embedded-hal-async - Provide helper methods for camera control commands
- Integrate better with
eldritchwiremessage types - Support multi-shield configurations
📖 References
- Blackmagic Design 3G-SDI Shield Developer Manual (PDF)
- Blackmagic Camera Control Protocol
- Eldritchwire crate (Camera Control Protocol)
Eldritch Shield — a conduit between Rust and the arcane depths of Blackmagic hardware.