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

FreeBASIC header file for global libpruio declares. More...

#include "pruio.hp"
Include dependency graph for pruio_globals.bi:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PRUIO_DEF_AVRAGE   /* 4 */
 The default setting for avaraging.
 
#define PRUIO_DEF_ODELAY   /* 183 */
 The default value for open delay in channel settings.
 
#define PRUIO_DEF_SDELAY   /* 0 */
 The default value for sample delay in channel settings.
 
#define PRUIO_DEF_SAMPLS   /* 1 */
 The default number of samples to use (configures single mode)
 
#define PRUIO_DEF_STPMSK   /* &b111111110 */
 The default step mask (steps 1 to 8 for AIN-0 to AIN-7, no charge step)
 
#define PRUIO_DEF_TIMERV   /* 0 */
 The default timer value (sampling rate in MM or RB mode)
 
#define PRUIO_DEF_LSLMOD   /* 4 */
 The default bit mode (4 = 16 bit encoding)
 
#define PRUIO_DEF_CLKDIV   /* 0 */
 The default clock divisor (0 = full speed AFE = 24 MHz)
 
#define ModeCheck(_B_, _M_)   /* (.BallConf[_B_] AND &b111) <> _M_ */
 Macro to check a CPU ball mode (ball must be in valid range, 0 to 109).
 
#define ModeSet(_B_, _M_)   /* IF .setPin(Top, _B_, _M_) THEN RETURN .Errr */
 Macro to check a CPU ball mode.
 
#define PruReady(_I_)   /* WHILE .DRam[1] : .WaitCycles += _I_ : WEND */
 Macro to start a PRU command.
 

Typedefs

typedef BYTE Int8
 8 bit signed integer data type
 
typedef SHORT Int16
 16 bit signed integer data type
 
typedef LONG Int32
 32 bit signed integer data type
 
typedef UBYTE UInt8
 8 bit unsigned integer data type
 
typedef USHORT UInt16
 16 bit unsigned integer data type
 
typedef ULONG UInt32
 32 bit unsigned integer data type
 
typedef SINGLE Float_t
 float data type
 
typedef PruIo Pruio_
 Forward declaration.
 
typedef AdcUdt AdcUdt_
 Forward declaration.
 
typedef GpioUdt GpioUdt_
 Forward declaration.
 
typedef PwmssUdt PwmssUdt_
 Forward declaration.
 
typedef PwmMod PwmMod_
 Forward declaration.
 
typedef CapMod CapMod_
 Forward declaration.
 
typedef QepMod QepMod_
 Forward declaration.
 
typedef TimerUdt TimerUdt_
 Forward declaration.
 

Enumerations

enum  PinMuxing {
  PRUIO_PULL_DOWN = &b000000 , PRUIO_NO_PULL = &b001000 , PRUIO_PULL_UP = &b010000 , PRUIO_RX_ACTIV = &b100000 ,
  PRUIO_GPIO_OUT0 = 7 + PRUIO_NO_PULL , PRUIO_GPIO_OUT1 = 7 + PRUIO_NO_PULL + 128 , PRUIO_GPIO_IN = 7 + PRUIO_NO_PULL + PRUIO_RX_ACTIV , PRUIO_GPIO_IN_0 = 7 + PRUIO_PULL_DOWN + PRUIO_RX_ACTIV ,
  PRUIO_GPIO_IN_1 = 7 + PRUIO_PULL_UP + PRUIO_RX_ACTIV , PRUIO_PIN_RESET = &hFF
}
 Constants for pinmuxing: pullup/-down resistors and GPIO states. More...
 

Variables

const ANY_PTR NULL = 0
 The NULL pointer.
 
const DOUBLE LOG2 = LOG(2)
 Natural logarythm 2.
 

Detailed Description

FreeBASIC header file for global libpruio declares.

Header file for including global libpruio definitions and declarations.

Since
0.4.0

Definition in file pruio_globals.bi.

Enumeration Type Documentation

◆ PinMuxing

enum PinMuxing

Constants for pinmuxing: pullup/-down resistors and GPIO states.

Enumerator
PRUIO_PULL_DOWN 

Pulldown resistor connected.

PRUIO_NO_PULL 

No resistor connected.

PRUIO_PULL_UP 

Pullup resistor connected.

PRUIO_RX_ACTIV 

Input receiver enabled.

PRUIO_GPIO_OUT0 

GPIO output low (no resistor)

PRUIO_GPIO_OUT1 

GPIO output high (no resistor)

PRUIO_GPIO_IN 

GPIO input (no resistor)

PRUIO_GPIO_IN_0 

GPIO input (pulldown resistor)

PRUIO_GPIO_IN_1 

GPIO input (pullup resistor)

Definition at line 61 of file pruio_globals.bi.