Date:2010-11-10 20:20:10 (12 years 10 months ago)
Author:Juan64Bits
Commit:9d578912b727722b22319832985451a79ec35747
Message:Updating prototype of SIE code generator.

Files: Examples/ADC/Test-QT-src/ADC1.pro (1 diff)
Examples/ADC/Test-QT-src/ADC1.pro.user (1 diff)
Examples/ADC/Test-QT-src/ADCw.cpp (1 diff)
Examples/ADC/Test-QT-src/ADCw.h (1 diff)
Examples/ADC/Test-QT-src/ADCw.o (0 diffs)
Examples/ADC/Test-QT-src/Makefile (1 diff)
Examples/ADC/Test-QT-src/TestADC (0 diffs)
Examples/ADC/Test-QT-src/compile-mips (1 diff)
Examples/ADC/Test-QT-src/jz47xx_gpio.cpp (1 diff)
Examples/ADC/Test-QT-src/jz47xx_gpio.h (1 diff)
Examples/ADC/Test-QT-src/jz47xx_gpio.o (0 diffs)
Examples/ADC/Test-QT-src/jz47xx_mmap.cpp (1 diff)
Examples/ADC/Test-QT-src/jz47xx_mmap.h (1 diff)
Examples/ADC/Test-QT-src/jz47xx_mmap.o (0 diffs)
Examples/ADC/Test-QT-src/jz_adc_peripheral.cpp (1 diff)
Examples/ADC/Test-QT-src/jz_adc_peripheral.h (1 diff)
Examples/ADC/Test-QT-src/jz_adc_peripheral.o (0 diffs)
Examples/ADC/Test-QT-src/main.cpp (1 diff)
Examples/ADC/Test-QT-src/main.o (0 diffs)
Examples/ADC/Test-QT-src/mainwindow.cpp (1 diff)
Examples/ADC/Test-QT-src/mainwindow.h (1 diff)
Examples/ADC/Test-QT-src/mainwindow.o (0 diffs)
Examples/ADC/Test-QT-src/mainwindow.ui (1 diff)
Examples/ADC/Test-QT-src/moc_mainwindow.cpp (1 diff)
Examples/ADC/Test-QT-src/moc_mainwindow.o (0 diffs)
Examples/ADC/Test-QT-src/qmake.conf (1 diff)
Examples/ADC/Test-QT-src/signaldisplay.cpp (1 diff)
Examples/ADC/Test-QT-src/signaldisplay.h (1 diff)
Examples/ADC/Test-QT-src/signaldisplay.o (0 diffs)
Examples/ADC/Test-QT-src/ui_mainwindow.h (1 diff)
KICAD_design_files/SAKC_PCB_v2/N_MODELS/J17.mod (2 diffs)
KICAD_design_files/SAKC_PCB_v2/SAKC.pro (2 diffs)
Software/sie_cg/block_editor/adc_single.die (1 diff)
Software/sie_cg/block_editor/constant.die (1 diff)
Software/sie_cg/block_editor/diagramscene.cpp (1 diff)
Software/sie_cg/block_editor/left_shift.die (1 diff)
Software/sie_cg/block_editor/mainwindow.cpp (2 diffs)
Software/sie_cg/block_editor/pwm_single.die (1 diff)
Software/sie_cg/block_editor/right_shift.die (1 diff)
Software/sie_cg/block_editor/test_block2.die (1 diff)
Software/sie_cg/block_editor/timer.die (1 diff)
Software/sie_cg/block_editor/while.die (1 diff)
Software/sie_cg/diagramscene.cpp (3 diffs)
Software/sie_cg/diagramscene.pro.user (8 diffs)
Software/sie_cg/mainwindow.cpp (2 diffs)
Software/sie_cg/mainwindow.h (1 diff)
Software/sie_cg/test.sie (1 diff)
Software/sie_cg/test1.png (0 diffs)

Change Details

