The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

HiPi::cpuinfo

VERSION

Version 0.01

SYNOPSYS

use HiPi::cpuinfo;

my $rpiboardrev = HiPi::cpuinfo::get_piboard_rev();

my $infohashref = HiPi::cpuinfo::get_cpuinfo();

DESCRIPTION

Access the information in /proc/cpuinfo.

METHODS

get_piboard_rev()

Returns the board revision ( 1 or 2 )

get_cpuinfo()

Returns a has reference derived from the content of /proc/cpuinfo

An example hash returned from a rev 2 board with 512mb

'Raspberry Pi Revision' => '2'
'Processor'             => 'ARMv6-compatible processor rev 7 (v6l)'
'BogoMIPS'              => '697.95'
'Features'              => 'swp half thumb fastmult vfp edsp java tls'
'CPU implementer'       => '0x41'
'CPU architecture'      => '7'
'CPU variant'           => '0x0'
'CPU part'              => '0xb76'
'CPU revision'          => '7'
'Hardware'              => 'BCM2708'
'Revision'              => '000f'
'Serial'                => '00000000ec4805c2'

LICENSE

This work is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version.

License Note

I would normally release any Perl code under the Perl Artistic License but this module wraps several GPL / LGPL C libraries and I feel that the licensing of the entire distribution is simpler if the Perl code is under GPL too.

AUTHOR

Mark Dootson, <mdootson at cpan.org>

COPYRIGHT

Copyright (C) 2012-2013 Mark Dootson, all rights reserved.