#raspberry-pi #model #pi #raspberry #revision #linux

rpi-info

Figure out which model revision of Raspberry Pi you're running on

3 releases (breaking)

Uses old Rust 2015

0.3.0 Jun 24, 2019
0.2.0 Mar 21, 2018
0.1.0 Feb 10, 2018

#1699 in Hardware support

34 downloads per month

Custom license

22KB
612 lines

This crate makes it easy to determine what sort of Raspberry Pi a Linux host is. The different models have different pin layouts, etc, so it's often useful to know what model you're running on.

To see it in action, try the show example.


lib.rs:

There's only one entry point in this crate: load_cpuinfo(). Call it, handle any errors, then enjoy knowing more about your Raspberry Pi hardware!

Hardware data is from https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md.

Dependencies

~3.5MB
~72K SLoC