libpruio  0.6.8
Fast and easy Digital/Analog Input/Output for Beaglebones
pruio.bi File Reference

FreeBASIC header file for libpruio. More...

#include "pruio_globals.bi"
#include "pruio_adc.bi"
#include "pruio_gpio.bi"
#include "pruio_pwmss.bi"
#include "pruio_timer.bi"
#include "pruio_intc.bi"
Include dependency graph for pruio.bi:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BallSet
 Structure for Control Module, containing pad configurations. More...
 
class  PruIo
 Main structure, binding all components together. More...
 

Macros

#define BallCheck(_T_, _R_)   /* IF Ball > PRUIO_AZ_BALL THEN .Errr = @"unknown" _T_ " pin number" : RETURN _R_ */
 Macro to check a CPU ball number (0 to 109 is valid range).
 

Typedefs

typedef FUNCTION_CDECL_AS_ZSTRING_PTR setPinFunc(BYVAL_AS_Pruio__PTR Top, BYVAL_AS_UInt8 Ball, BYVAL_AS_UInt8 Mo)
 Alias for pinmuxing signature.
 

Enumerations

enum  BBTypes {
  BBB2x46 = 0 , PBB2x36 = 1 , BB_Blue = 2 , BBB2x46 = 0 ,
  PBB2x36 = 1 , BB_Blue = 2
}
 Enumerators for board types. More...
 
enum  AdcStepMask {
  AIN0 = &b000000010 , AIN1 = &b000000100 , AIN2 = &b000001000 , AIN3 = &b000010000 ,
  AIN4 = &b000100000 , AIN5 = &b001000000 , AIN6 = &b010000000 , AIN7 = &b100000000
}
 Mask for ADC step enabling. More...
 
enum  ActivateDevice {
  PRUIO_ACT_PRU1 = &b0000000000001 , PRUIO_ACT_ADC = &b0000000000010 , PRUIO_ACT_GPIO0 = &b0000000000100 , PRUIO_ACT_GPIO1 = &b0000000001000 ,
  PRUIO_ACT_GPIO2 = &b0000000010000 , PRUIO_ACT_GPIO3 = &b0000000100000 , PRUIO_ACT_PWM0 = &b0000001000000 , PRUIO_ACT_PWM1 = &b0000010000000 ,
  PRUIO_ACT_PWM2 = &b0000100000000 , PRUIO_ACT_TIM4 = &b0001000000000 , PRUIO_ACT_TIM5 = &b0010000000000 , PRUIO_ACT_TIM6 = &b0100000000000 ,
  PRUIO_ACT_TIM7 = &b1000000000000 , PRUIO_DEF_ACTIVE = &b1111111111111 , PRUIO_ACT_FREMUX = &b1000000000000000
}
 Mask for PRUSS number and divice enabling. More...
 

Detailed Description

FreeBASIC header file for libpruio.

Header file for including libpruio to FreeBASIC programs. It binds the different components together and provides all declarations.

Since
0.0

Definition in file pruio.bi.

Enumeration Type Documentation

◆ ActivateDevice

Mask for PRUSS number and divice enabling.

This enumerators are used in the constructor PruIo::PruIo() to enable single subsystems. By default all subsystems are enabled. If a device is not enabled, libpruio wont wake it up nor allocate memory to control it. It just reads the version information to see if the subsystem is in operation.

An enabled subsystem will get activated in the constructor PruIo::PruIo() and libpruio will set its configuration. When done, the destructor PruIo::~PruIo() either disables it (when previously disabled) or resets the initial configuration.

The first enumerator PRUIO_ACT_PRU1 is used to specify the PRU subsystem to execute libpruio. By default the bit is set and libpruio runs on PRU-1. See PruIo::PruIo() for further information.

Since
0.2
Enumerator
PRUIO_ACT_PRU1 

Activate PRU-1 (= default, instead of PRU-0)

PRUIO_ACT_ADC 

Activate ADC.

PRUIO_ACT_GPIO0 

Activate GPIO-0.

PRUIO_ACT_GPIO1 

Activate GPIO-1.

PRUIO_ACT_GPIO2 

Activate GPIO-2.

PRUIO_ACT_GPIO3 

Activate GPIO-3.

PRUIO_ACT_PWM0 

Activate PWMSS-0 (including eCAP, eQEP, ePWM)

PRUIO_ACT_PWM1 

Activate PWMSS-1 (including eCAP, eQEP, ePWM)

PRUIO_ACT_PWM2 

Activate PWMSS-2 (including eCAP, eQEP, ePWM)

PRUIO_ACT_TIM4 

Activate TIMER-4.

PRUIO_ACT_TIM5 

Activate TIMER-5.

PRUIO_ACT_TIM6 

Activate TIMER-6.

PRUIO_ACT_TIM7 

Activate TIMER-7.

PRUIO_DEF_ACTIVE 

Activate all subsystems.

PRUIO_ACT_FREMUX 

Activate free LKM muxing, no kernel claims.

Definition at line 90 of file pruio.bi.

◆ AdcStepMask

Mask for ADC step enabling.

This enumerators are for use in function PruIo::config() to enable single steps for the ADC sampling sequence. By default steps 1 to 8 are configured to measure AIN 0 to 7, using the values of Averaging, OpenDelay and SampleDelay passed as parameters to the constructor PruIo::PruIo().

Example:

Io->config(AIN0 + AIN3 + AIN4, ...)
Note
A function call to AdcUdt::setStep() for steps 1 to 8 will override the default configuration. Those masks get invalid when you change the step channel.
Since
0.6.4
Enumerator
AIN0 

Activate Step 1 (default config: AIN0)

AIN1 

Activate Step 2 (default config: AIN1)

AIN2 

Activate Step 3 (default config: AIN2)

AIN3 

Activate Step 4 (default config: AIN3)

AIN4 

Activate Step 5 (default config: AIN4)

AIN5 

Activate Step 6 (default config: AIN5)

AIN6 

Activate Step 7 (default config: AIN6)

AIN7 

Activate Step 8 (default config: AIN7)

Definition at line 59 of file pruio.bi.

◆ BBTypes

enum BBTypes

Enumerators for board types.

Since
0.6.8
Enumerator
BBB2x46 

Classic Beaglebone board with 2x46 headers, JT, SD.

PBB2x36 

PocketBeagle board with 2x36 headers, SD.

BB_Blue 

Beaglebone Blue with connectors, SD.

BBB2x46 

Classic Beaglebone board with 2x46 headers, JT, SD.

PBB2x36 

PocketBeagle board with 2x36 headers, SD.

BB_Blue 

Beaglebone Blue with connectors, SD.

Definition at line 34 of file pruio.bi.