libpruio  0.0
AM33xx-PRU driver for digital input / output and analog input
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pruio.bi File Reference

FreeBASIC header file for libpruio. More...

#include "pruio.hp"
#include "BBB/prussdrv.bi"
#include "BBB/pruss_intc_mapping.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  AdcSteps
 user defined type for a step setting More...
 
class  GpioSet
 user defined type for a GPIO setting More...
 
class  PruIo
 user defined type (class) for the driver structure More...
 

Macros

#define AM33XX
 tell pruss_intc_mapping.bi that we use ARM33xx More...
 
#define PRUIO_CHAN   /* CHANNEL5 */
 common macros, shared with PRU pasm compiler More...
 
#define PRUIO_MASK   /* PRU_EVTOUT5_HOSTEN_MASK */
 the mask to enable PRU interrupts (must match PRUIO_IRPT) More...
 
#define PRUIO_EMAP   /* PRU_EVTOUT5 */
 the event for PRU messages (mapping, must match PRUIO_IRPT) More...
 
#define PRUIO_EVNT   /* PRU_EVTOUT_5 */
 the event for PRU messages (must match PRUIO_IRPT) More...
 
#define PRUIO_DEF_AVRAGE   /* 4 */
 the default setting for avaraging More...
 
#define PRUIO_DEF_ODELAY   /* 183 */
 the default value for open delay in channel settings More...
 
#define PRUIO_DEF_SDELAY   /* 0 */
 the default value for sample delay in channel settings More...
 
#define PRUIO_DEF_PRUSS   /* 1 */
 the default PRU subsystem to use More...
 
#define PRUIO_DEF_SAMPLS   /* 0 */
 the default number of samples to use (configures single mode) More...
 
#define PRUIO_DEF_STPMSK   /* &b111111110 */
 the default step mask (steps 1 to 8 for AIN0 to AIN7, no charge step) More...
 
#define PRUIO_DEF_TIMERV   /* 0 */
 the default timer value (sampling rate) More...
 
#define PRUIO_DEF_LSLMOD   /* 4 */
 the default bit mode (4 = 16 bit encoding) More...
 
#define PRUIO_DEF_CLKDIV   /* 0 */
 the default clock divisor (0 = full speed AFE = 2.4 MHz) More...
 
#define PRUIO_IN   /* &b00101111 */
 convenience macro to configure an input pin without pullup or pulldown More...
 
#define PRUIO_IN_0   /* &b00100111 */
 convenience macro to configure an low input pin (with pulldown resistor) More...
 
#define PRUIO_IN_1   /* &b00110111 */
 convenience macro to configure an high input pin (with pullup resistor) More...
 
#define PRUIO_OUT0   /* &b00001111 */
 convenience macro to configure an output pin initial low More...
 
#define PRUIO_OUT1   /* &b10001111 */
 convenience macro to configure an output pin initial high More...
 
#define PRUIO_PIN_RESET   /* &b11111111 */
 convenience macro to re-configure a pin to its original (initial) state More...
 

Typedefs

typedef UINTEGER uint32
 32 bit unsigned integer data type More...
 
typedef USHORT uint16
 16 bit unsigned integer data type More...
 
typedef UBYTE uint8
 8 bit unsigned integer data type More...
 
typedef INTEGER int32
 32 bit signed integer data type More...
 
typedef SHORT int16
 16 bit signed integer data type More...
 
typedef BYTE int8
 8 bit signed integer data type More...
 

Enumerations

enum  PRUIO_PIN_LOCKING {
  PRUIO_UNLOCK_CURR, PRUIO_UNLOCK_ORIG, PRUIO_UNLOCK_NEW, PRUIO_LOCK_CURR,
  PRUIO_LOCK_ORIG, PRUIO_LOCK_NEW, PRUIO_LOCK_CHECK, PRUIO_UNLOCK_CURR,
  PRUIO_UNLOCK_ORIG, PRUIO_UNLOCK_NEW, PRUIO_LOCK_CURR, PRUIO_LOCK_ORIG,
  PRUIO_LOCK_NEW, PRUIO_LOCK_CHECK
}
 

Detailed Description

FreeBASIC header file for libpruio.

Header file for including libpruio to FreeBASIC programs. It contains the declarations.

Definition in file pruio.bi.


Class Documentation

class AdcSteps

user defined type for a step setting

Definition at line 115 of file pruio_c_wrapper.h.

Collaboration diagram for AdcSteps:
Class Members
uint32 Confg context for configuration register
uint32 Delay context for delay register
class GpioSet

user defined type for a GPIO setting

Definition at line 121 of file pruio_c_wrapper.h.

Collaboration diagram for GpioSet:
Class Members
uint32 Addr base address of GPIO device
uint32 ClrM mask to clear pins to low
uint32 SetM mask to set pins to high
uint32 OutE mask to enable pins for output
uint32 Stat current state of pins (mixed)
uint32 StaO current state of output pins
uint32 fe1 future expansion
uint32 fe2

Macro Definition Documentation

#define AM33XX

tell pruss_intc_mapping.bi that we use ARM33xx

