dac8568
A platform agnostic library for the Texas Instruments DAC8568.
features
- Support for Texas Instruments DAC8568
- Limited subset of DAC8568 features supported
- Full no-std support
- Implemented with
embedded-hal
(https://docs.rs/embedded-hal/0.2.3/embedded_hal) - Blocking and non-blocking support
example
Note: Quick example based on the stm32h7xx-hal
.
// Initialise NSS for SPI communications
let spi = ...;
let nss = nss.into_push_pull_output;
// Initialize the dac instance
let mut dac = new;
dac.enable;
// Get a "write" message to set the voltage of a given channel
let message = get_write_message;
// Now transfer the data either as a blocking call
dac.write_blocking.unwrap;
// or prepare the data for a DMA transfer
dac.prepare_transfer;