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

The main header code of the C wrapper for libpruio. More...

#include "pruio.hp"
#include "pruio_intc.h"
Include dependency graph for pruio.h:

Go to the source code of this file.

Classes

struct  adcSteps
 Wrapper structure for AdcSteps. More...
 
struct  adcSet
 Wrapper structure for AdcSet. More...
 
struct  adcUdt
 Wrapper structure for AdcUdt. More...
 
struct  gpioSet
 Wrapper structure for GpioSet. More...
 
struct  gpioArr
 Wrapper structure for GpioArr. More...
 
struct  gpioUdt
 Wrapper structure for GpioUdt. More...
 
struct  timerSet
 Wrapper structure for TimerSet. More...
 
struct  timerArr
 Wrapper structure for TimerArr. More...
 
struct  timerUdt
 Wrapper structure for TimerUdt. More...
 
struct  pwmssSet
 Wrapper structure for PwmssSet. More...
 
struct  pwmssArr
 Wrapper structure for PwmssArr. More...
 
struct  pwmssUdt
 Wrapper structure for PwmssUdt. More...
 
struct  pwmMod
 Wrapper structure for PwmMod. More...
 
struct  qepMod
 Wrapper structure for QepMod. More...
 
struct  ballSet
 Wrapper structure for BallSet. More...
 
struct  pruIo
 Wrapper structure for PruIo. More...
 

Macros

#define PRUIO_VERSION   "0.6.6"
 version string
 
#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   510
 The default step mask (steps 1 to 8 for AIN0 to AIN7, no charge step).
 
#define PRUIO_DEF_TIMERV   0
 The default timer value (sampling rate).
 
#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 = 2.4 MHz).
 

Typedefs

typedef signed char int8
 8 bit signed integer data type.
 
typedef short int16
 16 bit signed integer data type.
 
typedef int int32
 32 bit signed integer data type.
 
typedef unsigned char uint8
 8 bit unsigned integer data type.
 
typedef unsigned short uint16
 16 bit unsigned integer data type.
 
typedef unsigned int uint32
 32 bit unsigned integer data type.
 
typedef float float_t
 float data type.
 
typedef struct pruIo pruIo
 forward declaration More...
 
typedef struct adcSet adcSet
 Wrapper structure for AdcSet. More...
 
typedef struct adcUdt adcUdt
 Wrapper structure for AdcUdt. More...
 
typedef struct gpioSet gpioSet
 Wrapper structure for GpioSet. More...
 
typedef struct gpioArr gpioArr
 Wrapper structure for GpioArr. More...
 
typedef struct gpioUdt gpioUdt
 Wrapper structure for GpioUdt. More...
 
typedef struct timerSet timerSet
 Wrapper structure for TimerSet. More...
 
typedef struct timerArr timerArr
 Wrapper structure for TimerArr. More...
 
typedef struct timerUdt timerUdt
 Wrapper structure for TimerUdt. More...
 
typedef struct pwmssSet pwmssSet
 Wrapper structure for PwmssSet. More...
 
typedef struct pwmssArr pwmssArr
 Wrapper structure for PwmssArr. More...
 
typedef struct pwmssUdt pwmssUdt
 Wrapper structure for PwmssUdt. More...
 
typedef struct pwmMod pwmMod
 Wrapper structure for PwmMod. More...
 
typedef struct capMod capMod
 Wrapper structure for CapMod. More...
 
typedef struct qepMod qepMod
 Wrapper structure for QepMod. More...
 
typedef struct ballSet ballSet
 Wrapper structure for BallSet. More...
 

Enumerations

enum  BBTypes {
  BBB2x46 = 0 , PBB2x36 = 1 , BB_Blue = 2 , BBB2x46 = 0 ,
  PBB2x36 = 1 , BB_Blue = 2
}
 Wrapper enumerators for board types. More...
 
enum  pinMuxing {
  PRUIO_PULL_DOWN = 0 , PRUIO_NO_PULL = 1 << 3 , PRUIO_PULL_UP = 1 << 4 , PRUIO_RX_ACTIV = 1 << 5 ,
  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 = 0xFF
}
 Wrapper enumerators for PinMuxing. More...
 
