daqhats-rs
Rust bindings for the MCC DAQ HAT Library, providing access to Measurement Computing Corporation's data acquisition HAT devices for Raspberry Pi.
Supported Devices
- MCC 118: 8-Channel Analog Input HAT
- MCC 128: 8-Channel Analog Input HAT with thermocouple support
- MCC 134: 4-Channel Thermocouple Input HAT
- MCC 152: 2-Channel Analog Output / 8-Channel Digital I/O HAT
- MCC 172: 2-Channel 24-bit Sigma-Delta A/D HAT
Platform Requirements
This library is designed for Raspberry Pi systems with MCC DAQ HAT hardware installed. The underlying C library requires:
- Raspberry Pi OS (or compatible Linux distribution)
- GPIO access and hardware drivers
libgpiodlibrary
Installation
Add this to your Cargo.toml:
[]
= "0.1"
Usage
use *;
Safety
This library provides direct bindings to the C library, so most functions are marked as unsafe. Users should:
- Be familiar with the MCC DAQ HAT C library documentation
- Implement proper error handling
- Follow the C library's usage patterns and constraints
Building
The library will automatically:
- Generate Rust bindings from C headers using
bindgen - On Raspberry Pi (ARM/AArch64): Compile the C library and link against it
- On other platforms: Generate bindings only (for development)
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.