libpruio  0.2
Input/Output driver for digital/analog lines on Beagleboard hardware
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
dts_custom.bas File Reference

Tool to create, compile and install a customized device tree overlay for libpruio. More...

#include "pruiotools.bas"
Include dependency graph for dts_custom.bas:

Go to the source code of this file.

Macros

#define FILE_NAME   /* "pruio_custom" */
 The file name.
 
#define VERS_NAME   /* "00A0" */
 The version.
 
#define PATH_NAME   /* "./" */
 The folder to place the compiled overlay binary.
 

Variables

VAR fnam = FILE_NAME & "-" & VERS_NAME
 The file name (without path / suffix)
 
VAR fnr = FREEFILE
 The file number.
 
VAR x = IIF(LEN(M(i)), nameBall(i), 0)
 The header pin name.
 

Detailed Description

Tool to create, compile and install a customized device tree overlay for libpruio.

This is a helper tool for an customized device tree overlay with fixed pin configurations. Adapt this FB source code, compile it and run the executable. This will create a device tree overlay source file in the current directory, and, if you execute the binary with root privileges, this overlay gets compiled and installed in /lib/firmware.

The customized overlay provides fixed pinmuxing configurations. The libpruio code can get executed as normal user (no root privileges are required). It claims only the configured header pins.

  • to include a pin add a line like M(P9_42) = CHR(0 + _I_) (which configures pin 42 at header P9 in mode 0 as input pin)

When done,

  1. Compile the tool by fbc -w all dts_custom.bas.
  2. Execute the binary without root privileges by ./dts_custom to control the generated source pruio_custom-0A00.dts, or
  3. execute the binary with root privileges by sudo ./dts_custom to install the compiled overlay in /lib/firmware.

The overlay source remains in the current folder (file pruio_custom-0A00.dts). Load the overlay by

sudo su
echo pruio_custom > /sys/devices/bone_capemgr.*/slots
exit

(Or execute the echo ... command in your boot sequence. Or use capemgr to load the overlay. See Preconditions for further information.)

Licence: GPLv3

Copyright 2014 by Thomas{ dOt ]Freiherr[ At ]gmx[ DoT }net

Compile by:

fbc -w all dts_custom.bas

Since
0.2

Definition in file dts_custom.bas.