enum  adcStepmask {
  AIN0 = 1 << 1 , AIN1 = 1 << 2 , AIN2 = 1 << 3 , AIN3 = 1 << 4 ,
  AIN4 = 1 << 5 , AIN5 = 1 << 6 , AIN6 = 1 << 7 , AIN7 = 1 << 8
}
 Wrapper enumerators for AdcStepMask. More...
 
enum  activateDevice {
  PRUIO_ACT_PRU1 = 1 , PRUIO_ACT_ADC = 1 << 1 , PRUIO_ACT_GPIO0 = 1 << 2 , PRUIO_ACT_GPIO1 = 1 << 3 ,
  PRUIO_ACT_GPIO2 = 1 << 4 , PRUIO_ACT_GPIO3 = 1 << 5 , PRUIO_ACT_PWM0 = 1 << 6 , PRUIO_ACT_PWM1 = 1 << 7 ,
  PRUIO_ACT_PWM2 = 1 << 8 , PRUIO_ACT_TIM4 = 1 << 9 , PRUIO_ACT_TIM5 = 1 << 10 , PRUIO_ACT_TIM6 = 1 << 11 ,
  PRUIO_ACT_TIM7 = 1 << 12 , PRUIO_DEF_ACTIVE = 0x1FFF , PRUIO_ACT_FREMUX = 0xFFF8
}
 Wrapper enumerators for ActivateDevice. More...
 

Functions

pruIopruio_new (uint16 Act, uint8 Av, uint32 OpD, uint8 SaD)
 Wrapper function for the constructor PruIo::PruIo(). More...
 
void pruio_destroy (pruIo *Io)
 Wrapper function for the destructor PruIo::~PruIo(). More...
 
char * pruio_config (pruIo *Io, uint32 Samp, uint32 Mask, uint32 Tmr, uint16 Mds)
 Wrapper function for PruIo::config(). More...
 
char * pruio_Pin (pruIo *Io, uint8 Ball)
 Wrapper function for PruIo::Pin(). More...
 
char * pruio_mm_start (pruIo *Io, uint32 Trg1, uint32 Trg2, uint32 Trg3, uint32 Trg4)
 Wrapper function for PruIo::mm_start(). More...
 
char * pruio_rb_start (pruIo *Io)
 Wrapper function for PruIo::rb_start(). More...
 
char * pruio_gpio_config (pruIo *Io, uint8 Ball, uint8 Modus)
 Wrapper function for GpioUdt::config(). More...
 
char * pruio_gpio_setValue (pruIo *Io, uint8 Ball, uint8 Modus)
 Wrapper function for GpioUdt::setValue(). More...
 
char * pruio_gpio_flush (pruIo *Io, uint8 Indx)
 Wrapper function for GpioUdt::flush(). More...
 
uint32 pruio_gpio_Value (pruIo *Io, uint8 Ball)
 Wrapper function for GpioUdt::Value(). More...
 
char * pruio_adc_setStep (pruIo *Io, uint8 Stp, uint8 ChN, uint8 Av, uint8 SaD, uint32 OpD)
 Wrapper function for AdcUdt::setStep(). More...
 
uint32 pruio_adc_mm_trg_pin (pruIo *Io, uint8 Ball, uint8 GpioV, uint16 Skip)
 Wrapper function for AdcUdt::mm_trg_pin(). More...
 
uint32 pruio_adc_mm_trg_ain (pruIo *Io, uint8 Stp, int32 AdcV, uint8 Rela, uint16 Skip)
 Wrapper function for AdcUdt::mm_trg_ain(). More...
 
uint32 pruio_adc_mm_trg_pre (pruIo *Io, uint8 Stp, int32 AdcV, uint16 Samp, uint8 Rela)
 Wrapper function for AdcUdt::mm_trg_pre(). More...
 
char * pruio_qep_config (pruIo *Io, uint8 Ball, uint32 PMax, float_t VHz, float_t Scale, uint8 Mo)
 Wrapper function for QepMod::config(). More...
 