Examples/ADC/Test-QT-src/ADC1.pro
1# #####################################################################
2# Automatically generated by qmake (2.01a) Sat Apr 3 14:28:42 2010
3# #####################################################################
4TEMPLATE = app
5TARGET = TestADC
6DEPENDPATH += .
7INCLUDEPATH += .
8
9# Input
10HEADERS += mainwindow.h \
11    jz47xx_mmap.h \
12    signaldisplay.h \
13    ADCw.h \
14    jz_adc_peripheral.h \
15    jz47xx_gpio.h
16FORMS += mainwindow.ui
17SOURCES += main.cpp \
18    mainwindow.cpp \
19    signaldisplay.cpp \
20    ADCw.cpp \
21    jz_adc_peripheral.cpp \
22    jz47xx_gpio.cpp \
23    jz47xx_mmap.cpp
Examples/ADC/Test-QT-src/ADC1.pro.user
1<!DOCTYPE QtCreatorProject>
2<qtcreator>
3 <data>
4  <variable>RunConfiguration0-Arguments</variable>
5  <valuelist type="QVariantList"/>
6 </data>
7 <data>
8  <variable>RunConfiguration0-BaseEnvironmentBase</variable>
9  <value type="int">2</value>
10 </data>
11 <data>
12  <variable>RunConfiguration0-Executable</variable>
13  <value type="QString">/home/juan64bits/Desktop/nn-usb-fpga/Examples/ADC/Scope-QT-src/ADC</value>
14 </data>
15 <data>
16  <variable>RunConfiguration0-RunConfiguration.name</variable>
17  <value type="QString">Run /home/juan64bits/Desktop/nn-usb-fpga/Examples/ADC/Scope-QT-src/ADC</value>
18 </data>
19 <data>
20  <variable>RunConfiguration0-UseTerminal</variable>
21  <value type="bool">false</value>
22 </data>
23 <data>
24  <variable>RunConfiguration0-UserEnvironmentChanges</variable>
25  <valuelist type="QVariantList"/>
26 </data>
27 <data>
28  <variable>RunConfiguration0-UserName</variable>
29  <value type="QString"></value>
30 </data>
31 <data>
32  <variable>RunConfiguration0-UserSetName</variable>
33  <value type="bool">false</value>
34 </data>
35 <data>
36  <variable>RunConfiguration0-WorkingDirectory</variable>
37  <value type="QString">$BUILDDIR</value>
38 </data>
39 <data>
40  <variable>RunConfiguration0-type</variable>
41  <value type="QString">ProjectExplorer.CustomExecutableRunConfiguration</value>
42 </data>
43 <data>
44  <variable>activeRunConfiguration</variable>
45  <value type="int">0</value>
46 </data>
47 <data>
48  <variable>activebuildconfiguration</variable>
49  <value type="QString">Debug</value>
50 </data>
51 <data>
52  <variable>buildConfiguration-Debug</variable>
53  <valuemap type="QVariantMap">
54   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
55   <value key="QtVersionId" type="int">2</value>
56   <value key="ToolChain" type="int">0</value>
57   <value key="addQDumper" type=""></value>
58   <value key="buildConfiguration" type="int">2</value>
59  </valuemap>
60 </data>
61 <data>
62  <variable>buildconfiguration-Debug-buildstep0</variable>
63  <valuemap type="QVariantMap">
64   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
65   <valuelist key="abstractProcess.Environment" type="QVariantList">
66    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-R9oeYpdn1v,guid=bf98b5220eae3f73ac0e2cd74ccd76a4</value>
67    <value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
68    <value type="QString">DESKTOP_SESSION=gnome</value>
69    <value type="QString">DISPLAY=:0.0</value>
70    <value type="QString">GDMSESSION=gnome</value>
71    <value type="QString">GDM_KEYBOARD_LAYOUT=es</value>
72    <value type="QString">GDM_LANG=en_US.utf8</value>
73    <value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
74    <value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-78MfHT</value>
75    <value type="QString">GNOME_KEYRING_PID=1538</value>
76    <value type="QString">GTK_MODULES=canberra-gtk-module</value>
77    <value type="QString">HOME=/home/juan64bits</value>
78    <value type="QString">LANG=en_US.utf8</value>
79    <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
80    <value type="QString">LOGNAME=juan64bits</value>
81    <value type="QString">MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path</value>
82    <value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-juan64bits</value>
83    <value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
84    <value type="QString">PWD=/home/juan64bits</value>
85    <value type="QString">QTDIR=/usr/share/qt4</value>
86    <value type="QString">SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1556,unix/Maximus:/tmp/.ICE-unix/1556</value>
87    <value type="QString">SHELL=/bin/bash</value>
88    <value type="QString">SPEECHD_PORT=7560</value>
89    <value type="QString">SSH_AGENT_PID=1592</value>
90    <value type="QString">SSH_AUTH_SOCK=/tmp/keyring-78MfHT/ssh</value>
91    <value type="QString">USER=juan64bits</value>
92    <value type="QString">USERNAME=juan64bits</value>
93    <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-juan64bits-mGObKq/database</value>
94    <value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
95    <value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
96    <value type="QString">XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1288533667.711046-1067046560</value>
97   </valuelist>
98   <valuelist key="abstractProcess.arguments" type="QVariantList">
99    <value type="QString">/home/juan64bits/ebd/ECB/nn-usb-fpga2/Examples/ADC/Test-QT-src/ADC1.pro</value>
100    <value type="QString">-spec</value>
101    <value type="QString">linux-g++</value>
102    <value type="QString">-r</value>
103    <value type="QString">CONFIG+=debug</value>
104   </valuelist>
105   <value key="abstractProcess.command" type="QString">/usr/bin/qmake-qt4</value>
106   <value key="abstractProcess.enabled" type="bool">true</value>
107   <value key="abstractProcess.workingDirectory" type="QString">/home/juan64bits/ebd/ECB/nn-usb-fpga2/Examples/ADC/Test-QT-src</value>
108   <value key="buildConfiguration" type=""></value>
109  </valuemap>
110 </data>
111 <data>
112  <variable>buildconfiguration-Debug-buildstep1</variable>
113  <valuemap type="QVariantMap">
114   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
115   <valuelist key="abstractProcess.Environment" type="QVariantList">
116    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-R9oeYpdn1v,guid=bf98b5220eae3f73ac0e2cd74ccd76a4</value>
117    <value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
118    <value type="QString">DESKTOP_SESSION=gnome</value>
119    <value type="QString">DISPLAY=:0.0</value>
120    <value type="QString">GDMSESSION=gnome</value>
121    <value type="QString">GDM_KEYBOARD_LAYOUT=es</value>
122    <value type="QString">GDM_LANG=en_US.utf8</value>
123    <value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
124    <value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-78MfHT</value>
125    <value type="QString">GNOME_KEYRING_PID=1538</value>
126    <value type="QString">GTK_MODULES=canberra-gtk-module</value>
127    <value type="QString">HOME=/home/juan64bits</value>
128    <value type="QString">LANG=en_US.utf8</value>
129    <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
130    <value type="QString">LOGNAME=juan64bits</value>
131    <value type="QString">MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path</value>
132    <value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-juan64bits</value>
133    <value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
134    <value type="QString">PWD=/home/juan64bits</value>
135    <value type="QString">QTDIR=/usr/share/qt4</value>
136    <value type="QString">SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1556,unix/Maximus:/tmp/.ICE-unix/1556</value>
137    <value type="QString">SHELL=/bin/bash</value>
138    <value type="QString">SPEECHD_PORT=7560</value>
139    <value type="QString">SSH_AGENT_PID=1592</value>
140    <value type="QString">SSH_AUTH_SOCK=/tmp/keyring-78MfHT/ssh</value>
141    <value type="QString">USER=juan64bits</value>
142    <value type="QString">USERNAME=juan64bits</value>
143    <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-juan64bits-mGObKq/database</value>
144    <value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
145    <value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
146    <value type="QString">XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1288533667.711046-1067046560</value>
147   </valuelist>
148   <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value>
149   <valuelist key="abstractProcess.arguments" type="QVariantList">
150    <value type="QString">-w</value>
151   </valuelist>
152   <value key="abstractProcess.command" type="QString">/usr/bin/make</value>
153   <value key="abstractProcess.enabled" type="bool">true</value>
154   <value key="abstractProcess.workingDirectory" type="QString">/home/juan64bits/ebd/ECB/nn-usb-fpga2/Examples/ADC/Test-QT-src</value>
155  </valuemap>
156 </data>
157 <data>
158  <variable>buildconfiguration-Debug-cleanstep0</variable>
159  <valuemap type="QVariantMap">
160   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
161   <value key="cleanConfig" type="bool">true</value>
162   <valuelist key="makeargs" type="QVariantList">
163    <value type="QString">clean</value>
164   </valuelist>
165  </valuemap>
166 </data>
167 <data>
168  <variable>buildconfigurations</variable>
169  <valuelist type="QVariantList">
170   <value type="QString">Debug</value>
171  </valuelist>
172 </data>
173 <data>
174  <variable>buildstep0</variable>
175  <valuemap type="QVariantMap">
176   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
177   <value key="mkspec" type="QString"></value>
178  </valuemap>
179 </data>
180 <data>
181  <variable>buildstep1</variable>
182  <valuemap type="QVariantMap">
183   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
184  </valuemap>
185 </data>
186 <data>
187  <variable>buildsteps</variable>
188  <valuelist type="QVariantList">
189   <value type="QString">trolltech.qt4projectmanager.qmake</value>
190   <value type="QString">trolltech.qt4projectmanager.make</value>
191  </valuelist>
192 </data>
193 <data>
194  <variable>cleanstep0</variable>
195  <valuemap type="QVariantMap">
196   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
197   <value key="clean" type="bool">true</value>
198  </valuemap>
199 </data>
200 <data>
201  <variable>cleansteps</variable>
202  <valuelist type="QVariantList">
203   <value type="QString">trolltech.qt4projectmanager.make</value>
204  </valuelist>
205 </data>
206 <data>
207  <variable>defaultFileEncoding</variable>
208  <value type="QByteArray">System</value>
209 </data>
210 <data>
211  <variable>project</variable>
212  <valuemap type="QVariantMap"/>
213 </data>
214</qtcreator>
Examples/ADC/Test-QT-src/ADCw.cpp
1#include "ADCw.h"
2
3ADCw::ADCw()
4{
5    BUFFER_OFFSET = 8; //Ignore first 16 samples
6    ADC_SPI_CLKDIV=ADC_SPI_CLKDIV_MAX; //Set clock to minimum speed
7    BUFFER_LEN=16;
8    MUX_CHANNELS =0;
9
10    ADCBuffer = jz_adc_init();
11
12    //Clean FPGA RAM memory
13    for (int i = 0; i < 512; i++) //RAMB16_s9_s9 has 2048 bytes 8-bit
14    {
15        ADCBuffer[i] = 0x00000000; //Clean 4 register by cicle
16    }
17
18    adcConfig(ADC_CMD_SET_SPI_CLKDIV);
19    adcConfig(ADC_CMD_SET_FAST_CONV);
20    printf("\nADC in Fast Convertion Mode (10us) and Fs=9.8KHz (Min)\n");
21}
22
23void ADCw::testADC()
24{
25    int aggregate=0; float errorT=0;
26    /******************************* TEST 1 ***********************************/
27    printf("\nINIT TEST1: Autoselft {(Vref+) - (Vref-)}/2 -> Return 0x0200 \n");
28    adcConfig(ADC_CMD_SET_AUTOSELFT_1);
29    adcConfig(ADC_CMD_READ_AUTOSELFT_1);
30    for(int i=BUFFER_OFFSET; i< BUFFER_LEN/2+BUFFER_OFFSET; i++)
31    {
32        aggregate += (ADCBuffer[i]&0xFFFF + ((ADCBuffer[i]>>16)&0x0FFF));
33        printf("[%08X]", ADCBuffer[i]);
34    }
35    errorT=(aggregate/16)*100/0x200;
36    if((errorT<95)||(errorT>105))
37        printf("\n**WARNING** Test FAILED.\n\n");
38    else
39        printf("\nTest OK\n\n");
40
41    aggregate=0;
42    fflush (stdout);
43
44    /******************************* TEST 2 ***********************************/
45    printf("\n\nINIT TEST2: Autoselft (Vref-) -> Return 0x0000 \n");
46    adcConfig(ADC_CMD_SET_AUTOSELFT_2);
47    adcConfig(ADC_CMD_READ_AUTOSELFT_2);
48    for(int i=BUFFER_OFFSET; i< BUFFER_LEN/2+BUFFER_OFFSET; i++)
49    {
50        aggregate += (ADCBuffer[i]&0xFFFF + ((ADCBuffer[i]>>16)&0x0FFF));
51        printf("[%08X]", ADCBuffer[i]);
52    }
53    if(aggregate!=0)
54        printf("\n**WARNING** Test FAILED. Expected value=0x0000.\n\n");
55    else
56        printf("\nTest OK\n\n");
57
58    aggregate=0;
59    fflush (stdout);
60
61    /******************************* TEST 3 ***********************************/
62    printf("\n\nINIT TEST3: Autoselft (Vref+) -> Return 0x03FF \n");
63    adcConfig(ADC_CMD_SET_AUTOSELFT_3);
64    adcConfig(ADC_CMD_READ_AUTOSELFT_3);
65    for(int i=BUFFER_OFFSET; i< BUFFER_LEN/2+BUFFER_OFFSET; i++)
66    {
67        aggregate += (ADCBuffer[i]&0xFFFF + ((ADCBuffer[i]>>16)&0x0FFF));
68        printf("[%08X]", ADCBuffer[i]);
69    }
70    errorT=(aggregate/16)*100/0x3FF;
71    if((errorT<95)||(errorT>105))
72        printf("\n**WARNING** Test FAILED.\n\n");
73    else
74        printf("\nTest OK\n\n");
75
76    fflush (stdout);
77}
78
79void ADCw::powerDownADC()
80{
81    adcConfig(ADC_CMD_SET_POWER_DOWN);
82    printf("\nADC in Power Down Mode \n");
83}
84
85JZ_REG* ADCw::takeSamplesADC(int CHANNEL)
86{
87    adcConfig(ADC_CMD_SET_CHANNEL0+CHANNEL);
88    adcConfig(ADC_CMD_READ_CHANNEL0+CHANNEL);
89    return (JZ_REG*)(ADCBuffer+BUFFER_OFFSET);
90}
91
92void ADCw::adcConfig(uchar CMD)
93{
94    ADCBuffer[0] = (((MUX_CHANNELS<<6) + CMD)<<24) + \
95                    ((BUFFER_LEN+BUFFER_OFFSET*2) << 8) + \
96                    (ADC_SPI_CLKDIV);
97    while(adcCheckBufferFull()) usleep (10);
98}
99
100int ADCw::adcCheckBufferFull()
101{
102    return ADCBuffer[0]&0x20000000;
103}
Examples/ADC/Test-QT-src/ADCw.h
1#ifndef ADCW_H
2#define ADCW_H
3
4#include "jz_adc_peripheral.h"
5#include <stdio.h>
6#include <unistd.h>
7
8class ADCw
9{
10public:
11    ADCw();
12    ~ADCw(){}
13
14    void testADC();
15    void powerDownADC();
16    JZ_REG * takeSamplesADC(int CHANNEL);
17    void setClockDiv(uchar value){ ADC_SPI_CLKDIV = value;}
18    void setBufferLen(int value){ BUFFER_LEN = value;}
19    void setMuxChannels(uchar value){ MUX_CHANNELS = value;}
20private:
21    void adcConfig(uchar CMD);
22    int adcCheckBufferFull();
23
24    JZ_REG * ADCBuffer;
25    uchar ADC_SPI_CLKDIV;
26    int BUFFER_LEN;
27    int BUFFER_OFFSET;
28    uchar MUX_CHANNELS;
29};
30
31#endif // ADCW_H
Examples/ADC/Test-QT-src/ADCw.o
Examples/ADC/Test-QT-src/Makefile
1#############################################################################
2# Makefile for building: TestADC
3# Generated by qmake (2.01a) (Qt 4.6.2) on: Sun Oct 31 11:42:42 2010
4# Project: ADC1.pro
5# Template: app
6# Command: /usr/bin/qmake -unix -o Makefile ADC1.pro
7#############################################################################
8
9####### Compiler, tools and options
10
11CC = gcc
12CXX = g++
13DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
14CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
15CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
16INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I.
17LINK = g++
18LFLAGS = -Wl,-O1
19LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -lQtCore -lpthread
20AR = ar cqs
21RANLIB =
22QMAKE = /usr/bin/qmake
23TAR = tar -cf
24COMPRESS = gzip -9f
25COPY = cp -f
26SED = sed
27COPY_FILE = $(COPY)
28COPY_DIR = $(COPY) -r
29STRIP = strip
30INSTALL_FILE = install -m 644 -p
31INSTALL_DIR = $(COPY_DIR)
32INSTALL_PROGRAM = install -m 755 -p
33DEL_FILE = rm -f
34SYMLINK = ln -f -s
35DEL_DIR = rmdir
36MOVE = mv -f
37CHK_DIR_EXISTS= test -d
38MKDIR = mkdir -p
39
40####### Output directory
41
42OBJECTS_DIR = ./
43
44####### Files
45
46SOURCES = main.cpp \
47        mainwindow.cpp \
48        signaldisplay.cpp \
49        ADCw.cpp \
50        jz_adc_peripheral.cpp \
51        jz47xx_gpio.cpp \
52        jz47xx_mmap.cpp moc_mainwindow.cpp
53OBJECTS = main.o \
54        mainwindow.o \
55        signaldisplay.o \
56        ADCw.o \
57        jz_adc_peripheral.o \
58        jz47xx_gpio.o \
59        jz47xx_mmap.o \
60        moc_mainwindow.o
61DIST = /usr/share/qt4/mkspecs/common/g++.conf \
62        /usr/share/qt4/mkspecs/common/unix.conf \
63        /usr/share/qt4/mkspecs/common/linux.conf \
64        /usr/share/qt4/mkspecs/qconfig.pri \
65        /usr/share/qt4/mkspecs/features/qt_functions.prf \
66        /usr/share/qt4/mkspecs/features/qt_config.prf \
67        /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
68        /usr/share/qt4/mkspecs/features/default_pre.prf \
69        /usr/share/qt4/mkspecs/features/release.prf \
70        /usr/share/qt4/mkspecs/features/default_post.prf \
71        /usr/share/qt4/mkspecs/features/warn_on.prf \
72        /usr/share/qt4/mkspecs/features/qt.prf \
73        /usr/share/qt4/mkspecs/features/unix/thread.prf \
74        /usr/share/qt4/mkspecs/features/moc.prf \
75        /usr/share/qt4/mkspecs/features/resources.prf \
76        /usr/share/qt4/mkspecs/features/uic.prf \
77        /usr/share/qt4/mkspecs/features/yacc.prf \
78        /usr/share/qt4/mkspecs/features/lex.prf \
79        /usr/share/qt4/mkspecs/features/include_source_dir.prf \
80        ADC1.pro
81QMAKE_TARGET = TestADC
82DESTDIR =
83TARGET = TestADC
84
85first: all
86####### Implicit rules
87
88.SUFFIXES: .o .c .cpp .cc .cxx .C
89
90.cpp.o:
91    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
92
93.cc.o:
94    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
95
96.cxx.o:
97    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
98
99.C.o:
100    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
101
102.c.o:
103    $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
104
105####### Build rules
106
107all: Makefile $(TARGET)
108
109$(TARGET): ui_mainwindow.h $(OBJECTS)
110    $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
111
112Makefile: ADC1.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/g++.conf \
113        /usr/share/qt4/mkspecs/common/unix.conf \
114        /usr/share/qt4/mkspecs/common/linux.conf \
115        /usr/share/qt4/mkspecs/qconfig.pri \
116        /usr/share/qt4/mkspecs/features/qt_functions.prf \
117        /usr/share/qt4/mkspecs/features/qt_config.prf \
118        /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
119        /usr/share/qt4/mkspecs/features/default_pre.prf \
120        /usr/share/qt4/mkspecs/features/release.prf \
121        /usr/share/qt4/mkspecs/features/default_post.prf \
122        /usr/share/qt4/mkspecs/features/warn_on.prf \
123        /usr/share/qt4/mkspecs/features/qt.prf \
124        /usr/share/qt4/mkspecs/features/unix/thread.prf \
125        /usr/share/qt4/mkspecs/features/moc.prf \
126        /usr/share/qt4/mkspecs/features/resources.prf \
127        /usr/share/qt4/mkspecs/features/uic.prf \
128        /usr/share/qt4/mkspecs/features/yacc.prf \
129        /usr/share/qt4/mkspecs/features/lex.prf \
130        /usr/share/qt4/mkspecs/features/include_source_dir.prf \
131        /usr/lib/libQtGui.prl \
132        /usr/lib/libQtCore.prl
133    $(QMAKE) -unix -o Makefile ADC1.pro
134/usr/share/qt4/mkspecs/common/g++.conf:
135/usr/share/qt4/mkspecs/common/unix.conf:
136/usr/share/qt4/mkspecs/common/linux.conf:
137/usr/share/qt4/mkspecs/qconfig.pri:
138/usr/share/qt4/mkspecs/features/qt_functions.prf:
139/usr/share/qt4/mkspecs/features/qt_config.prf:
140/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
141/usr/share/qt4/mkspecs/features/default_pre.prf:
142/usr/share/qt4/mkspecs/features/release.prf:
143/usr/share/qt4/mkspecs/features/default_post.prf:
144/usr/share/qt4/mkspecs/features/warn_on.prf:
145/usr/share/qt4/mkspecs/features/qt.prf:
146/usr/share/qt4/mkspecs/features/unix/thread.prf:
147/usr/share/qt4/mkspecs/features/moc.prf:
148/usr/share/qt4/mkspecs/features/resources.prf:
149/usr/share/qt4/mkspecs/features/uic.prf:
150/usr/share/qt4/mkspecs/features/yacc.prf:
151/usr/share/qt4/mkspecs/features/lex.prf:
152/usr/share/qt4/mkspecs/features/include_source_dir.prf:
153/usr/lib/libQtGui.prl:
154/usr/lib/libQtCore.prl:
155qmake: FORCE
156    @$(QMAKE) -unix -o Makefile ADC1.pro
157
158dist:
159    @$(CHK_DIR_EXISTS) .tmp/TestADC1.0.0 || $(MKDIR) .tmp/TestADC1.0.0
160    $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/TestADC1.0.0/ && $(COPY_FILE) --parents mainwindow.h jz47xx_mmap.h signaldisplay.h ADCw.h jz_adc_peripheral.h jz47xx_gpio.h .tmp/TestADC1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp signaldisplay.cpp ADCw.cpp jz_adc_peripheral.cpp jz47xx_gpio.cpp jz47xx_mmap.cpp .tmp/TestADC1.0.0/ && $(COPY_FILE) --parents mainwindow.ui .tmp/TestADC1.0.0/ && (cd `dirname .tmp/TestADC1.0.0` && $(TAR) TestADC1.0.0.tar TestADC1.0.0 && $(COMPRESS) TestADC1.0.0.tar) && $(MOVE) `dirname .tmp/TestADC1.0.0`/TestADC1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/TestADC1.0.0
161
162
163clean:compiler_clean
164    -$(DEL_FILE) $(OBJECTS)
165    -$(DEL_FILE) *~ core *.core
166
167
168####### Sub-libraries
169
170distclean: clean
171    -$(DEL_FILE) $(TARGET)
172    -$(DEL_FILE) Makefile
173
174
175mocclean: compiler_moc_header_clean compiler_moc_source_clean
176
177mocables: compiler_moc_header_make_all compiler_moc_source_make_all
178
179compiler_moc_header_make_all: moc_mainwindow.cpp
180compiler_moc_header_clean:
181    -$(DEL_FILE) moc_mainwindow.cpp
182moc_mainwindow.cpp: ADCw.h \
183        jz_adc_peripheral.h \
184        jz47xx_mmap.h \
185        jz47xx_gpio.h \
186        mainwindow.h
187    /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp
188
189compiler_rcc_make_all:
190compiler_rcc_clean:
191compiler_image_collection_make_all: qmake_image_collection.cpp
192compiler_image_collection_clean:
193    -$(DEL_FILE) qmake_image_collection.cpp
194compiler_moc_source_make_all:
195compiler_moc_source_clean:
196compiler_uic_make_all: ui_mainwindow.h
197compiler_uic_clean:
198    -$(DEL_FILE) ui_mainwindow.h
199ui_mainwindow.h: mainwindow.ui \
200        signaldisplay.h
201    /usr/bin/uic-qt4 mainwindow.ui -o ui_mainwindow.h
202
203compiler_yacc_decl_make_all:
204compiler_yacc_decl_clean:
205compiler_yacc_impl_make_all:
206compiler_yacc_impl_clean:
207compiler_lex_make_all:
208compiler_lex_clean:
209compiler_clean: compiler_moc_header_clean compiler_uic_clean
210
211####### Compile
212
213main.o: main.cpp mainwindow.h \
214        ADCw.h \
215        jz_adc_peripheral.h \
216        jz47xx_mmap.h \
217        jz47xx_gpio.h
218    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
219
220mainwindow.o: mainwindow.cpp mainwindow.h \
221        ADCw.h \
222        jz_adc_peripheral.h \
223        jz47xx_mmap.h \
224        jz47xx_gpio.h \
225        ui_mainwindow.h
226    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
227
228signaldisplay.o: signaldisplay.cpp signaldisplay.h
229    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o signaldisplay.o signaldisplay.cpp
230
231ADCw.o: ADCw.cpp ADCw.h \
232        jz_adc_peripheral.h \
233        jz47xx_mmap.h \
234        jz47xx_gpio.h
235    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ADCw.o ADCw.cpp
236
237jz_adc_peripheral.o: jz_adc_peripheral.cpp jz_adc_peripheral.h \
238        jz47xx_mmap.h \
239        jz47xx_gpio.h
240    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o jz_adc_peripheral.o jz_adc_peripheral.cpp
241
242jz47xx_gpio.o: jz47xx_gpio.cpp jz47xx_gpio.h \
243        jz47xx_mmap.h
244    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o jz47xx_gpio.o jz47xx_gpio.cpp
245
246jz47xx_mmap.o: jz47xx_mmap.cpp jz47xx_mmap.h
247    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o jz47xx_mmap.o jz47xx_mmap.cpp
248
249moc_mainwindow.o: moc_mainwindow.cpp
250    $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
251
252####### Install
253
254install: FORCE
255
256uninstall: FORCE
257
258FORCE:
259
Examples/ADC/Test-QT-src/TestADC
Examples/ADC/Test-QT-src/compile-mips
1#!/bin/sh
2QT_BASE_DIR="/home/cain/Embedded/ingenic/sakc/build/openwrt-xburst/build_dir/target-mipsel_uClibc-0.9.30.1/qt-everywhere-opensource-src-4.6.2/"
3${QT_BASE_DIR}/bin/qmake -spec ${QT_BASE_DIR}mkspecs/qws/linux-openwrt-g++ -unix -o Makefile
4make
5
Examples/ADC/Test-QT-src/jz47xx_gpio.cpp
1/*
2  JZ47xx GPIO at userspace
3
4  Copyright (C) 2010 Andres Calderon andres.calderon@emqbit.com
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
20#include <stdio.h>
21#include <stdlib.h>
22#include <unistd.h>
23
24#include <jz47xx_gpio.h>
25#include <jz47xx_mmap.h>
26
27
28#define JZ_GPIO_BASE 0x10010000
29
30void
31jz_gpio_as_output (JZ_PIO * pio, unsigned int o)
32{
33  pio->PXFUNC = (1 << (o));
34  pio->PXSELC = (1 << (o));
35  pio->PXDIRS = (1 << (o));
36}
37
38void
39jz_gpio_as_input (JZ_PIO * pio, unsigned int o)
40{
41  pio->PXFUNC = (1 << (o));
42  pio->PXSELC = (1 << (o));
43  pio->PXDIRC = (1 << (o));
44}
45
46void
47jz_gpio_set_pin (JZ_PIO * pio, unsigned int o)
48{
49  pio->PXDATS = (1 << (o));
50}
51
52void
53jz_gpio_clear_pin (JZ_PIO * pio, unsigned int o)
54{
55  pio->PXDATC = (1 << (o));
56}
57
58void
59jz_gpio_out (JZ_PIO * pio, unsigned int o, unsigned int val)
60{
61  if (val == 0)
62    pio->PXDATC = (1 << (o));
63  else
64    pio->PXDATS = (1 << (o));
65}
66
67unsigned int
68jz_gpio_get_pin (JZ_PIO * pio, unsigned int o)
69{
70  return (pio->PXPIN & (1 << o)) ? 1 : 0;
71}
72
73int
74jz_gpio_as_func (JZ_PIO * pio, unsigned int o, int func)
75{
76  switch (func)
77    {
78    case 0:
79      pio->PXFUNS = (1 << o);
80      pio->PXTRGC = (1 << o);
81      pio->PXSELC = (1 << o);
82      return 1;
83
84    case 1:
85      pio->PXFUNS = (1 << o);
86      pio->PXTRGC = (1 << o);
87      pio->PXSELS = (1 << o);
88      return 1;
89
90    case 2:
91      pio->PXFUNS = (1 << o);
92      pio->PXTRGS = (1 << o);
93      pio->PXSELC = (1 << o);
94      return 1;
95    }
96  return 0;
97}
98
99JZ_PIO *
100jz_gpio_map (int port)
101{
102  JZ_PIO *pio;
103
104  pio = (JZ_PIO *) jz_mmap (JZ_GPIO_BASE);
105  pio = (JZ_PIO *) ((unsigned int) pio + port * 0x100);
106
107  return pio;
108}
Examples/ADC/Test-QT-src/jz47xx_gpio.h
1/*
2  JZ47xx GPIO at userspace
3
4  Copyright (C) 2010 Andres Calderon andres.calderon@emqbit.com
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
20#ifndef __jz47xx_gpio_h__
21#define __jz47xx_gpio_h__
22
23#define JZ_GPIO_PORT_A 0
24#define JZ_GPIO_PORT_B 1
25#define JZ_GPIO_PORT_C 2
26#define JZ_GPIO_PORT_D 3
27
28typedef volatile unsigned int JZ_REG; /* Hardware register definition */
29
30typedef struct _JZ_PIO
31{
32  JZ_REG PXPIN; /* PIN Level Register */
33  JZ_REG Reserved0;
34  JZ_REG Reserved1;
35  JZ_REG Reserved2;
36  JZ_REG PXDAT; /* Port Data Register */
37  JZ_REG PXDATS; /* Port Data Set Register */
38  JZ_REG PXDATC; /* Port Data Clear Register */
39  JZ_REG Reserved3;
40  JZ_REG PXIM; /* Interrupt Mask Register */
41  JZ_REG PXIMS; /* Interrupt Mask Set Reg */
42  JZ_REG PXIMC; /* Interrupt Mask Clear Reg */
43  JZ_REG Reserved4;
44  JZ_REG PXPE; /* Pull Enable Register */
45  JZ_REG PXPES; /* Pull Enable Set Reg. */
46  JZ_REG PXPEC; /* Pull Enable Clear Reg. */
47  JZ_REG Reserved5;
48  JZ_REG PXFUN; /* Function Register */
49  JZ_REG PXFUNS; /* Function Set Register */
50  JZ_REG PXFUNC; /* Function Clear Register */
51  JZ_REG Reserved6;
52  JZ_REG PXSEL; /* Select Register */
53  JZ_REG PXSELS; /* Select Set Register */
54  JZ_REG PXSELC; /* Select Clear Register */
55  JZ_REG Reserved7;
56  JZ_REG PXDIR; /* Direction Register */
57  JZ_REG PXDIRS; /* Direction Set Register */
58  JZ_REG PXDIRC; /* Direction Clear Register */
59  JZ_REG Reserved8;
60  JZ_REG PXTRG; /* Trigger Register */
61  JZ_REG PXTRGS; /* Trigger Set Register */
62  JZ_REG PXTRGC; /* Trigger Set Register */
63  JZ_REG Reserved9;
64  JZ_REG PXFLG; /* Port Flag Register */
65  JZ_REG PXFLGC; /* Port Flag clear Register */
66} JZ_PIO, *PJZ_PIO;
67
68void jz_gpio_as_output (JZ_PIO * pio, unsigned int o);
69
70void jz_gpio_as_input (JZ_PIO * pio, unsigned int o);
71
72void jz_gpio_set_pin (JZ_PIO * pio, unsigned int o);
73
74void jz_gpio_clear_pin (JZ_PIO * pio, unsigned int o);
75
76void jz_gpio_out (JZ_PIO * pio, unsigned int o, unsigned int val);
77
78unsigned int jz_gpio_get_pin (JZ_PIO * pio, unsigned int o);
79
80int jz_gpio_as_func (JZ_PIO * pio, unsigned int o, int func);
81
82JZ_PIO *jz_gpio_map (int port);
83
84#endif
Examples/ADC/Test-QT-src/jz47xx_gpio.o
Examples/ADC/Test-QT-src/jz47xx_mmap.cpp
1/*
2 * JZ47xx GPIO lines
3 *
4 * Written 2010 by Andres Calderon andres.calderon@emqbit.com
5 */
6
7#include <stdio.h>
8#include <sys/mman.h>
9#include <fcntl.h>
10#include <stdlib.h>
11#include <termios.h>
12#include <unistd.h>
13
14#include <jz47xx_mmap.h>
15
16
17unsigned int *
18jz_mmap (off_t address)
19{
20  int fd;
21
22  unsigned int *pio;
23
24  if ((fd = open ("/dev/mem", O_RDWR | O_SYNC)) == -1)
25    {
26      fprintf (stderr, "Cannot open /dev/mem.\n");
27      return 0;
28    }
29
30  pio = (unsigned int *) mmap (0, getpagesize (), PROT_READ | PROT_WRITE, MAP_SHARED, fd, address);
31
32  if (pio == (unsigned int *) -1)
33    {
34      fprintf (stderr, "Cannot mmap.\n");
35      return 0;
36    }
37
38  return pio;
39}
Examples/ADC/Test-QT-src/jz47xx_mmap.h
1/*
2 * JZ47xx GPIO lines
3 *
4 * Written 2010 by Andres Calderon andres.calderon@emqbit.com
5 */
6
7#ifndef __jz47xx_mmap_h__
8#define __jz47xx_mmap_h__
9
10#include <sys/mman.h>
11
12unsigned int * jz_mmap (off_t address);
13
14#endif
Examples/ADC/Test-QT-src/jz47xx_mmap.o
Examples/ADC/Test-QT-src/jz_adc_peripheral.cpp
1/* ADC Peripheral.c
2
3Copyright (C) 2010 Carlos Camargo cicamargoba@unal.edu.co
4                               Andres Calderon andres.calderon@emqbit.com
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
20#include <stdio.h>
21#include <unistd.h>
22
23#include "jz_adc_peripheral.h"
24
25JZ_REG *
26jz_adc_init()
27{
28    JZ_PIO *pio;
29    JZ_REG *virt_addr;
30
31    pio = jz_gpio_map (CS2_PORT);
32    jz_gpio_as_func (pio, CS2_PIN, 0);
33
34    virt_addr = (JZ_REG *) (jz_mmap(0x13010000) + 0x18);
35
36    if (*virt_addr != 0x0FFF7700)
37    {
38        *virt_addr = 0x0FFF7700;
39        printf ("ADC: Configuring CS2 8 bits and 0 WS: %08X\n", *virt_addr);
40    }
41    else
42        printf ("ADC: CS2, already configured: %08X\n", *virt_addr);
43
44    virt_addr = (JZ_REG *) jz_mmap (0x14000000);
45
46    return virt_addr;
47}
Examples/ADC/Test-QT-src/jz_adc_peripheral.h
1/* ADC Peripheral.h
2
3Copyright (C) 2010 Carlos Camargo cicamargoba@unal.edu.co
4                               Andres Calderon andres.calderon@emqbit.com
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
19
20#ifndef __adc_peripheral_h__
21#define __adc_peripheral_h__
22
23#include "jz47xx_mmap.h"
24#include "jz47xx_gpio.h"
25
26#define ADC_CMD_NONE 0x00 /* Nothing to do */
27#define ADC_CMD_SET_SPI_CLKDIV 0x00 /* Set clock divider for ADC sclk */
28#define ADC_CMD_SET_BUFFER_SIZE 0x00 /* Set clock divider for ADC sclk */
29
30#define ADC_CMD_SET_CHANNEL0 0x30 /* Set channel 0 */
31#define ADC_CMD_READ_CHANNEL0 0x20 /* Read channel 0 */
32
33#define ADC_CMD_SET_CHANNEL1 0x31 /* Set channel 1 */
34#define ADC_CMD_READ_CHANNEL1 0x21 /* Read channel 1 */
35
36#define ADC_CMD_SET_CHANNEL2 0x32 /* Set channel 2 */
37#define ADC_CMD_READ_CHANNEL2 0x22 /* Read channel 2 */
38
39#define ADC_CMD_SET_CHANNEL3 0x33 /* Set channel 3 */
40#define ADC_CMD_READ_CHANNEL3 0x23 /* Read channel 3 */
41
42#define ADC_CMD_SET_CHANNEL4 0x34 /* Set channel 4 */
43#define ADC_CMD_READ_CHANNEL4 0x24 /* Read channel 4 */
44
45#define ADC_CMD_SET_CHANNEL5 0x35 /* Set channel 5 */
46#define ADC_CMD_READ_CHANNEL5 0x25 /* Read channel 5 */
47
48#define ADC_CMD_SET_CHANNEL6 0x36 /* Set channel 6 */
49#define ADC_CMD_READ_CHANNEL6 0x26 /* Read channel 6 */
50
51#define ADC_CMD_SET_CHANNEL7 0x37 /* Set channel 7 */
52#define ADC_CMD_READ_CHANNEL7 0x27 /* Read channel 8 */
53
54#define ADC_CMD_SET_POWER_DOWN 0X38 /* Set ADC power down mode (1uA) */
55
56#define ADC_CMD_SET_FAST_CONV 0X39 /* Initialize ADC Fast Convertion(<10us)*/
57
58#define ADC_CMD_SET_LOW_CONV 0X3A /* Initialize ADC Slow Convertion(<40us)*/
59
60#define ADC_CMD_SET_AUTOSELFT_1 0x3B /* Set Autoselft ADC {(Vref+)-(Vref-)}/2*/
61#define ADC_CMD_READ_AUTOSELFT_1 0x2B /* Read Autoselft ADC 1 (0x0200) */
62
63#define ADC_CMD_SET_AUTOSELFT_2 0x3C /* Set Autoselft ADC (Vref-) */
64#define ADC_CMD_READ_AUTOSELFT_2 0x2C /* Read Autoselft ADC 2 (0x0000) */
65
66#define ADC_CMD_SET_AUTOSELFT_3 0x3D /* Set Autoselft ADC (Vref+) */
67#define ADC_CMD_READ_AUTOSELFT_3 0x2D /* Read Autoselft ADC 3 (0x03FF) */
68
69#define ADC_SPI_CLKDIV_MIN 0x08 /* 50/(2*9) -> 2.78MHz (MAX=2.8MHz) */
70#define ADC_SPI_CLKDIV_MAX 0xFF /* 50/(2*256) -> 97.65KHz */
71
72#define ADC_MAX_BUFFER 0x3FE/* 1022 reads/commands */
73
74#define CS2_PORT JZ_GPIO_PORT_B
75#define CS2_PIN 26
76
77typedef unsigned char uchar;
78
79JZ_REG *jz_adc_init();
80
81#endif
Examples/ADC/Test-QT-src/jz_adc_peripheral.o
Examples/ADC/Test-QT-src/main.cpp
1#include <QtGui/QApplication>
2#include "mainwindow.h"
3
4int main(int argc, char *argv[])
5{
6    QApplication a(argc, argv);
7    MainWindow w;
8    w.show();
9    return a.exec();
10}
Examples/ADC/Test-QT-src/main.o
Examples/ADC/Test-QT-src/mainwindow.cpp
1#include "mainwindow.h"
2#include "ui_mainwindow.h"
3#include <QDebug>
4
5#include <QTime>
6#include <math.h>
7
8MainWindow::MainWindow(QWidget *parent)
9    : QMainWindow(parent), ui(new Ui::MainWindow)
10{
11    ui->setupUi(this);
12    connect(this,SIGNAL(refresh()),ui->Graph, SLOT(repaint()));
13    ui->Graph->setPointsPerPlot(100);
14    ui->Graph->setVoltsPerDiv(819);
15    ui->Graph->setNumSig(8);
16
17    timer1 = new QTimer(this);
18    timer1->start(100);
19    connect(timer1, SIGNAL(timeout()), this, SLOT(updateGraph()));
20
21    /*ADC1 = new ADCw;
22    ADC1->testADC();
23    ADC1->setBufferLen(800);
24
25    ADC1->setClockDiv(ADC_SPI_CLKDIV_MIN); //Max. speed 99KHz
26    ADC1->setMuxChannels(7);*/
27    printf("\nTaking 100 samples by channel at Fs=12.37KHz (trigger~100ms)\n");
28}
29
30MainWindow::~MainWindow()
31{
32    delete ui;
33}
34
35void MainWindow::updateGraph()
36{
37    //JZ_REG * dataADC;
38
39    int tempD, tempIdx=0;
40
41        //dataADC=ADC1->takeSamplesADC(0);
42        for(int i=0; i< 800/2; i++)
43        {
44            //tempD = dataADC[i]&0x0FFF;
45            tempD = sin(10*PI*i/200)*0x200+0x200;
46            ui->Graph->addPoints(tempIdx,tempD+0x3ff*tempIdx);
47
48            //tempD = (dataADC[i]>>16)&0x0FFF;
49            tempD = cos(10*PI*i/200)*0x200+0x200;
50            ui->Graph->addPoints(tempIdx+1,tempD+0x3ff*(tempIdx+1));
51
52            tempIdx=(tempIdx+2)%8;
53        }
54
55
56    emit refresh();
57}
Examples/ADC/Test-QT-src/mainwindow.h
1#ifndef MAINWINDOW_H
2#define MAINWINDOW_H
3
4#include <QtGui/QMainWindow>
5#include "ADCw.h"
6
7#define PI 3.14159265
8#define VrmsC 0.017
9#define VmC 0.4999
10
11namespace Ui
12{
13    class MainWindow;
14}
15
16class MainWindow : public QMainWindow
17{
18    Q_OBJECT
19
20public:
21    MainWindow(QWidget *parent = 0);
22    ~MainWindow();
23
24    bool getSign(int val){if(val<0) return 0; else return 1;}
25
26public slots:
27    void updateGraph();
28
29signals:
30    void refresh();
31
32private:
33    Ui::MainWindow *ui;
34    QTimer *timer1;
35    ADCw *ADC1;
36    bool CHANNEL;
37};
38
39#endif // MAINWINDOW_H
Examples/ADC/Test-QT-src/mainwindow.o
Examples/ADC/Test-QT-src/mainwindow.ui
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>MainWindow</class>
4 <widget class="QMainWindow" name="MainWindow">
5  <property name="geometry">
6   <rect>
7    <x>0</x>
8    <y>0</y>
9    <width>320</width>
10    <height>240</height>
11   </rect>
12  </property>
13  <property name="windowTitle">
14   <string>ADC Test</string>
15  </property>
16  <widget class="QWidget" name="centralWidget">
17   <widget class="SignalDisplay" name="Graph" native="true">
18    <property name="geometry">
19     <rect>
20      <x>0</x>
21      <y>0</y>
22      <width>320</width>
23      <height>240</height>
24     </rect>
25    </property>
26    <property name="minimumSize">
27     <size>
28      <width>100</width>
29      <height>20</height>
30     </size>
31    </property>
32   </widget>
33  </widget>
34  <action name="action_Salir">
35   <property name="text">
36    <string>&amp;Salir</string>
37   </property>
38  </action>
39  <action name="actionA_cerca_de">
40   <property name="text">
41    <string>A&amp;cerca de...</string>
42   </property>
43  </action>
44  <action name="actionAcerca_de_QT">
45   <property name="text">
46    <string>Acerca de &amp;QT</string>
47   </property>
48  </action>
49  <action name="actionAcerca_de_Qt">
50   <property name="text">
51    <string>Acerca de &amp;Qt...</string>
52   </property>
53  </action>
54 </widget>
55 <layoutdefault spacing="6" margin="11"/>
56 <customwidgets>
57  <customwidget>
58   <class>SignalDisplay</class>
59   <extends>QWidget</extends>
60   <header location="global">signaldisplay.h</header>
61   <container>1</container>
62  </customwidget>
63 </customwidgets>
64 <resources/>
65 <connections/>
66</ui>
Examples/ADC/Test-QT-src/moc_mainwindow.cpp
1/****************************************************************************
2** Meta object code from reading C++ file 'mainwindow.h'
3**
4** Created: Sun Oct 31 11:42:47 2010
5** by: The Qt Meta Object Compiler version 62 (Qt 4.6.2)
6**
7** WARNING! All changes made in this file will be lost!
8*****************************************************************************/
9
10#include "mainwindow.h"
11#if !defined(Q_MOC_OUTPUT_REVISION)
12#error "The header file 'mainwindow.h' doesn't include <QObject>."
13#elif Q_MOC_OUTPUT_REVISION != 62
14#error "This file was generated using the moc from 4.6.2. It"
15#error "cannot be used with the include files from this version of Qt."
16#error "(The moc has changed too much.)"
17#endif
18
19QT_BEGIN_MOC_NAMESPACE
20static const uint qt_meta_data_MainWindow[] = {
21
22 // content:
23       4, // revision
24       0, // classname
25       0, 0, // classinfo
26       2, 14, // methods
27       0, 0, // properties
28       0, 0, // enums/sets
29       0, 0, // constructors
30       0, // flags
31       1, // signalCount
32
33 // signals: signature, parameters, type, tag, flags
34      12, 11, 11, 11, 0x05,
35
36 // slots: signature, parameters, type, tag, flags
37      22, 11, 11, 11, 0x0a,
38
39       0 // eod
40};
41
42static const char qt_meta_stringdata_MainWindow[] = {
43    "MainWindow\0\0refresh()\0updateGraph()\0"
44};
45
46const QMetaObject MainWindow::staticMetaObject = {
47    { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
48      qt_meta_data_MainWindow, 0 }
49};
50
51#ifdef Q_NO_DATA_RELOCATION
52const QMetaObject &MainWindow::getStaticMetaObject() { return staticMetaObject; }
53#endif //Q_NO_DATA_RELOCATION
54
55const QMetaObject *MainWindow::metaObject() const
56{
57    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
58}
59
60void *MainWindow::qt_metacast(const char *_clname)
61{
62    if (!_clname) return 0;
63    if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
64        return static_cast<void*>(const_cast< MainWindow*>(this));
65    return QMainWindow::qt_metacast(_clname);
66}
67
68int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
69{
70    _id = QMainWindow::qt_metacall(_c, _id, _a);
71    if (_id < 0)
72        return _id;
73    if (_c == QMetaObject::InvokeMetaMethod) {
74        switch (_id) {
75        case 0: refresh(); break;
76        case 1: updateGraph(); break;
77        default: ;
78        }
79        _id -= 2;
80    }
81    return _id;
82}
83
84// SIGNAL 0
85void MainWindow::refresh()
86{
87    QMetaObject::activate(this, &staticMetaObject, 0, 0);
88}
89QT_END_MOC_NAMESPACE
Examples/ADC/Test-QT-src/moc_mainwindow.o
Examples/ADC/Test-QT-src/qmake.conf
1include(../../common/g++.conf)
2include(../../common/linux.conf)
3include(../../common/qws.conf)
4OPENWRT_DIR = "/home/cain/Embedded/ingenic/sakc/build/openwrt-xburst"
5ROOTFS_DIR = "$${OPENWRT_DIR}/staging_dir/target-mipsel_uClibc-0.9.30.1"
6TOOLCHAIN_DIR = "$${OPENWRT_DIR}/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1"
7QT_BASE_DIR = "$${OPENWRT_DIR}/build_dir/target-mipsel_uClibc-0.9.30.1/qt-everywhere-opensource-src-4.6.2"
8INCDIR = -I$${ROOTFS_DIR}/usr/include/freetype2 -I$${ROOTFS_DIR}/usr/include -I$${ROOTFS_DIR}/include -I$${TOOLCHAIN_DIR}/usr/include -I$${TOOLCHAIN_DIR}/include
9QMAKE_CC = mipsel-openwrt-linux-uclibc-gcc
10QMAKE_CXX = mipsel-openwrt-linux-uclibc-g++
11QMAKE_AR = mipsel-openwrt-linux-uclibc-ar cqs
12QMAKE_OBJCOPY = mipsel-openwrt-linux-uclibc-objcopy
13QMAKE_RANLIB = mipsel-openwrt-linux-uclibc-ranlib
14QMAKE_CFLAGS = -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float $${INCDIR}
15QMAKE_CXXFLAGS = -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float $${INCDIR}
16QMAKE_LINK = mipsel-openwrt-linux-uclibc-g++
17QMAKE_LINK_SHLIB = mipsel-openwrt-linux-uclibc-g++
18QMAKE_LINK_C = mipsel-openwrt-linux-uclibc-gcc
19QMAKE_LINK_C_SHLIB = mipsel-openwrt-linux-uclibc-gcc
20QMAKE_LFLAGS = -L$${QT_BASE_DIR}/lib -L$${ROOTFS_DIR}/usr/lib -L$${ROOTFS_DIR}/lib -L/$${TOOLCHAIN_DIR}/usr/lib -L/$${TOOLCHAIN_DIR}/lib -Wl,-rpath-link=$${ROOTFS_DIR}/usr/lib
21QMAKE_STRIP = :
22QMAKE_STRIPFLAGS_LIB =
23QMAKE_INCDIR_QT = $${QT_BASE_DIR}/include
24QMAKE_LIBDIR_QT = $${QT_BASE_DIR}/lib
25QMAKE_MOC = $${QT_BASE_DIR}/bin/moc
26QMAKE_UIC = $${QT_BASE_DIR}/bin/uic
27load(qt_config)
Examples/ADC/Test-QT-src/signaldisplay.cpp
1#include "signaldisplay.h"
2#include <QtGui>
3#include <QDebug>
4
5SignalDisplay::SignalDisplay(QWidget *&parent):QWidget(parent)
6{
7    secsPerDiv = 1.0/600.0;
8    voltsPerDiv = 20;
9    numSig=2;
10    setPointsPerPlot(10);
11}
12
13void SignalDisplay::setNumSig(int value)
14{
15    numSig = value;
16    setPointsPerPlot(pointsPerPlot);
17}
18
19void SignalDisplay::setPointsPerPlot(int value)
20{
21    pointsPerPlot = value;
22    waves = new QPoint *[numSig];
23    secsIdx=new int[numSig];
24    colorTraces = new QColor[numSig];
25    int numT=(255/(numSig+1));
26    for(int i=0;i<numSig;i++)
27    {
28        waves[i] = new QPoint [pointsPerPlot];
29        secsIdx[i]=0;
30        colorTraces[i]=qRgb(numT*(i%numSig),numT*(i%numSig),numT*(i%numSig));
31    }
32}
33
34void SignalDisplay::drawGrid(QPainter &p, QColor colorGrid, int x, int y, int w, int h, int nx, int ny){
35    p.setPen(colorGrid);
36    for (int ix= 0; ix<nx; ix++){
37        int x = ix*w/nx;
38        p.drawLine(x,0,x,h);
39    }
40    for (int iy = 0; iy < ny; iy++){
41        int y = iy*h/ny;
42        p.drawLine(0,y,w,y);
43    }
44}
45void SignalDisplay::paintEvent(QPaintEvent *event){
46    QPainter painter(this);
47    w = width();
48    h = height();
49    ox = w;
50    oy = h;
51    painter.fillRect(0,0,w,h,Qt::white);
52    drawGrid(painter, Qt::lightGray,0,0,w,h,5, 10);
53    for(int i=0; i<numSig; i++)
54    {
55        painter.setPen(colorTraces[i]);
56        painter.drawPolyline(waves[i],pointsPerPlot);
57    }
58}
59
60void SignalDisplay::addPoints(int idx, int value)
61{
62    waves[idx][secsIdx[idx]] = QPoint(secsIdx[idx]*w/10/60.0/pointsPerPlot/secsPerDiv+w/(2*pointsPerPlot), \
63                        oy-value*h/voltsPerDiv/10);
64    secsIdx[idx] = (secsIdx[idx]+1) % pointsPerPlot;
65}
66
67
68//EOF
Examples/ADC/Test-QT-src/signaldisplay.h
1#ifndef SIGNALDISPLAY_H
2#define SIGNALDISPLAY_H
3
4#include <QWidget>
5#include <cmath>
6#include <QtGui>
7
8class SignalDisplay : public QWidget
9{
10public:
11    SignalDisplay(QWidget *&parent);
12    void addPoints(int idx, int value);
13    void setSecsPerDiv( float value ){ secsPerDiv = fabs(value);}
14    void setVoltsPerDiv( float value ){ voltsPerDiv = fabs(value);}
15    float getSecsPerDiv(){ return secsPerDiv; }
16    void setPointsPerPlot(int value);
17    void setColorTraces(QColor color, int idx){colorTraces[idx]=color;}
18    void setNumSig(int value);
19
20private:
21    void paintEvent(QPaintEvent *event);
22    void drawGrid(QPainter &p, QColor colorGrid, int x, int y, int w, int h, int nx, int ny);
23    QPoint **waves;
24    float voltsPerDiv;
25    float secsPerDiv;
26    QColor *colorTraces;
27    int *secsIdx;
28    int w, h, ox, oy;
29    int pointsPerPlot;
30    int numSig;
31};
32
33#endif // SIGNALDISPLAY_H
Examples/ADC/Test-QT-src/signaldisplay.o
Examples/ADC/Test-QT-src/ui_mainwindow.h
1/********************************************************************************
2** Form generated from reading UI file 'mainwindow.ui'
3**
4** Created: Sun Oct 31 11:42:44 2010
5** by: Qt User Interface Compiler version 4.6.2
6**
7** WARNING! All changes made in this file will be lost when recompiling UI file!
8********************************************************************************/
9
10#ifndef UI_MAINWINDOW_H
11#define UI_MAINWINDOW_H
12
13#include <QtCore/QVariant>
14#include <QtGui/QAction>
15#include <QtGui/QApplication>
16#include <QtGui/QButtonGroup>
17#include <QtGui/QHeaderView>
18#include <QtGui/QMainWindow>
19#include <QtGui/QWidget>
20#include <signaldisplay.h>
21
22QT_BEGIN_NAMESPACE
23
24class Ui_MainWindow
25{
26public:
27    QAction *action_Salir;
28    QAction *actionA_cerca_de;
29    QAction *actionAcerca_de_QT;
30    QAction *actionAcerca_de_Qt;
31    QWidget *centralWidget;
32    SignalDisplay *Graph;
33
34    void setupUi(QMainWindow *MainWindow)
35    {
36        if (MainWindow->objectName().isEmpty())
37            MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
38        MainWindow->resize(320, 240);
39        action_Salir = new QAction(MainWindow);
40        action_Salir->setObjectName(QString::fromUtf8("action_Salir"));
41        actionA_cerca_de = new QAction(MainWindow);
42        actionA_cerca_de->setObjectName(QString::fromUtf8("actionA_cerca_de"));
43        actionAcerca_de_QT = new QAction(MainWindow);
44        actionAcerca_de_QT->setObjectName(QString::fromUtf8("actionAcerca_de_QT"));
45        actionAcerca_de_Qt = new QAction(MainWindow);
46        actionAcerca_de_Qt->setObjectName(QString::fromUtf8("actionAcerca_de_Qt"));
47        centralWidget = new QWidget(MainWindow);
48        centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
49        Graph = new SignalDisplay(centralWidget);
50        Graph->setObjectName(QString::fromUtf8("Graph"));
51        Graph->setGeometry(QRect(0, 0, 320, 240));
52        Graph->setMinimumSize(QSize(100, 20));
53        MainWindow->setCentralWidget(centralWidget);
54
55        retranslateUi(MainWindow);
56
57        QMetaObject::connectSlotsByName(MainWindow);
58    } // setupUi
59
60    void retranslateUi(QMainWindow *MainWindow)
61    {
62        MainWindow->setWindowTitle(QApplication::translate("MainWindow", "ADC Test", 0, QApplication::UnicodeUTF8));
63        action_Salir->setText(QApplication::translate("MainWindow", "&Salir", 0, QApplication::UnicodeUTF8));
64        actionA_cerca_de->setText(QApplication::translate("MainWindow", "A&cerca de...", 0, QApplication::UnicodeUTF8));
65        actionAcerca_de_QT->setText(QApplication::translate("MainWindow", "Acerca de &QT", 0, QApplication::UnicodeUTF8));
66        actionAcerca_de_Qt->setText(QApplication::translate("MainWindow", "Acerca de &Qt...", 0, QApplication::UnicodeUTF8));
67    } // retranslateUi
68
69};
70
71namespace Ui {
72    class MainWindow: public Ui_MainWindow {};
73} // namespace Ui
74
75QT_END_NAMESPACE
76
77#endif // UI_MAINWINDOW_H
KICAD_design_files/SAKC_PCB_v2/N_MODELS/J17.mod
11PCBNEW-LibModule-V1 23/2/2010-03:08:11
22$INDEX
3J17
3POWER_CONN
44$EndINDEX
5$MODULE J17
5$MODULE POWER_CONN
66Po 0 0 0 15 43C58C74 4B834694 ~~
7Li J17
7Li POWER_CONN
88Sc 4B834694
99AR
1010Op 0 0 0
11T0 0 -79 157 157 -1800 20 N V 21 "J17"
12T1 0 118 118 118 -1800 20 N I 21 "HEADER 2"
11T0 0 -79 157 157 -1800 20 N I 21 "POWER_CONN"
12T1 0 118 118 118 -1800 20 N V 21 "VALUE"
1313DS -1650 2650 -1650 -3350 10 24
1414DS -1650 -3350 2350 -3350 10 24
1515DS 2350 -3350 2350 2650 10 24
...... 
3939Ne 0 ""
4040Po 1500 -1500
4141$EndPAD
42$EndMODULE J17
42$EndMODULE POWER_CONN
4343$EndLIBRARY
KICAD_design_files/SAKC_PCB_v2/SAKC.pro
1update=Mon 11 Oct 2010 12:34:05 PM COT
1update=Mon 08 Nov 2010 07:59:46 PM COT
22last_client=pcbnew
33[general]
44version=1
...... 
9595EdgeLar=79
9696TxtLar=120
9797MSegLar=79
98LastNetListRead=
98LastNetListRead=SAKC.net
9999[pcbnew/libraries]
100100LibDir=./N_MODELS/
101101LibName1=./N_MODELS/D8
Software/sie_cg/block_editor/adc_single.die
1<!--File for SIE Code Generator. Custmos Blocks-->
2<CustomItem BlockName="ADC Single">
3    <Polygon>
4        <Point x="-80" y="0"/>
5        <Point x="-60" y="-40"/>
6        <Point x="60" y="-40"/>
7        <Point x="60" y="40"/>
8        <Point x="110" y="40"/>
9        <Point x="110" y="-40"/>
10        <Point x="60" y="-40"/>
11        <Point x="110" y="-40"/>
12        <Point x="110" y="40"/>
13        <Point x="-60" y="40"/>
14    </Polygon>
15    <TextItems>
16        <TextItem myStyleIO="0" posOffset-y="20" editableItem="0" ID="3" text="ADC Single Channel" posOffset-x="0"/>
17        <TextItem myStyleIO="0" posOffset-y="-0" editableItem="1" ID="4" text="0" posOffset-x="20"/>
18        <TextItem myStyleIO="0" posOffset-y="-0" editableItem="0" ID="5" text="CH:" posOffset-x="-20"/>
19        <TextItem myStyleIO="0" posOffset-y="-20" editableItem="0" ID="6" text="SP:" posOffset-x="-20"/>
20        <TextItem myStyleIO="0" posOffset-y="-20" editableItem="1" ID="7" text="255" posOffset-x="20"/>
21        <TextItem myStyleIO="8" posOffset-y="-20" editableItem="0" ID="8" text="UChar" posOffset-x="110"/>
22    </TextItems>
23</CustomItem>
Software/sie_cg/block_editor/constant.die
1<!--File for SIE Code Generator. Custmos Blocks-->
2<CustomItem BlockName="Constant">
3    <Polygon>
4        <Point x="-50" y="-10"/>
5        <Point x="-50" y="30"/>
6        <Point x="30" y="30"/>
7        <Point x="30" y="-10"/>
8    </Polygon>
9    <TextItems>
10        <TextItem myStyleIO="0" posOffset-y="-0" editableItem="1" ID="21" text="Value" posOffset-x="-30"/>
11        <TextItem myStyleIO="3" posOffset-y="-20" editableItem="0" ID="15" text="OUT Integer" posOffset-x="30"/>
12        <TextItem myStyleIO="0" posOffset-y="-0" editableItem="1" ID="19" text="1" posOffset-x="10"/>
13    </TextItems>
14</CustomItem>
Software/sie_cg/block_editor/diagramscene.cpp
118118{
119119    if(snapToGrid){
120120        mouseEvent->setScenePos(QPointF(
121                                int(mouseEvent->scenePos().x()/myGrid)*myGrid,
122                                int(mouseEvent->scenePos().y()/myGrid)*myGrid
121                                round(mouseEvent->scenePos().x()/myGrid)*myGrid,
122                                round(mouseEvent->scenePos().y()/myGrid)*myGrid
123123                                ));
124124    }
125125}
Software/sie_cg/block_editor/left_shift.die
1<!--File for SIE Code Generator. Custmos Blocks-->
2<CustomItem BlockName="Left Shift">
3    <Polygon>
4        <Point x="-70" y="-30"/>
5        <Point x="-70" y="20"/>
6        <Point x="60" y="20"/>
7        <Point x="60" y="-30"/>
8        <Point x="-50" y="-30"/>
9        <Point x="-70" y="-30"/>
10    </Polygon>
11    <TextItems>
12        <TextItem myStyleIO="9" posOffset-y="-0" editableItem="0" ID="13" text="OUT" posOffset-x="60"/>
13        <TextItem myStyleIO="138" posOffset-y="-0" editableItem="0" ID="12" text="IN" posOffset-x="-70"/>
14        <TextItem myStyleIO="0" posOffset-y="-10" editableItem="1" ID="11" text="1" posOffset-x="10"/>
15        <TextItem myStyleIO="0" posOffset-y="-10" editableItem="0" ID="10" text="&lt;&lt;" posOffset-x="-20"/>
16        <TextItem myStyleIO="0" posOffset-y="20" editableItem="0" ID="5" text="Bitwise Shift" posOffset-x="-10"/>
17    </TextItems>
18</CustomItem>
Software/sie_cg/block_editor/mainwindow.cpp
168168                      QIcon(":/images/background1.png")),++i,0);
169169    layout->addWidget(createToolButton(129+i,tr("Float"),
170170                      QIcon(":/images/background1.png")),++i,0);
171    layout->addWidget(createToolButton(129+i,tr("Short"),
172                      QIcon(":/images/background1.png")),++i,0);
173    layout->addWidget(createToolButton(129+i,tr("Long"),
174                      QIcon(":/images/background1.png")),++i,0);
175    layout->addWidget(createToolButton(129+i,tr("UChar"),
176                      QIcon(":/images/background1.png")),++i,0);
177    layout->addWidget(createToolButton(129+i,tr("UInt"),
178                      QIcon(":/images/background1.png")),++i,0);
179    layout->addWidget(createToolButton(129+i,tr("UShort"),
180                      QIcon(":/images/background1.png")),++i,0);
181    layout->addWidget(createToolButton(129+i,tr("ULong"),
182                      QIcon(":/images/background1.png")),++i,0);
183
184
171185
172186    //OUTPUTS
173187    i=0;
...... 
181195                      QIcon(":/images/background3.png")),++i,1);
182196    layout->addWidget(createToolButton(i,tr("Float"),
183197                      QIcon(":/images/background3.png")),++i,1);
198    layout->addWidget(createToolButton(i,tr("Short"),
199                      QIcon(":/images/background3.png")),++i,1);
200    layout->addWidget(createToolButton(i,tr("Long"),
201                      QIcon(":/images/background3.png")),++i,1);
202    layout->addWidget(createToolButton(i,tr("UChar"),
203                      QIcon(":/images/background3.png")),++i,1);
204    layout->addWidget(createToolButton(i,tr("UInt"),
205                      QIcon(":/images/background3.png")),++i,1);
206    layout->addWidget(createToolButton(i,tr("UShort"),
207                      QIcon(":/images/background3.png")),++i,1);
208    layout->addWidget(createToolButton(i,tr("ULong"),
209                      QIcon(":/images/background3.png")),++i,1);
184210
185211    layout->setRowStretch(3, 10);
186212    layout->setColumnStretch(2, 10);
Software/sie_cg/block_editor/pwm_single.die
1<!--File for SIE Code Generator. Custmos Blocks-->
2<CustomItem BlockName="PWM Single">
3    <Polygon>
4        <Point x="-90" y="-50"/>
5        <Point x="50" y="-50"/>
6        <Point x="50" y="-30"/>
7        <Point x="-90" y="-30"/>
8        <Point x="-90" y="20"/>
9        <Point x="-40" y="20"/>
10        <Point x="50" y="20"/>
11        <Point x="50" y="10"/>
12        <Point x="-40" y="10"/>
13        <Point x="-40" y="-10"/>
14        <Point x="-20" y="-10"/>
15        <Point x="0" y="-10"/>
16        <Point x="0" y="10"/>
17        <Point x="10" y="10"/>
18        <Point x="10" y="-10"/>
19        <Point x="50" y="-10"/>
20        <Point x="50" y="10"/>
21        <Point x="50" y="-30"/>
22        <Point x="50" y="20"/>
23        <Point x="-90" y="20"/>
24    </Polygon>
25    <TextItems>
26        <TextItem myStyleIO="137" posOffset-y="-0" editableItem="0" ID="14" text="UChar" posOffset-x="-90"/>
27        <TextItem myStyleIO="0" posOffset-y="20" editableItem="0" ID="15" text="|-Duty-|" posOffset-x="-20"/>
28        <TextItem myStyleIO="0" posOffset-y="40" editableItem="1" ID="16" text="0" posOffset-x="0"/>
29        <TextItem myStyleIO="0" posOffset-y="40" editableItem="0" ID="11" text="Out:" posOffset-x="-20"/>
30        <TextItem myStyleIO="0" posOffset-y="40" editableItem="0" ID="18" text="PWM" posOffset-x="-50"/>
31    </TextItems>
32</CustomItem>
Software/sie_cg/block_editor/right_shift.die
1<!--File for SIE Code Generator. Custmos Blocks-->
2<CustomItem BlockName="Right Shift">
3    <Polygon>
4        <Point x="-70" y="-30"/>
5        <Point x="-70" y="20"/>
6        <Point x="60" y="20"/>
7        <Point x="60" y="-30"/>
8        <Point x="-50" y="-30"/>
9        <Point x="-70" y="-30"/>
10    </Polygon>
11    <TextItems>
12        <TextItem myStyleIO="9" posOffset-y="-0" editableItem="0" ID="13" text="OUT" posOffset-x="60"/>
13        <TextItem myStyleIO="138" posOffset-y="-0" editableItem="0" ID="12" text="IN" posOffset-x="-70"/>
14        <TextItem myStyleIO="0" posOffset-y="-10" editableItem="1" ID="11" text="1" posOffset-x="10"/>
15        <TextItem myStyleIO="0" posOffset-y="-10" editableItem="0" ID="10" text=">>" posOffset-x="-20"/>
16        <TextItem myStyleIO="0" posOffset-y="20" editableItem="0" ID="5" text="Bitwise Shift" posOffset-x="-10"/>
17    </TextItems>
18</CustomItem>
Software/sie_cg/block_editor/test_block2.die
11<!--File for SIE Code Generator. Custmos Blocks-->
22<CustomItem BlockName="Test Block 2">
33    <Polygon>
4        <Point x="-50" y="-20"/>
5        <Point x="-30" y="0"/>
6        <Point x="-50" y="20"/>
4        <Point x="-60" y="-20"/>
5        <Point x="-40" y="0"/>
6        <Point x="-60" y="20"/>
77        <Point x="30" y="20"/>
8        <Point x="60" y="0"/>
9        <Point x="40" y="-20"/>
8        <Point x="50" y="0"/>
9        <Point x="30" y="-20"/>
1010    </Polygon>
1111    <TextItems>
12        <TextItem myStyleIO="130" posOffset-y="-0" editableItem="0" ID="1" text=" IN Bool" posOffset-x="-30"/>
1312        <TextItem myStyleIO="0" posOffset-y="30" editableItem="0" ID="0" text="Test Block 2" posOffset-x="-10"/>
13        <TextItem myStyleIO="130" posOffset-y="-0" editableItem="0" ID="1" text=" IN Bool" posOffset-x="-30"/>
1414    </TextItems>
1515</CustomItem>
Software/sie_cg/block_editor/timer.die
1<!--File for SIE Code Generator. Custmos Blocks-->
2<CustomItem BlockName="Timer">
3    <Polygon>
4        <Point x="-70" y="-80"/>
5        <Point x="-70" y="80"/>
6        <Point x="80" y="80"/>
7        <Point x="80" y="-80"/>
8        <Point x="-70" y="-80"/>
9        <Point x="-70" y="-30"/>
10        <Point x="80" y="-30"/>
11        <Point x="80" y="80"/>
12        <Point x="50" y="80"/>
13        <Point x="40" y="50"/>
14        <Point x="30" y="50"/>
15        <Point x="20" y="60"/>
16        <Point x="40" y="40"/>
17        <Point x="40" y="40"/>
18        <Point x="40" y="30"/>
19        <Point x="30" y="40"/>
20        <Point x="30" y="30"/>
21        <Point x="30" y="30"/>
22        <Point x="10" y="30"/>
23        <Point x="10" y="30"/>
24        <Point x="10" y="30"/>
25        <Point x="30" y="30"/>
26        <Point x="30" y="20"/>
27        <Point x="40" y="30"/>
28        <Point x="40" y="20"/>
29        <Point x="30" y="10"/>
30        <Point x="30" y="10"/>
31        <Point x="40" y="0"/>
32        <Point x="50" y="10"/>
33        <Point x="50" y="0"/>
34        <Point x="40" y="-10"/>
35        <Point x="30" y="-20"/>
36        <Point x="20" y="-20"/>
37        <Point x="30" y="-10"/>
38        <Point x="20" y="0"/>
39        <Point x="20" y="0"/>
40        <Point x="-10" y="0"/>
41        <Point x="-20" y="-10"/>
42        <Point x="-10" y="-20"/>
43        <Point x="-20" y="-20"/>
44        <Point x="-40" y="0"/>
45        <Point x="-40" y="10"/>
46        <Point x="-30" y="0"/>
47        <Point x="-20" y="10"/>
48        <Point x="-20" y="10"/>
49        <Point x="-20" y="10"/>
50        <Point x="-30" y="20"/>
51        <Point x="-30" y="40"/>
52        <Point x="-20" y="50"/>
53        <Point x="-10" y="60"/>
54        <Point x="20" y="60"/>
55        <Point x="-10" y="60"/>
56        <Point x="-20" y="50"/>
57        <Point x="-30" y="50"/>
58        <Point x="-30" y="50"/>
59        <Point x="-40" y="80"/>
60        <Point x="-70" y="80"/>
61        <Point x="-70" y="80"/>
62        <Point x="-70" y="80"/>
63    </Polygon>
64    <TextItems>
65        <TextItem myStyleIO="0" posOffset-y="40" editableItem="1" ID="1" text="1 " posOffset-x="-10"/>
66        <TextItem myStyleIO="0" posOffset-y="40" editableItem="0" ID="2" text="ms" posOffset-x="10"/>
67        <TextItem myStyleIO="0" posOffset-y="60" editableItem="0" ID="0" text="System Timer" posOffset-x="0"/>
68    </TextItems>
69</CustomItem>
Software/sie_cg/block_editor/while.die
1<!--File for SIE Code Generator. Custmos Blocks-->
2<CustomItem BlockName="System While">
3    <Polygon>
4        <Point x="-50" y="-30"/>
5        <Point x="50" y="-30"/>
6        <Point x="50" y="-10"/>
7        <Point x="-50" y="-10"/>
8        <Point x="-50" y="30"/>
9        <Point x="0" y="30"/>
10        <Point x="0" y="0"/>
11        <Point x="40" y="0"/>
12        <Point x="40" y="20"/>
13        <Point x="20" y="20"/>
14        <Point x="20" y="10"/>
15        <Point x="10" y="20"/>
16        <Point x="20" y="30"/>
17        <Point x="20" y="20"/>
18        <Point x="20" y="30"/>
19        <Point x="50" y="30"/>
20        <Point x="50" y="-10"/>
21        <Point x="50" y="30"/>
22        <Point x="-50" y="30"/>
23        <Point x="-50" y="-10"/>
24    </Polygon>
25    <TextItems>
26        <TextItem myStyleIO="130" posOffset-y="-10" editableItem="0" ID="14" text="IN Bool" posOffset-x="-50"/>
27        <TextItem myStyleIO="0" posOffset-y="20" editableItem="0" ID="23" text="System While" posOffset-x="0"/>
28    </TextItems>
29</CustomItem>
Software/sie_cg/diagramscene.cpp
176176{
177177    if(snapToGrid){
178178        mouseEvent->setScenePos(QPointF(
179                                int(mouseEvent->scenePos().x()/myGrid)*myGrid,
180                                int(mouseEvent->scenePos().y()/myGrid)*myGrid
179                                round(mouseEvent->scenePos().x()/myGrid)*myGrid,
180                                round(mouseEvent->scenePos().y()/myGrid)*myGrid
181181                                ));
182182    }
183183}
...... 
190190        line->setLine(newLine);
191191    } else if (myMode == MoveItem) {
192192        QGraphicsScene::mouseMoveEvent(mouseEvent);
193    }
193    }
194194}
195195
196196void DiagramScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent)
...... 
277277    QDomElement diagram = document.createElement("Diagram");
278278    document.appendChild(diagram);
279279
280    QDomElement test = document.createElement("Test");
281    test.text().fromAscii("TEXT HERE");
282    document.appendChild(test);
283
280284    //Lists of items
281285    QList<DiagramItem *> Items;
282286    QList<Arrow *> Arrows;
Software/sie_cg/diagramscene.pro.user
7676  <valuemap type="QVariantMap">
7777   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
7878   <valuelist key="abstractProcess.Environment" type="QVariantList">
79    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-MI4KrAyPP5,guid=5c5c5e6146195c74b6ad266d4cc07afd</value>
79    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-bm3IFDvHlY,guid=a9cadece3d5adbab4e7ecc664cc367c4</value>
8080    <value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
8181    <value type="QString">DESKTOP_SESSION=gnome</value>
8282    <value type="QString">DISPLAY=:0.0</value>
...... 
8484    <value type="QString">GDM_KEYBOARD_LAYOUT=es</value>
8585    <value type="QString">GDM_LANG=en_US.utf8</value>
8686    <value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
87    <value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-CFAuJK</value>
88    <value type="QString">GNOME_KEYRING_PID=1516</value>
87    <value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-EOe3re</value>
88    <value type="QString">GNOME_KEYRING_PID=1591</value>
8989    <value type="QString">GTK_MODULES=canberra-gtk-module</value>
9090    <value type="QString">HOME=/home/juan64bits</value>
9191    <value type="QString">LANG=en_US.utf8</value>
92    <value type="QString">LANGUAGE=</value>
9392    <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
9493    <value type="QString">LOGNAME=juan64bits</value>
9594    <value type="QString">MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path</value>
...... 
9796    <value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
9897    <value type="QString">PWD=/home/juan64bits</value>
9998    <value type="QString">QTDIR=/usr/share/qt4</value>
100    <value type="QString">SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1534,unix/Maximus:/tmp/.ICE-unix/1534</value>
99    <value type="QString">SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1609,unix/Maximus:/tmp/.ICE-unix/1609</value>
101100    <value type="QString">SHELL=/bin/bash</value>
102101    <value type="QString">SPEECHD_PORT=7560</value>
103    <value type="QString">SSH_AGENT_PID=1570</value>
104    <value type="QString">SSH_AUTH_SOCK=/tmp/keyring-CFAuJK/ssh</value>
102    <value type="QString">SSH_AGENT_PID=1645</value>
103    <value type="QString">SSH_AUTH_SOCK=/tmp/keyring-EOe3re/ssh</value>
105104    <value type="QString">USER=juan64bits</value>
106105    <value type="QString">USERNAME=juan64bits</value>
107    <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-juan64bits-V4ry7M/database</value>
106    <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-juan64bits-XFOps8/database</value>
108107    <value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
109108    <value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
110    <value type="QString">XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1287682812.550485-1725059380</value>
109    <value type="QString">XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1287874500.2500-279079160</value>
111110   </valuelist>
112111   <valuelist key="abstractProcess.arguments" type="QVariantList">
113    <value type="QString">/home/juan64bits/QT/diagramscene/diagramscene.pro</value>
112    <value type="QString">/home/juan64bits/QT/sie_cg/diagramscene.pro</value>
114113    <value type="QString">-spec</value>
115114    <value type="QString">linux-g++</value>
116115    <value type="QString">-r</value>
...... 
118117   </valuelist>
119118   <value key="abstractProcess.command" type="QString">/usr/bin/qmake-qt4</value>
120119   <value key="abstractProcess.enabled" type="bool">false</value>
121   <value key="abstractProcess.workingDirectory" type="QString">/home/juan64bits/QT/diagramscene</value>
120   <value key="abstractProcess.workingDirectory" type="QString">/home/juan64bits/QT/sie_cg</value>
122121  </valuemap>
123122 </data>
124123 <data>
...... 
126125  <valuemap type="QVariantMap">
127126   <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
128127   <valuelist key="abstractProcess.Environment" type="QVariantList">
129    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-MI4KrAyPP5,guid=5c5c5e6146195c74b6ad266d4cc07afd</value>
128    <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-bm3IFDvHlY,guid=a9cadece3d5adbab4e7ecc664cc367c4</value>
130129    <value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
131130    <value type="QString">DESKTOP_SESSION=gnome</value>
132131    <value type="QString">DISPLAY=:0.0</value>
...... 
134133    <value type="QString">GDM_KEYBOARD_LAYOUT=es</value>
135134    <value type="QString">GDM_LANG=en_US.utf8</value>
136135    <value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
137    <value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-CFAuJK</value>
138    <value type="QString">GNOME_KEYRING_PID=1516</value>
136    <value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-EOe3re</value>
137    <value type="QString">GNOME_KEYRING_PID=1591</value>
139138    <value type="QString">GTK_MODULES=canberra-gtk-module</value>
140139    <value type="QString">HOME=/home/juan64bits</value>
141140    <value type="QString">LANG=en_US.utf8</value>
142    <value type="QString">LANGUAGE=</value>
143141    <value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator</value>
144142    <value type="QString">LOGNAME=juan64bits</value>
145143    <value type="QString">MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path</value>
...... 
147145    <value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
148146    <value type="QString">PWD=/home/juan64bits</value>
149147    <value type="QString">QTDIR=/usr/share/qt4</value>
150    <value type="QString">SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1534,unix/Maximus:/tmp/.ICE-unix/1534</value>
148    <value type="QString">SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1609,unix/Maximus:/tmp/.ICE-unix/1609</value>
151149    <value type="QString">SHELL=/bin/bash</value>
152150    <value type="QString">SPEECHD_PORT=7560</value>
153    <value type="QString">SSH_AGENT_PID=1570</value>
154    <value type="QString">SSH_AUTH_SOCK=/tmp/keyring-CFAuJK/ssh</value>
151    <value type="QString">SSH_AGENT_PID=1645</value>
152    <value type="QString">SSH_AUTH_SOCK=/tmp/keyring-EOe3re/ssh</value>
155153    <value type="QString">USER=juan64bits</value>
156154    <value type="QString">USERNAME=juan64bits</value>
157    <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-juan64bits-V4ry7M/database</value>
155    <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-juan64bits-XFOps8/database</value>
158156    <value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
159157    <value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
160    <value type="QString">XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1287682812.550485-1725059380</value>
158    <value type="QString">XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1287874500.2500-279079160</value>
161159   </valuelist>
162160   <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value>
163161   <valuelist key="abstractProcess.arguments" type="QVariantList">
...... 
165163   </valuelist>
166164   <value key="abstractProcess.command" type="QString">/usr/bin/make</value>
167165   <value key="abstractProcess.enabled" type="bool">true</value>
168   <value key="abstractProcess.workingDirectory" type="QString">/home/juan64bits/QT/diagramscene</value>
166   <value key="abstractProcess.workingDirectory" type="QString">/home/juan64bits/QT/sie_cg</value>
169167  </valuemap>
170168 </data>
171169 <data>
Software/sie_cg/mainwindow.cpp
374374    toolBox = new QToolBox;
375375    toolBox->setSizePolicy(QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Ignored));
376376    toolBox->setMinimumWidth(itemWidget->sizeHint().width());
377    toolBox->addItem(itemWidget, tr("Basic Flowchart Shapes"));
377    toolBox->addItem(itemWidget, tr("Basic blocks"));
378378    //toolBox->addItem(backgroundWidget, tr("Backgrounds"));
379379
380380    //Add tool box to window
...... 
896896    QList<QListWidgetItem *> selected = libUi->listLib->selectedItems();
897897    if(selected.count()>0)
898898    {
899        callexternapp("block_editor/blockeditor",selected.at(0)->text());
899        callexternapp("block_editor/blockeditor",selected.at(0)->text());
900900    }
901901}
902902
Software/sie_cg/mainwindow.h
212212    {
213213        QProcess lnexternapp;
214214        lnexternapp.start(QString("%1 %2").arg(execFile).arg(execParm));
215        lnexternapp.waitForFinished(-1);
216        retnValu = QString(lnexternapp.readAll());
215        //lnexternapp.waitForFinished(-1);
216        //retnValu = QString(lnexternapp.readAll());
217217    }
218218};
219219
Software/sie_cg/test.sie
77-->
88<Diagram>
99    <Libraries>
10        <Library Dir="block_editor/timer.die"/>
11        <Library Dir="block_editor/adc_single.die"/>
12        <Library Dir="block_editor/left_shift.die"/>
13        <Library Dir="block_editor/right_shift.die"/>
14        <Library Dir="block_editor/pwm_single.die"/>
15        <Library Dir="block_editor/constant.die"/>
16        <Library Dir="block_editor/while.die"/>
1017        <Library Dir="block_editor/test_block1.die"/>
1118        <Library Dir="block_editor/test_block2.die"/>
1219        <Library Dir="block_editor/test_block3.die"/>
1320    </Libraries>
1421    <DiagramItems>
15        <DiagramItem x="2780" y="2540" z="500" type="Test Block 2" ID="0" color="#0000ff">
16            <diagramValues/>
22        <DiagramItem x="2280" y="2110" z="500" type="Timer" ID="0" color="#00ff00">
23            <diagramValues>
24                <diagramValue value="1 " ID="1"/>
25            </diagramValues>
26        </DiagramItem>
27        <DiagramItem x="2460" y="2350" z="500" type="Right Shift" ID="1" color="#00ffff">
28            <diagramValues>
29                <diagramValue value="1" ID="11"/>
30            </diagramValues>
1731        </DiagramItem>
18        <DiagramItem x="2510" y="2440" z="500" type="Test Block 1" ID="1" color="#808080">
32        <DiagramItem x="2670" y="2350" z="500" type="PWM Single" ID="2" color="#808000">
1933            <diagramValues>
20                <diagramValue value="0.001" ID="1"/>
34                <diagramValue value="0" ID="16"/>
2135            </diagramValues>
2236        </DiagramItem>
23        <DiagramItem x="2230" y="2550" z="500" type="Test Block 3" ID="2" color="#ff0000">
37        <DiagramItem x="2580" y="2110" z="500" type="System While" ID="3" color="#ff00ff">
2438            <diagramValues/>
2539        </DiagramItem>
40        <DiagramItem x="2470" y="2100" z="500" type="Constant" ID="4" color="#00ffff">
41            <diagramValues>
42                <diagramValue value="Value" ID="21"/>
43                <diagramValue value="1" ID="19"/>
44            </diagramValues>
45        </DiagramItem>
46        <DiagramItem x="2220" y="2330" z="-0.1" type="ADC Single" ID="5" color="#808080">
47            <diagramValues>
48                <diagramValue value="0" ID="4"/>
49                <diagramValue value="255" ID="7"/>
50            </diagramValues>
51        </DiagramItem>
2652    </DiagramItems>
2753    <Arrows>
28        <Arrow end-ID="1" end-Owner="0" start-x="140" start-y="0" start-Owner="1" ID="0" start-ID="3" end-x="-30" end-y="0" color="#808080">
29            <arrowCorners>
30                <arrowCorner x="2700" y="2440"/>
31                <arrowCorner x="2699.5" y="2539.5"/>
32            </arrowCorners>
33        </Arrow>
34        <Arrow end-ID="4" end-Owner="1" start-x="60" start-y="0" start-Owner="2" ID="1" start-ID="0" end-x="-120" end-y="0" color="#808080">
35            <arrowCorners>
36                <arrowCorner x="2340" y="2550"/>
37                <arrowCorner x="2340" y="2440"/>
38            </arrowCorners>
39        </Arrow>
54        <Arrow end-ID="12" end-Owner="1" start-x="110" start-y="20" start-Owner="5" ID="0" start-ID="8" end-x="-70" end-y="0" color="#000000"/>
55        <Arrow end-ID="14" end-Owner="2" start-x="60" start-y="0" start-Owner="1" ID="1" start-ID="13" end-x="-90" end-y="0" color="#000000"/>
56        <Arrow end-ID="14" end-Owner="3" start-x="30" start-y="20" start-Owner="4" ID="2" start-ID="15" end-x="-50" end-y="10" color="#000000"/>
4057    </Arrows>
4158</Diagram>
59<Test/>
Software/sie_cg/test1.png

Archive Download the corresponding diff file

Branches:
master



interactive