1 unstable release

0.1.0 Feb 7, 2021

#1106 in Embedded development

MIT license

33KB
920 lines

WM8731

A simple HAL for the Cirrus Logic/Wolfson WM8731 audio codec IC.


lib.rs:

A simple HAL for the Cirrus Logic/Wolfson WM8731 audio codec

This crate provides simple abstractions for the various control registers on the WM8731.

Each function returns a Register struct, representing the address and value for the register. With the exception of active and reset, registers accept a function for configuration.

For example, to power on/off certain features, we can call power_down:

WM8731::power_down(|c| {
    c.line_input().power_off();
    c.adc().power_off();
    c.dac().power_off();
});

No runtime deps