char * pruio_qep_Value (pruIo *Io, uint8 Ball, uint32 *Posi, float_t *Velo)
 Wrapper function for QepMod::Value(). More...
 
char * pruio_cap_config (pruIo *Io, uint8 Ball, float_t FLow)
 Wrapper function for CapMod::config(). More...
 
char * pruio_cap_Value (pruIo *Io, uint8 Ball, float_t *Hz, float_t *Du)
 Wrapper function for CapMod::Value(). More...
 
char * pruio_pwm_Value (pruIo *Io, uint8 Ball, float_t *Hz, float_t *Du)
 Wrapper function for PwmMod::Value(). More...
 
char * pruio_pwm_setValue (pruIo *Io, uint8 Ball, float_t Hz, float_t Du)
 Wrapper function for PwmMod::setValue(). More...
 
char * pruio_tim_Value (pruIo *Io, uint8 Ball, float_t *Dur1, float_t *Dur2)
 Wrapper function for TimerUdt::Value(). More...
 
char * pruio_tim_setValue (pruIo *Io, uint8 Ball, float_t Dur1, float_t Dur2, uint16 Mode)
 Wrapper function for TimerUdt::setValue(). More...
 

Detailed Description

The main header code of the C wrapper for libpruio.

This file provides the declarations of macros, types and classes in C syntax. Include this file in your code to make use of libpruio. This file contains a translation of the context of all FreeBASIC headers (pruio.bi, pruio.hp, pruio_adc.bi, pruio_gpio.bi and pruio_pwm.bi) in one file.

Feel free to translate this file in order to create language bindings for non-C languages and use libpruio in polyglot applications. Check also file pruio_pins.h for a convenient way to declare header pins.

Note
The header pruio_pins.h is not shown in this documentation because it confuses Doxygen. It mixes up references with the original header pruio/pruio_pins.bi.

