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

This file synchronizes parameters between FreeBASIC, C and PASM source code. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros

#define | PRUIO_IRPT 25
| The interrupt number to use (25 => /dev/uio5, adapt constructor PruIo::PruIo() in case of changes). More...
#define | PRUIO_AZ_BALL 109
| The number of CPU balls to handle (minus one).
#define | PRUIO_AZ_GPIO 3
| The number of GPIO subsystems (minus one).
#define | PRUIO_AZ_PWMSS 2
| The number of PWM subsystems (minus one).
#define | PRUIO_COM_GPIO_CONF 10
| The command number to reconfigure a GPIO.
#define | PRUIO_COM_GPIO_OUT 11
| The command number to set a GPIO output state.
#define | PRUIO_COM_PWM 30
| Command number to set frequency and duty cycle for a PWM module (IO, RB)
#define | PRUIO_COM_PWM_CAP 31
| Command number to set frequency and duty cycle for a CAP module in PWM output mode (IO, RB)
#define | PRUIO_COM_CAP 32
| Command number to set a CAP module in input mode (IO, RB)
#define | PRUIO_COM_QEP 33
| The command number to set a QEP parameter change for a QEP module in IO mode.
#define | PRUIO_COM_ADC 50
| The command number to set a ADC-mask reconfiguration in IO mode.
#define | PRUIO_DAT_GPIO 64
| The offset to store GPIO data in PruIo::DRam (IO & MM, `4*4*4` bytes).
#define | PRUIO_DAT_PWM 128
| The offset to store PWM data in PruIo::DRam (IO, `3*8*4` bytes).
#define | PRUIO_DAT_ADC 224
| The offset to store ADC data in PruIo::DRam (IO, `4+2*17` bytes).
#define | PRUIO_DAT_ALL 512
| The offset to store the data block in PruIo::DRam (AdcSet + 4*GpioSet + BallSet + 3*PwmssSet).
#define | PRUIO_MSG_INIT_RUN 4294967295
| Message send by PruIo::PruIo().
#define | PRUIO_MSG_CONF_RUN 4294967294
| Message send by PruIo::PruIo().
#define | PRUIO_MSG_INIT_OK 4294967293
| Message send after constructor PruIo::~PruIo.
#define | PRUIO_MSG_CONF_OK 4294967292
| Message send after PruIo::config() when no mode is set (`parameter Samp = 0`).
#define | PRUIO_MSG_ADC_ERRR 4294967291
| Message send in case of error in PruIo::config().
#define | PRUIO_MSG_MM_WAIT 4294967290
| Message send by PruIo::config() in RB and MM mode and after each call to PruIo::mm_start().
#define | PRUIO_MSG_MM_TRG1 4294967289
| Message send by PruIo::mm_start() while waiting for trigger 1 event.
#define | PRUIO_MSG_MM_TRG2 4294967288
| Message send by PruIo::mm_start() while waiting for trigger 2 event.
#define | PRUIO_MSG_MM_TRG3 4294967287
| Message send by PruIo::mm_start() while waiting for trigger 3 event.
#define | PRUIO_MSG_MM_TRG4 4294967286
| Message send by PruIo::mm_start() while waiting for trigger 4 event.
#define | PRUIO_MSG_IO_OK 4294967285
| Message send after PruIo::config() in IO mode.

## Detailed Description

This file synchronizes parameters between FreeBASIC, C and PASM source code.

This file is used in FreeBASIC, C and PASM source code to synchonize the positions and the size of parameter blocks, exchanged in DRam. It also contains the PRU message code numbers.

Since all the syntaxes have different markers for comments, we cannot use 'normal' comments here. We've to enclose the comment text in preprocessor blocks that never get parsed.

Note
  We cannot use hexadecimal numbers here since syntaxes are different.

Definition in file pruio.hp.

## Macro Definition Documentation

#define PRUIO_IRPT 25

The interrupt number to use (25 => /dev/uio5, adapt constructor PruIo::PruIo() in case of changes).

Note that the interrupt channel and mask has to be adapted in file pruio.bi in case of any change here.

Definition at line 79 of file pruio.hp.