Definition at line 14 of file pruio.bi.

#define PRUIO_CHAN   /* CHANNEL5 */

common macros, shared with PRU pasm compiler

the PRUSS driver library PRUSS driver interrupt settings the channel for PRU messages (must match PRUIO_IRPT)

Definition at line 24 of file pruio.bi.

#define PRUIO_MASK   /* PRU_EVTOUT5_HOSTEN_MASK */

the mask to enable PRU interrupts (must match PRUIO_IRPT)

Definition at line 26 of file pruio.bi.

#define PRUIO_EMAP   /* PRU_EVTOUT5 */

the event for PRU messages (mapping, must match PRUIO_IRPT)

Definition at line 28 of file pruio.bi.

#define PRUIO_EVNT   /* PRU_EVTOUT_5 */

the event for PRU messages (must match PRUIO_IRPT)

Definition at line 30 of file pruio.bi.

#define PRUIO_DEF_AVRAGE   /* 4 */

the default setting for avaraging

Definition at line 33 of file pruio.bi.

#define PRUIO_DEF_ODELAY   /* 183 */

the default value for open delay in channel settings

Definition at line 35 of file pruio.bi.

#define PRUIO_DEF_SDELAY   /* 0 */

the default value for sample delay in channel settings

Definition at line 37 of file pruio.bi.

#define PRUIO_DEF_PRUSS   /* 1 */

the default PRU subsystem to use

Definition at line 39 of file pruio.bi.

#define PRUIO_DEF_SAMPLS   /* 0 */

the default number of samples to use (configures single mode)

Definition at line 41 of file pruio.bi.

#define PRUIO_DEF_STPMSK   /* &b111111110 */

the default step mask (steps 1 to 8 for AIN0 to AIN7, no charge step)

Definition at line 43 of file pruio.bi.

#define PRUIO_DEF_TIMERV   /* 0 */

the default timer value (sampling rate)

Definition at line 45 of file pruio.bi.

#define PRUIO_DEF_LSLMOD   /* 4 */

the default bit mode (4 = 16 bit encoding)

Definition at line 47 of file pruio.bi.

#define PRUIO_DEF_CLKDIV   /* 0 */

the default clock divisor (0 = full speed AFE = 2.4 MHz)

Definition at line 49 of file pruio.bi.

#define PRUIO_IN   /* &b00101111 */

convenience macro to configure an input pin without pullup or pulldown

Definition at line 52 of file pruio.bi.

#define PRUIO_IN_0   /* &b00100111 */

convenience macro to configure an low input pin (with pulldown resistor)

Definition at line 54 of file pruio.bi.

#define PRUIO_IN_1   /* &b00110111 */

convenience macro to configure an high input pin (with pullup resistor)

Definition at line 56 of file pruio.bi.

#define PRUIO_OUT0   /* &b00001111 */

convenience macro to configure an output pin initial low

Definition at line 58 of file pruio.bi.

#define PRUIO_OUT1   /* &b10001111 */

convenience macro to configure an output pin initial high

Definition at line 60 of file pruio.bi.

#define PRUIO_PIN_RESET   /* &b11111111 */

convenience macro to re-configure a pin to its original (initial) state

Definition at line 62 of file pruio.bi.

Typedef Documentation

typedef UINTEGER uint32

32 bit unsigned integer data type

Definition at line 74 of file pruio.bi.

typedef USHORT uint16

16 bit unsigned integer data type

Definition at line 75 of file pruio.bi.

typedef UBYTE uint8

8 bit unsigned integer data type

Definition at line 76 of file pruio.bi.

typedef INTEGER int32

32 bit signed integer data type

Definition at line 77 of file pruio.bi.

typedef SHORT int16

16 bit signed integer data type

Definition at line 78 of file pruio.bi.

typedef BYTE int8

8 bit signed integer data type

Definition at line 79 of file pruio.bi.

Enumeration Type Documentation

Enumerator
PRUIO_UNLOCK_CURR 

unlock a pin, don't change the configuration

PRUIO_UNLOCK_ORIG 

unlock a pin, change to original (initial) configuration

PRUIO_UNLOCK_NEW 

unlock a pin, change to parameter configuration

PRUIO_LOCK_CURR 

lock a pin, don't change the configuration

PRUIO_LOCK_ORIG 

lock a pin, change to original (initial) configuration

PRUIO_LOCK_NEW 

lock a pin, change to parameter configuration

PRUIO_LOCK_CHECK 

don't change pin locking, skip operation if pin is locked

PRUIO_UNLOCK_CURR 

unlock a pin, don't change the configuration

PRUIO_UNLOCK_ORIG 

unlock a pin, change to original (initial) configuration

PRUIO_UNLOCK_NEW 

unlock a pin, change to parameter configuration

PRUIO_LOCK_CURR 

lock a pin, don't change the configuration

PRUIO_LOCK_ORIG 

lock a pin, change to original (initial) configuration

PRUIO_LOCK_NEW 

lock a pin, change to parameter configuration

PRUIO_LOCK_CHECK 

don't change pin locking, skip operation if pin is locked

Definition at line 64 of file pruio.bi.