#embedded-hal-driver #gpio #74hc

no-std cd74hc4067

A platform agnostic driver to interface with CD74HC4067

4 releases (2 breaking)

new 0.4.1 Jan 7, 2025
0.4.0 Jan 7, 2025
0.2.0 Feb 2, 2021
0.1.0 Jan 14, 2021

#287 in Embedded development

Download history 9/week @ 2024-09-22 2/week @ 2024-09-29 4/week @ 2024-10-13 4/week @ 2024-11-03 1/week @ 2024-12-08 183/week @ 2025-01-05

183 downloads per month

MIT license

15KB
286 lines

Rust embedded-hal driver for CD74HC4067

This library is an embedded-hal compliant driver for a GPIO-driven CD74HC4067 chip. It is completely hardware-agnostic, only requiring 5 output pins to operate. Given a compliant implementation of embedded-hal for a target, this driver should work there out-of-the-box.

Blog post

To read more on this nice little driver, blog post here.

Testing embedded-hal with mocking

The tests for the library also show a basic example of how to use embedded-hal-mock to test drivers when the hardware isn't there yet :) or on CI. Note, the test coverage is practically 100% line coverage.

The only exception are the calls to PhantomData::<...>, as they are excluded from the compiled binary by design.

License

MIT License.

Dependencies

~17KB