All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pruio.bi File Reference

FreeBASIC header file for libpruio. More...

`#include "BBB/prussdrv.bi"`
`#include "BBB/pruss_intc_mapping.bi"`
`#include "pruio.hp"`
`#include "pruio_adc.bi"`
`#include "pruio_gpio.bi"`
`#include "pruio_pwmss.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 | PRUIO_VERSION /* "0.2" */
| version string
#define | AM33XX
| tell pruss_intc_mapping.bi that we use ARM33xx
#define | PRUIO_CHAN /* CHANNEL5 */
| the channel for PRU messages (must match PRUIO_IRPT)
#define | PRUIO_MASK /* PRU_EVTOUT5_HOSTEN_MASK */
| the mask to enable PRU interrupts (must match PRUIO_IRPT)
#define | PRUIO_EMAP /* PRU_EVTOUT5 */
| the event for PRU messages (mapping, must match PRUIO_IRPT)
#define | PRUIO_EVNT /* PRU_EVTOUT_5 */
| the event for PRU messages (must match PRUIO_IRPT)
#define | ArrayBytes(_A_) /* (UBOUND(_A_) + 1) * SIZEOF(_A_) */
| Macro to calculate the total size of an array in bytes.
#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 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

## Enumerations

enum | PinMuxing { PRUIO_NO_PULL = &b001000, PRUIO_PULL_UP = &b010000, PRUIO_PULL_DOWN = &b000000, 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...
enum | ActivateDevice { PRUIO_ACT_PRU1 = &b000000000001, PRUIO_ACT_ADC = &b000000000010, PRUIO_ACT_GPIO0 = &b000000000100, PRUIO_ACT_GPIO1 = &b000000001000, PRUIO_ACT_GPIO2 = &b000000010000, PRUIO_ACT_GPIO3 = &b000000100000, PRUIO_ACT_PWM0 = &b000001000000, PRUIO_ACT_PWM1 = &b000010000000, PRUIO_ACT_PWM2 = &b000100000000, PRUIO_DEF_ACTIVE = &b111111111111 }
| Mask to be used in the constructor to choose PRUSS number and enable divices controls. 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.

Definition in file pruio.bi.

## Enumeration Type Documentation

enum ActivateDevice

Mask to be used in the constructor to choose PRUSS number and enable divices controls.

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.

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_DEF_ACTIVE | activate all subsystems

Definition at line 85 of file pruio.bi.

enum PinMuxing

constants for pinmuxing: pullup/-down resistors and GPIO states

Enumerator
PRUIO_NO_PULL | no resistor connected
PRUIO_PULL_UP | pullup resistor connected
PRUIO_PULL_DOWN | pulldown 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 36 of file pruio.bi.