pihwm
A lightweight C library for Raspberry Pi hardware modules.
 All Data Structures Files Functions Groups Pages
General

General library functions. More...

Functions

board_t board_info ()
 Return board information (Model, PCB revision and Memory)
 
int board_model ()
 Return board model.
 
int board_rev ()
 Return board revision.
 
int board_mem ()
 Return the amount of system memory.
 
int check_kernel_module (char *modulename)
 Check if the kernel module specified is loaded.
 

Detailed Description

General library functions.

Function Documentation

board_t board_info ( )

Return board information (Model, PCB revision and Memory)

Returns
board information

Definition at line 110 of file pihwm.c.

int board_mem ( )

Return the amount of system memory.

Returns
MEM_256 or MEM_512

Definition at line 203 of file pihwm.c.

int board_model ( )

Return board model.

Returns
MODEL_A or MODEL_B

Definition at line 179 of file pihwm.c.

int board_rev ( )

Return board revision.

Returns
REV_1 or REV_2

Definition at line 191 of file pihwm.c.

int check_kernel_module ( char *  modulename)

Check if the kernel module specified is loaded.

Parameters
nameof the kernel module
Returns
1 for success, -1 for failure

Definition at line 217 of file pihwm.c.