libpruio  0.6.8
Fast and easy Digital/Analog Input/Output for Beaglebones
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 IRPT   PRUIO_IRPT + 16
 The interrupt pointer to use (/dev/uio5)
 
#define CTBIR   0x22020
 Adress in constant table.
 
#define CONST_PRUCFG   C4
 Constant table entry for config (to enable OCP master port)
 
#define DRam   C24
 Constant table entry for DRam.
 
#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_AZ_TIMER   3
 The number of TIMER subsystems (minus one)
 
#define PRUIO_COM_POKE   10
 The command number to poke a value to memory.
 
#define PRUIO_COM_PEEK   9
 The command number to peek a value from memory.
 
#define PRUIO_COM_GPIO_CONF   20
 The command number to re-configure a GPIO.
 
#define PRUIO_COM_PWM   30
 Command number to re-configure frequency and duty cycle for a PWM module.
 
#define PRUIO_COM_CAP_PWM   29
 Command number to re-configure frequency and duty cycle for a CAP module in PWM output mode.
 
#define PRUIO_COM_CAP   28
 Command number to re-configure a CAP module.
 
#define PRUIO_COM_QEP   27
 The command number to re-configure a QEP parameter change for a QEP module.
 
#define PRUIO_COM_CAP_TIM   26
 The command number to re-configure a CAP in TIMER mode.
 
#define PRUIO_COM_TIM_PWM   40
 The command number to re-configure a TIMER in PWM mode.
 
#define PRUIO_COM_TIM_TIM   39
 The command number to re-configure a TIMER in TIMER mode.
 
#define PRUIO_COM_TIM_CAP   38
 The command number to re-configure a TIMER in CAP mode.
 
#define PRUIO_COM_ADC   50
 The command number to re-configure a ADC-mask in IO run mode.
 
#define PRUIO_DAT_GPIO   64
 The offset to store GPIO data in PruIo::DRam (4*4*4 bytes)
 
#define PRUIO_DAT_PWM   128
 The offset to store PWM data in PruIo::DRam (3*8*4 bytes)
 
#define PRUIO_DAT_TIMER   224
 The offset to store TIMER data in PruIo::DRam (4*4*4 bytes)
 
#define PRUIO_DAT_ADC   288
 The offset to store ADC data in PruIo::DRam (always last, 4+2*17 bytes)
 
#define PRUIO_DAT_ALL   512
 The offset to store the data block in PruIo::DRam Minimal value is AdcSet + 4 x GpioSet + BallSet + 3 x PwmssSet + 4 x TimerSet.
 
#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

◆ PRUIO_IRPT

#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 105 of file pruio.hp.