Licence: LGPLv2 (http://www.gnu.org/licenses/lgpl-2.0.html)

Copyright 2014-2023 by Thomas{ dOt ]Freiherr[ aT ]gmx[DoT}net

Since
0.0

Definition in file pruio.h.

Typedef Documentation

◆ adcSet

typedef struct adcSet adcSet

Wrapper structure for AdcSet.

Since
0.2

◆ adcUdt

typedef struct adcUdt adcUdt

Wrapper structure for AdcUdt.

Since
0.2

◆ ballSet

typedef struct ballSet ballSet

Wrapper structure for BallSet.

Since
0.2

◆ capMod

typedef struct capMod capMod

Wrapper structure for CapMod.

Since
0.2

Definition at line 42 of file pruio.h.

◆ gpioArr

typedef struct gpioArr gpioArr

Wrapper structure for GpioArr.

Since
0.2

◆ gpioSet

typedef struct gpioSet gpioSet

Wrapper structure for GpioSet.

Since
0.2

◆ gpioUdt

typedef struct gpioUdt gpioUdt

Wrapper structure for GpioUdt.

Since
0.2

◆ pruIo

typedef struct pruIo pruIo

forward declaration

Wrapper structure for PruIo.

Since
0.0

Definition at line 42 of file pruio.h.

◆ pwmMod

typedef struct pwmMod pwmMod

Wrapper structure for PwmMod.

Since
0.2

◆ pwmssArr

typedef struct pwmssArr pwmssArr

Wrapper structure for PwmssArr.

Since
0.2

◆ pwmssSet

typedef struct pwmssSet pwmssSet

Wrapper structure for PwmssSet.

Since
0.2

◆ pwmssUdt

typedef struct pwmssUdt pwmssUdt

Wrapper structure for PwmssUdt.

Since
0.2

◆ qepMod

typedef struct qepMod qepMod

Wrapper structure for QepMod.

Since
0.4

◆ timerArr

typedef struct timerArr timerArr

Wrapper structure for TimerArr.

Since
0.4

◆ timerSet

typedef struct timerSet timerSet

Wrapper structure for TimerSet.

Since
0.4

◆ timerUdt

typedef struct timerUdt timerUdt

Wrapper structure for TimerUdt.

Since
0.4

Enumeration Type Documentation

◆ activateDevice

Wrapper enumerators for ActivateDevice.

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.

Definition at line 517 of file pruio.h.

◆ adcStepmask

Wrapper enumerators for AdcStepMask.

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 502 of file pruio.h.

◆ BBTypes

enum BBTypes

Wrapper 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 475 of file pruio.h.

◆ pinMuxing

enum pinMuxing

Wrapper enumerators for PinMuxing.

Since
0.2
Enumerator
PRUIO_PULL_DOWN 

Pulldown resistor connected (&b000000).

PRUIO_NO_PULL 

No resistor connected (&b001000).

PRUIO_PULL_UP 

Pullup resistor connected (&b010000).

PRUIO_RX_ACTIV 

Input receiver enabled (&b100000).

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 485 of file pruio.h.

Function Documentation

◆ pruio_adc_mm_trg_ain()

uint32 pruio_adc_mm_trg_ain ( pruIo Io,
uint8  Stp,
int32  AdcV,
uint8  Rela,
uint16  Skip 
)

Wrapper function for AdcUdt::mm_trg_ain().

Parameters
IoThe pointer of the PruIo instance.
StpThe step number to use for trigger input.
AdcVThe sample value to match (positive check greater than, negative check less than).
RelaIf AdcV is relative to the current input.
SkipThe number of samples to skip (defaults to 0 = zero, max. 1023).
Returns
The trigger configuration (or zero in case of an error, check PruIo::Errr).
Since
0.2

◆ pruio_adc_mm_trg_pin()

uint32 pruio_adc_mm_trg_pin ( pruIo Io,
uint8  Ball,
uint8  GpioV,
uint16  Skip 
)

Wrapper function for AdcUdt::mm_trg_pin().

Parameters
IoThe pointer of the PruIo instance.
BallThe CPU ball number to test.
GpioVThe state to check (defaults to high = 1).
SkipThe number of samples to skip (defaults to 0 = zero, max. 1023).
Returns
The trigger configuration (or zero in case of an error, check PruIo::Errr).
Since
0.2

◆ pruio_adc_mm_trg_pre()

uint32 pruio_adc_mm_trg_pre ( pruIo Io,
uint8  Stp,
int32  AdcV,
uint16  Samp,
uint8  Rela 
)

Wrapper function for AdcUdt::mm_trg_pre().

Parameters
IoThe pointer of the PruIo instance.
StpThe step number to use for trigger input.
AdcVThe sample value to match (positive check greater than, negative check less than).
SampThe number of samples for the pre-trigger.
RelaIf AdcV is relative to the current input.
Returns
The trigger configuration (or zero in case of an error, check PruIo::Errr).
Since
0.2

◆ pruio_adc_setStep()

char* pruio_adc_setStep ( pruIo Io,
uint8  Stp,
uint8  ChN,
uint8  Av,
uint8  SaD,
uint32  OpD 
)

Wrapper function for AdcUdt::setStep().

Parameters
IoThe pointer of the PruIo instance.
StpStep index (0 = step 0 => charge step, 1 = step 1 (=> AIN0 by default), ..., 17 = idle step).
ChNChannel number to scan (0 = AIN0, 1 = AIN1, ...).
AvNew value for avaraging (defaults to 4).
SaDNew value for sample delay (defaults to 0).
OpDNew value for open delay (defaults to 0x98).
Returns
Zero on success (otherwise a string with an error message).
Since
0.2
Here is the caller graph for this function:

◆ pruio_cap_config()

char* pruio_cap_config ( pruIo Io,
uint8  Ball,
float_t  FLow 
)

Wrapper function for CapMod::config().

Parameters
IoThe pointer of the PruIo instance.
BallThe CPU ball number to configure.
FLowMinimal frequency to measure (> .0232831).
Returns
Zero on success (otherwise a string with an error message).
Since
0.2
Here is the caller graph for this function:

◆ pruio_cap_Value()

char* pruio_cap_Value ( pruIo Io,
uint8  Ball,
float_t Hz,
float_t Du 
)

Wrapper function for CapMod::Value().

Parameters
IoThe pointer of the PruIo instance.
BallThe CPU ball number to test.
HzA pointer to store the frequency value (or null).
DuA pointer to store the duty cycle value (or null).
Returns
Zero on success (otherwise a string with an error message).
Since
0.2
Here is the caller graph for this function:

◆ pruio_config()

char* pruio_config ( pruIo Io,
uint32  Samp,
uint32  Mask,
uint32  Tmr,
uint16  Mds 
)

Wrapper function for PruIo::config().

Parameters
IoThe pointer of the PruIo instance.
SampThe number of samples to fetch (defaults to zero).
MaskThe mask for active steps (defaults to all 8 channels active in steps 1 to 8).
TmrThe timer value in [ns] to specify the sampling rate (defaults to zero, MM only).
MdsThe modus for output bit encoding (defaults to 4 = 16 bit).
Returns
Zero on success (otherwise a string with an error message).
Since
0.2
Here is the caller graph for this function:

◆ pruio_destroy()

void pruio_destroy ( pruIo Io)

Wrapper function for the destructor PruIo::~PruIo().

Parameters
IoThe pointer of the instance.
Since
0.0
Here is the caller graph for this function:

◆ pruio_gpio_config()

char* pruio_gpio_config ( pruIo Io,
uint8  Ball,
uint8  Modus 
)

Wrapper function for GpioUdt::config().

Parameters
IoThe pointer of the PruIo instance.
BallThe CPU ball number to set.
ModusThe mode for the GPIO.
Returns
Zero on success (otherwise a pointer to an error message).
Since
0.2
Here is the caller graph for this function:

◆ pruio_gpio_flush()

char* pruio_gpio_flush ( pruIo Io,
uint8  Indx 
)

Wrapper function for GpioUdt::flush().

Parameters
IoThe pointer of the PruIo instance.
IndxThe GPIO subsystem number to flush.
Returns
Zero on success (otherwise a pointer to an error message).
Since
0.6.8

◆ pruio_gpio_setValue()

char* pruio_gpio_setValue ( pruIo Io,
uint8  Ball,
uint8  Modus 
)

Wrapper function for GpioUdt::setValue().

Parameters
IoThe pointer of the PruIo instance.
BallThe CPU ball number to set.
ModusThe mode for the GPIO output.
Returns
Zero on success (otherwise a pointer to an error message).
Since
0.2
Here is the caller graph for this function:

◆ pruio_gpio_Value()

uint32 pruio_gpio_Value ( pruIo Io,
uint8  Ball 
)

Wrapper function for GpioUdt::Value().

Parameters
IoThe pointer of the PruIo instance.
BallThe CPU ball number to test.
Returns
The GPIO state (otherwise -1, check PruIo::Errr for an error message).
Since
0.2
Here is the caller graph for this function:

◆ pruio_mm_start()

char* pruio_mm_start ( pruIo Io,
uint32  Trg1,
uint32  Trg2,
uint32  Trg3,
uint32  Trg4 
)

Wrapper function for PruIo::mm_start().

Parameters
IoThe pointer of the PruIo instance.
Trg1Settings for first trigger (default = no trigger).
Trg2Settings for second trigger (default = no trigger).
Trg3Settings for third trigger (default = no trigger).
Trg4Settings for fourth trigger (default = no trigger).
Returns
Zero on success (otherwise a string with an error message).
Since
0.2

◆ pruio_new()

pruIo* pruio_new ( uint16  Act,
uint8  Av,
uint32  OpD,
uint8  SaD 
)

Wrapper function for the constructor PruIo::PruIo().

Parameters
ActThe mask for active subsystems and PRU number.
AvThe avaraging for default steps (0 to 16, defaults to 0).
OpDThe open delay for default steps (0 to 0x3FFFF, defaults to 0x98).
SaDThe sample delay for default steps (0 to 255, defaults to 0).
Returns
A pointer for the new instance.

Since the constructor reads the original subsystem configurations and the destructor restores them, it's recommended to create and use just one PruIo instance at the same time.

Since
0.0
Here is the caller graph for this function:

◆ pruio_Pin()

char* pruio_Pin ( pruIo Io,
uint8  Ball 
)

Wrapper function for PruIo::Pin().

Parameters
IoThe pointer of the PruIo instance.
BallThe CPU ball number to describe.
Returns
A human-readable text string (internal string, never free it).
Since
0.2

◆ pruio_pwm_setValue()

char* pruio_pwm_setValue ( pruIo Io,
uint8  Ball,
float_t  Hz,
float_t  Du 
)

Wrapper function for PwmMod::setValue().

Parameters
IoThe pointer of the PruIo instance
Ballthe CPU ball number to set
HzThe frequency to set (or -1 for no change).
DuThe duty cycle to set (0.0 to 1.0, or -1 for no change).
Returns
Zero on success (otherwise a string with an error message).
Since
0.2
Here is the caller graph for this function:

◆ pruio_pwm_Value()

char* pruio_pwm_Value ( pruIo Io,
uint8  Ball,
float_t Hz,
float_t Du 
)

Wrapper function for PwmMod::Value().

Parameters
IoThe pointer of the PruIo instance.
BallThe CPU ball number to test.
HzA pointer to store the frequency value (or null).
DuA pointer to store the duty cycle value (or null).
Returns
Zero on success (otherwise a string with an error message).
Since
0.2
Here is the caller graph for this function:

◆ pruio_qep_config()

char* pruio_qep_config ( pruIo Io,
uint8  Ball,
uint32  PMax,
float_t  VHz,
float_t  Scale,
uint8  Mo 
)

Wrapper function for QepMod::config().

Parameters
IoThe pointer of the PruIo instance.
BallThe CPU ball number (either input A, B or I).
PMaxThe maximum position counter value (defaults to &h7FFFFFFF).
VHzThe frequency to compute velocity values (defaults to 25 Hz).
ScaleThe Scale factor for velocity values (defaults to 1.0).
MoThe modus to use for pinmuxing (0 or PRUIO_PIN_RESET).
Returns
Zero on success (otherwise a string with an error message).
Since
0.4
Here is the caller graph for this function:

◆ pruio_qep_Value()

char* pruio_qep_Value ( pruIo Io,
uint8  Ball,
uint32 Posi,
float_t Velo 
)

Wrapper function for QepMod::Value().

Parameters
IoThe pointer of the PruIo instance.
BallThe CPU ball number (as in QepMod::config() call).
PosiA pointer to store the position value (or NULL).
VeloA pointer to store the valocity value (or NULL).
Returns
Zero on success (otherwise a string with an error message).
Since
0.4

◆ pruio_rb_start()

char* pruio_rb_start ( pruIo Io)

Wrapper function for PruIo::rb_start().

Parameters
IoThe pointer of the PruIo instance.
Returns
Zero on success (otherwise a string with an error message).
Since
0.2
Here is the caller graph for this function:

◆ pruio_tim_setValue()

char* pruio_tim_setValue ( pruIo Io,
uint8  Ball,
float_t  Dur1,
float_t  Dur2,
uint16  Mode 
)

Wrapper function for TimerUdt::setValue().

Parameters
IoThe pointer of the PruIo instance.
BallThe header pin to configure.
Dur1The duration in [ms] before state change (or 0 to stop timer).
Dur2The duration in [ms] for the state change (or 0 for minimal duration).
ModeThe modus to set (defaults to 0 = one cycle positive pulse).
Returns
Zero on success, an error string otherwise.
Since
0.4

◆ pruio_tim_Value()

char* pruio_tim_Value ( pruIo Io,
uint8  Ball,
float_t Dur1,
float_t Dur2 
)

Wrapper function for TimerUdt::Value().

Parameters
IoThe pointer of the PruIo instance.
BallThe header pin to configure.
Dur1The duration in [ms] before state change (or 0 to stop timer).
Dur2The duration in [ms] for the state change (or 0 for minimal duration).
Returns
Zero on success, an error string otherwise.
Since
0.4