libpruio  0.0.2
AM33xx-PRU driver for digital input / output and analog input
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pruio.hp
Go to the documentation of this file.
1 #ifdef FOR_DOXYGEN_ONLY
2 /*!
3 \file pruio.hp
4 \brief Synchronize parameters between FreeBASIC, C and PASM source code.
5 
6 This file is used in FreeBASIC, C and PASM source code to synchonize
7 the positions and the size of parameter blocks, exchanged in DRam. It
8 also contains the message code numbers.
9 
10 Since all the syntaxes have different markers for comments, we cannot
11 use 'normal' comments here. We've to enclose the comment text in
12 preprocessor blocks that never get parsed.
13 
14 \note We cannot use hexadecimal numbers here since syntaxes are different.
15 
16 \def PRUIO_BALL_AZ
17 \brief The number of CPU balls to handle.
18 \def PRUIO_BALL_OFFS
19 \brief The DRam offset to store ball configs.
20 \def PRUIO_GPIO_AZ
21 \brief The number of GPIO devices.
22 \def PRUIO_GPIO_OFFS
23 \brief The offset in DRam to store the GPIO info.
24 \def PRUIO_GPIO_DATA
25 \brief The size of the UDT for initial GPIO data.
26 \def PRUIO_GPIO_BLCK
27 \brief The size of the GpioSet UDT for GPIO handling.
28 
29 \def PRUIO_ADC_OFFS
30 \brief The offset in DRam to store ADC parameters for config.
31 \def PRUIO_ADC_DATA
32 \brief The size of a full initial ADC data block.
33 \def PRUIO_ADC_EMPTY
34 \brief The size of an empty initial ADC data block.
35 \def PRUIO_ADC_BUFF
36 \brief The DRam offset for ADC samples.
37 \def PRUIO_TRG_PARA
38 \brief The DRam offset to store trigger parameters.
39 
40 \def PRUIO_IRPT
41 \brief The interrupt number to use (25 => uio5).
42 
43 Note that the interrupt channel and mask has to be adapted in file
44 pruio.bi in case of any change here.
45 
46 \def PRUIO_MSG_INIT_OK
47 \brief Message send by \ref PruIo::PruIo.
48 \def PRUIO_MSG_EXIT_OK
49 \brief Message send by \ref PruIo::~PruIo.
50 \def PRUIO_MSG_ADC_ERRR
51 \brief Message send by \ref PruIo::config() on errors.
52 \def PRUIO_MSG_IO_OK
53 \brief Message send by \ref PruIo::config() in IO mode.
54 \def PRUIO_MSG_MM_WAIT
55 \brief Message send by \ref PruIo::config() in MM mode and after each call to \ref PruIo::mm_start().
56 \def PRUIO_MSG_MM_TRG1
57 \brief Message send by \ref PruIo::mm_start() while waiting for trigger 1 event.
58 \def PRUIO_MSG_MM_TRG2
59 \brief Message send by \ref PruIo::mm_start() while waiting for trigger 2 event.
60 \def PRUIO_MSG_MM_TRG3
61 \brief Message send by \ref PruIo::mm_start() while waiting for trigger 3 event.
62 \def PRUIO_MSG_MM_TRG4
63 \brief Message send by \ref PruIo::mm_start() while waiting for trigger 4 event.
64 
65 */
66 #endif
67 
68 #define PRUIO_BALL_AZ 109
69 #define PRUIO_BALL_OFFS 256
70 
71 #define PRUIO_GPIO_AZ 3
72 #define PRUIO_GPIO_OFFS 64
73 #define PRUIO_GPIO_DATA 24
74 #define PRUIO_GPIO_BLCK 32
75 
76 #define PRUIO_ADC_OFFS 512
77 #define PRUIO_ADC_DATA 228
78 #define PRUIO_ADC_EMPTY 12
79 #define PRUIO_ADC_BUFF 16
80 #define PRUIO_TRG_PARA 4
81 
82 #define PRUIO_IRPT 25
83 
84 #define PRUIO_MSG_INIT_OK 4294967295
85 #define PRUIO_MSG_EXIT_OK 4294967294
86 #define PRUIO_MSG_ADC_ERRR 4294967293
87 #define PRUIO_MSG_IO_OK 4294967292
88 #define PRUIO_MSG_MM_WAIT 4294967291
89 #define PRUIO_MSG_MM_TRG1 4294967290
90 #define PRUIO_MSG_MM_TRG2 4294967289
91 #define PRUIO_MSG_MM_TRG3 4294967288
92 #define PRUIO_MSG_MM_TRG4 4294967287