From 8d955642537c03b7260a21700a697f5d85ae6c58 Mon Sep 17 00:00:00 2001 From: Juan64Bits Date: Sat, 4 Dec 2010 15:12:02 -0500 Subject: [PATCH] First functional example, ADC an Framebuffer Test --- Software/sie_cg/adc_test.sie | 105 + Software/sie_cg/adc_test_8.sie | 432 +++ Software/sie_cg/arrow.cpp | 34 +- Software/sie_cg/arrow.h | 25 +- Software/sie_cg/block_editor/adc_eight.die | 45 + Software/sie_cg/block_editor/adc_single.die | 36 +- Software/sie_cg/block_editor/arrow.cpp | 1 + Software/sie_cg/block_editor/arrow.h | 0 Software/sie_cg/block_editor/constant.die | 25 +- .../sie_cg/block_editor/constant_bool.die | 21 + Software/sie_cg/block_editor/diagramscene.cpp | 170 +- Software/sie_cg/block_editor/diagramscene.h | 8 +- Software/sie_cg/block_editor/diagramscene.pro | 0 .../sie_cg/block_editor/diagramscene.pro.user | 28 +- Software/sie_cg/block_editor/diagramscene.qrc | 0 .../sie_cg/block_editor/diagramtextitem.cpp | 77 +- .../sie_cg/block_editor/diagramtextitem.h | 2 +- Software/sie_cg/block_editor/divider.die | 35 + .../block_editor/framebuffer_drawline.die | 64 + .../sie_cg/block_editor/framebuffer_line.die | 60 + .../block_editor/framebuffer_put_int.die | 53 + Software/sie_cg/block_editor/left_shift.die | 48 +- Software/sie_cg/block_editor/lineitem.cpp | 0 Software/sie_cg/block_editor/lineitem.h | 0 Software/sie_cg/block_editor/main.cpp | 0 Software/sie_cg/block_editor/mainwindow.cpp | 36 +- Software/sie_cg/block_editor/mainwindow.h | 17 +- .../sie_cg/block_editor/multiplier_int.die | 35 + Software/sie_cg/block_editor/plus.die | 29 + Software/sie_cg/block_editor/printf_int.die | 24 + Software/sie_cg/block_editor/pwm_single.die | 0 Software/sie_cg/block_editor/right_shift.die | 45 +- Software/sie_cg/block_editor/test_block1.die | 0 Software/sie_cg/block_editor/test_block2.die | 0 Software/sie_cg/block_editor/test_block3.die | 0 Software/sie_cg/block_editor/test_block4.die | 57 +- Software/sie_cg/block_editor/timer.die | 0 Software/sie_cg/block_editor/while.die | 48 +- Software/sie_cg/callapp.cpp | 45 + Software/sie_cg/callapp.h | 31 + Software/sie_cg/codedialog.cpp | 0 Software/sie_cg/codedialog.h | 0 Software/sie_cg/codedialog.ui | 2795 ++++++++++++++- Software/sie_cg/diagramitem.cpp | 43 +- Software/sie_cg/diagramitem.h | 31 +- Software/sie_cg/diagramscene.cpp | 302 +- Software/sie_cg/diagramscene.h | 23 +- Software/sie_cg/diagramscene.pro | 12 +- Software/sie_cg/diagramscene.pro.user | 30 +- Software/sie_cg/diagramscene.qrc | 3 + Software/sie_cg/diagramtextitem.cpp | 114 +- Software/sie_cg/diagramtextitem.h | 19 +- Software/sie_cg/images/background1.png | Bin 289 -> 7328 bytes Software/sie_cg/images/background2.png | Bin 285 -> 1446 bytes Software/sie_cg/images/background3.png | Bin 330 -> 5975 bytes Software/sie_cg/images/background4.png | Bin 342 -> 3982 bytes Software/sie_cg/images/bold.png | Bin Software/sie_cg/images/bringtofront.png | Bin Software/sie_cg/images/copy.png | Bin 0 -> 515 bytes Software/sie_cg/images/delete.png | Bin Software/sie_cg/images/exit.png | Bin Software/sie_cg/images/floodfill.png | Bin 282 -> 299 bytes Software/sie_cg/images/grid.png | Bin 0 -> 1164 bytes Software/sie_cg/images/italic.png | Bin Software/sie_cg/images/linecolor.png | Bin 145 -> 295 bytes Software/sie_cg/images/linepointer.png | Bin 141 -> 278 bytes Software/sie_cg/images/lower1.png | Bin Software/sie_cg/images/new.png | Bin Software/sie_cg/images/no.png | Bin Software/sie_cg/images/open.png | Bin Software/sie_cg/images/paste.png | Bin 0 -> 771 bytes Software/sie_cg/images/pointer.png | Bin Software/sie_cg/images/preview.png | Bin Software/sie_cg/images/raise1.png | Bin Software/sie_cg/images/redo.png | Bin 0 -> 1245 bytes Software/sie_cg/images/save.png | Bin Software/sie_cg/images/save_as.png | Bin Software/sie_cg/images/sendtoback.png | Bin Software/sie_cg/images/textpointer.png | Bin 753 -> 680 bytes Software/sie_cg/images/underline.png | Bin Software/sie_cg/images/undo.png | Bin 0 -> 1220 bytes Software/sie_cg/images/yes.png | Bin Software/sie_cg/images/zoom_in.png | Bin Software/sie_cg/images/zoom_out.png | Bin Software/sie_cg/librarydialog.ui | 136 +- Software/sie_cg/lineitem.cpp | 27 +- Software/sie_cg/lineitem.h | 2 + Software/sie_cg/main.cpp | 0 Software/sie_cg/main.cpp2 | 55 + Software/sie_cg/mainwindow.cpp | 1179 ++++++- Software/sie_cg/mainwindow.h | 114 +- Software/sie_cg/moc_librarydialog.cpp | 0 Software/sie_cg/optionsdialog.cpp | 26 + Software/sie_cg/optionsdialog.h | 23 + Software/sie_cg/optionsdialog.ui | 426 +++ .../sie_cg/templates/basic (copy)/Makefile | 46 + .../sie_cg/templates/basic (copy)/basic.bit | Bin 0 -> 283852 bytes .../templates/basic (copy)/jz47xx_gpio.cpp | 108 + .../templates/basic (copy)/jz47xx_gpio.h | 84 + .../templates/basic (copy)/jz47xx_mmap.cpp | 53 + .../templates/basic (copy)/jz47xx_mmap.h | 30 + .../basic (copy)/jz_adc_peripheral.cpp | 48 + .../basic (copy)/jz_adc_peripheral.h | 87 + .../sie_cg/templates/basic (copy)/main.cpp | 18 + Software/sie_cg/templates/basic/Makefile | 63 + Software/sie_cg/templates/basic/basic.bit | Bin 0 -> 283852 bytes Software/sie_cg/templates/basic/fbutils.c | 3008 +++++++++++++++++ Software/sie_cg/templates/basic/fbutils.h | 63 + .../sie_cg/templates/basic/jz47xx_gpio.cpp | 108 + Software/sie_cg/templates/basic/jz47xx_gpio.h | 84 + .../sie_cg/templates/basic/jz47xx_mmap.cpp | 32 + Software/sie_cg/templates/basic/jz47xx_mmap.h | 22 + .../templates/basic/jz_adc_peripheral.cpp | 78 + .../templates/basic/jz_adc_peripheral.h | 86 + .../sie_cg/templates/basic/jz_fpga_init.cpp | 29 + .../sie_cg/templates/basic/jz_fpga_init.h | 12 + Software/sie_cg/templates/basic/main.cpp | 53 + Software/sie_cg/test.sie | 55 +- Software/sie_cg/tmp/SIE_APP/Makefile | 63 + Software/sie_cg/tmp/SIE_APP/SIE_APP | Bin 0 -> 35933 bytes Software/sie_cg/tmp/SIE_APP/basic.bit | Bin 0 -> 283852 bytes Software/sie_cg/tmp/SIE_APP/fbutils.c | 3008 +++++++++++++++++ Software/sie_cg/tmp/SIE_APP/fbutils.h | 63 + Software/sie_cg/tmp/SIE_APP/fbutils.o | Bin 0 -> 11572 bytes Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.cpp | 108 + Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.h | 84 + Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.o | Bin 0 -> 2216 bytes Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.cpp | 32 + Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.h | 22 + Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.o | Bin 0 -> 1884 bytes .../sie_cg/tmp/SIE_APP/jz_adc_peripheral.cpp | 78 + .../sie_cg/tmp/SIE_APP/jz_adc_peripheral.h | 86 + .../sie_cg/tmp/SIE_APP/jz_adc_peripheral.o | Bin 0 -> 3144 bytes Software/sie_cg/tmp/SIE_APP/jz_fpga_init.cpp | 29 + Software/sie_cg/tmp/SIE_APP/jz_fpga_init.h | 12 + Software/sie_cg/tmp/SIE_APP/jz_fpga_init.o | Bin 0 -> 1780 bytes Software/sie_cg/tmp/SIE_APP/main.cpp | 616 ++++ Software/sie_cg/tmp/SIE_APP/main.o | Bin 0 -> 9812 bytes 138 files changed, 14826 insertions(+), 538 deletions(-) create mode 100755 Software/sie_cg/adc_test.sie create mode 100644 Software/sie_cg/adc_test_8.sie mode change 100644 => 100755 Software/sie_cg/arrow.cpp mode change 100644 => 100755 Software/sie_cg/arrow.h create mode 100644 Software/sie_cg/block_editor/adc_eight.die mode change 100644 => 100755 Software/sie_cg/block_editor/adc_single.die mode change 100644 => 100755 Software/sie_cg/block_editor/arrow.cpp mode change 100644 => 100755 Software/sie_cg/block_editor/arrow.h mode change 100644 => 100755 Software/sie_cg/block_editor/constant.die create mode 100755 Software/sie_cg/block_editor/constant_bool.die mode change 100644 => 100755 Software/sie_cg/block_editor/diagramscene.cpp mode change 100644 => 100755 Software/sie_cg/block_editor/diagramscene.h mode change 100644 => 100755 Software/sie_cg/block_editor/diagramscene.pro mode change 100644 => 100755 Software/sie_cg/block_editor/diagramscene.pro.user mode change 100644 => 100755 Software/sie_cg/block_editor/diagramscene.qrc mode change 100644 => 100755 Software/sie_cg/block_editor/diagramtextitem.cpp mode change 100644 => 100755 Software/sie_cg/block_editor/diagramtextitem.h create mode 100644 Software/sie_cg/block_editor/divider.die create mode 100644 Software/sie_cg/block_editor/framebuffer_drawline.die create mode 100644 Software/sie_cg/block_editor/framebuffer_line.die create mode 100644 Software/sie_cg/block_editor/framebuffer_put_int.die mode change 100644 => 100755 Software/sie_cg/block_editor/left_shift.die mode change 100644 => 100755 Software/sie_cg/block_editor/lineitem.cpp mode change 100644 => 100755 Software/sie_cg/block_editor/lineitem.h mode change 100644 => 100755 Software/sie_cg/block_editor/main.cpp mode change 100644 => 100755 Software/sie_cg/block_editor/mainwindow.cpp mode change 100644 => 100755 Software/sie_cg/block_editor/mainwindow.h create mode 100644 Software/sie_cg/block_editor/multiplier_int.die create mode 100644 Software/sie_cg/block_editor/plus.die create mode 100755 Software/sie_cg/block_editor/printf_int.die mode change 100644 => 100755 Software/sie_cg/block_editor/pwm_single.die mode change 100644 => 100755 Software/sie_cg/block_editor/right_shift.die mode change 100644 => 100755 Software/sie_cg/block_editor/test_block1.die mode change 100644 => 100755 Software/sie_cg/block_editor/test_block2.die mode change 100644 => 100755 Software/sie_cg/block_editor/test_block3.die mode change 100644 => 100755 Software/sie_cg/block_editor/test_block4.die mode change 100644 => 100755 Software/sie_cg/block_editor/timer.die mode change 100644 => 100755 Software/sie_cg/block_editor/while.die create mode 100755 Software/sie_cg/callapp.cpp create mode 100755 Software/sie_cg/callapp.h mode change 100644 => 100755 Software/sie_cg/codedialog.cpp mode change 100644 => 100755 Software/sie_cg/codedialog.h mode change 100644 => 100755 Software/sie_cg/codedialog.ui mode change 100644 => 100755 Software/sie_cg/diagramitem.cpp mode change 100644 => 100755 Software/sie_cg/diagramitem.h mode change 100644 => 100755 Software/sie_cg/diagramscene.cpp mode change 100644 => 100755 Software/sie_cg/diagramscene.h mode change 100644 => 100755 Software/sie_cg/diagramscene.pro mode change 100644 => 100755 Software/sie_cg/diagramscene.pro.user mode change 100644 => 100755 Software/sie_cg/diagramscene.qrc mode change 100644 => 100755 Software/sie_cg/diagramtextitem.cpp mode change 100644 => 100755 Software/sie_cg/diagramtextitem.h mode change 100644 => 100755 Software/sie_cg/images/background1.png mode change 100644 => 100755 Software/sie_cg/images/background2.png mode change 100644 => 100755 Software/sie_cg/images/background3.png mode change 100644 => 100755 Software/sie_cg/images/background4.png mode change 100644 => 100755 Software/sie_cg/images/bold.png mode change 100644 => 100755 Software/sie_cg/images/bringtofront.png create mode 100644 Software/sie_cg/images/copy.png mode change 100644 => 100755 Software/sie_cg/images/delete.png mode change 100644 => 100755 Software/sie_cg/images/exit.png mode change 100644 => 100755 Software/sie_cg/images/floodfill.png create mode 100755 Software/sie_cg/images/grid.png mode change 100644 => 100755 Software/sie_cg/images/italic.png mode change 100644 => 100755 Software/sie_cg/images/linecolor.png mode change 100644 => 100755 Software/sie_cg/images/linepointer.png mode change 100644 => 100755 Software/sie_cg/images/lower1.png mode change 100644 => 100755 Software/sie_cg/images/new.png mode change 100644 => 100755 Software/sie_cg/images/no.png mode change 100644 => 100755 Software/sie_cg/images/open.png create mode 100644 Software/sie_cg/images/paste.png mode change 100644 => 100755 Software/sie_cg/images/pointer.png mode change 100644 => 100755 Software/sie_cg/images/preview.png mode change 100644 => 100755 Software/sie_cg/images/raise1.png create mode 100644 Software/sie_cg/images/redo.png mode change 100644 => 100755 Software/sie_cg/images/save.png mode change 100644 => 100755 Software/sie_cg/images/save_as.png mode change 100644 => 100755 Software/sie_cg/images/sendtoback.png mode change 100644 => 100755 Software/sie_cg/images/textpointer.png mode change 100644 => 100755 Software/sie_cg/images/underline.png create mode 100644 Software/sie_cg/images/undo.png mode change 100644 => 100755 Software/sie_cg/images/yes.png mode change 100644 => 100755 Software/sie_cg/images/zoom_in.png mode change 100644 => 100755 Software/sie_cg/images/zoom_out.png mode change 100644 => 100755 Software/sie_cg/librarydialog.ui mode change 100644 => 100755 Software/sie_cg/lineitem.cpp mode change 100644 => 100755 Software/sie_cg/lineitem.h mode change 100644 => 100755 Software/sie_cg/main.cpp create mode 100755 Software/sie_cg/main.cpp2 mode change 100644 => 100755 Software/sie_cg/mainwindow.cpp mode change 100644 => 100755 Software/sie_cg/mainwindow.h mode change 100644 => 100755 Software/sie_cg/moc_librarydialog.cpp create mode 100755 Software/sie_cg/optionsdialog.cpp create mode 100755 Software/sie_cg/optionsdialog.h create mode 100755 Software/sie_cg/optionsdialog.ui create mode 100755 Software/sie_cg/templates/basic (copy)/Makefile create mode 100755 Software/sie_cg/templates/basic (copy)/basic.bit create mode 100755 Software/sie_cg/templates/basic (copy)/jz47xx_gpio.cpp create mode 100755 Software/sie_cg/templates/basic (copy)/jz47xx_gpio.h create mode 100755 Software/sie_cg/templates/basic (copy)/jz47xx_mmap.cpp create mode 100755 Software/sie_cg/templates/basic (copy)/jz47xx_mmap.h create mode 100755 Software/sie_cg/templates/basic (copy)/jz_adc_peripheral.cpp create mode 100755 Software/sie_cg/templates/basic (copy)/jz_adc_peripheral.h create mode 100755 Software/sie_cg/templates/basic (copy)/main.cpp create mode 100755 Software/sie_cg/templates/basic/Makefile create mode 100755 Software/sie_cg/templates/basic/basic.bit create mode 100644 Software/sie_cg/templates/basic/fbutils.c create mode 100644 Software/sie_cg/templates/basic/fbutils.h create mode 100755 Software/sie_cg/templates/basic/jz47xx_gpio.cpp create mode 100755 Software/sie_cg/templates/basic/jz47xx_gpio.h create mode 100755 Software/sie_cg/templates/basic/jz47xx_mmap.cpp create mode 100755 Software/sie_cg/templates/basic/jz47xx_mmap.h create mode 100755 Software/sie_cg/templates/basic/jz_adc_peripheral.cpp create mode 100755 Software/sie_cg/templates/basic/jz_adc_peripheral.h create mode 100755 Software/sie_cg/templates/basic/jz_fpga_init.cpp create mode 100755 Software/sie_cg/templates/basic/jz_fpga_init.h create mode 100755 Software/sie_cg/templates/basic/main.cpp mode change 100644 => 100755 Software/sie_cg/test.sie create mode 100755 Software/sie_cg/tmp/SIE_APP/Makefile create mode 100755 Software/sie_cg/tmp/SIE_APP/SIE_APP create mode 100755 Software/sie_cg/tmp/SIE_APP/basic.bit create mode 100644 Software/sie_cg/tmp/SIE_APP/fbutils.c create mode 100644 Software/sie_cg/tmp/SIE_APP/fbutils.h create mode 100644 Software/sie_cg/tmp/SIE_APP/fbutils.o create mode 100755 Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.cpp create mode 100755 Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.h create mode 100644 Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.o create mode 100755 Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.cpp create mode 100755 Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.h create mode 100644 Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.o create mode 100755 Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.cpp create mode 100755 Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.h create mode 100644 Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.o create mode 100755 Software/sie_cg/tmp/SIE_APP/jz_fpga_init.cpp create mode 100755 Software/sie_cg/tmp/SIE_APP/jz_fpga_init.h create mode 100644 Software/sie_cg/tmp/SIE_APP/jz_fpga_init.o create mode 100755 Software/sie_cg/tmp/SIE_APP/main.cpp create mode 100644 Software/sie_cg/tmp/SIE_APP/main.o diff --git a/Software/sie_cg/adc_test.sie b/Software/sie_cg/adc_test.sie new file mode 100755 index 0000000..021a762 --- /dev/null +++ b/Software/sie_cg/adc_test.sie @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/adc_test_8.sie b/Software/sie_cg/adc_test_8.sie new file mode 100644 index 0000000..63653f8 --- /dev/null +++ b/Software/sie_cg/adc_test_8.sie @@ -0,0 +1,432 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/arrow.cpp b/Software/sie_cg/arrow.cpp old mode 100644 new mode 100755 index fa4634a..80a3260 --- a/Software/sie_cg/arrow.cpp +++ b/Software/sie_cg/arrow.cpp @@ -42,6 +42,7 @@ #include #include "arrow.h" +#include "diagramscene.h" #include const qreal Pi = 3.14; @@ -52,16 +53,16 @@ Arrow::Arrow(DiagramTextItem *startItem, DiagramTextItem *endItem, { myStartItem = startItem; myEndItem = endItem; - arrowSize = 10; + arrowSize = 5; moving=0; - //setFlag(QGraphicsItem::ItemIsMovable, true); - setFlag(QGraphicsItem::ItemIsSelectable, true); myColor = Qt::black; setPen(QPen(myColor, 2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); myOwnerScene = scene; lineItem *newLine= new lineItem(QPointF(0,0),QPointF(0,0),this); myOwnerScene->addItem(newLine); addLine(newLine); + //setFlag(QGraphicsItem::ItemIsMovable, true); + setFlag(QGraphicsItem::ItemIsSelectable, true); } void Arrow::removeLine(lineItem *line) @@ -260,8 +261,18 @@ void Arrow::setVisibleCorners(bool visible) } } +void Arrow::setSelectedLines(bool sel) +{ + foreach (lineItem *line, myCLines) { + line->setSelected(sel); + } + foreach (lineItem *line, myLines) { + line->setSelected(sel); + } +} + QDomElement Arrow::toXml(QDomDocument &document, - QList sceneItems) const + QHash DiagramsID) const { QDomElement diagramArrow = document.createElement("Arrow"); @@ -269,14 +280,14 @@ QDomElement Arrow::toXml(QDomDocument &document, diagramArrow.setAttribute("start-x",startOffset().x()); diagramArrow.setAttribute("start-y",startOffset().y()); diagramArrow.setAttribute("start-Owner", - sceneItems.indexOf(startOwner())); + DiagramsID.key(startOwner())); diagramArrow.setAttribute("start-ID",this->startItem()->textID()); //Set attibutes; endItem diagramArrow.setAttribute("end-x",endOffset().x()); diagramArrow.setAttribute("end-y",endOffset().y()); diagramArrow.setAttribute("end-Owner", - sceneItems.indexOf(endOwner())); + DiagramsID.key(endOwner())); diagramArrow.setAttribute("end-ID",this->endItem()->textID()); diagramArrow.setAttribute("color",myColor.name()); @@ -322,6 +333,10 @@ void Arrow::mousePressEvent(QGraphicsSceneMouseEvent *event) previousPos = event->scenePos(); moving=1; } + setSelectedLines(false); + positionChanged=0; + qobject_cast(myOwnerScene)->saveUndo(); + QGraphicsPathItem::mousePressEvent(event); } @@ -333,6 +348,12 @@ void Arrow::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) previousPos = event->scenePos(); } moving=0; + + if(!positionChanged) + qobject_cast(myOwnerScene)->removeLastUndo(); + else + qobject_cast(myOwnerScene)->clearRedo(); + QGraphicsPathItem::mouseReleaseEvent(event); } @@ -342,6 +363,7 @@ void Arrow::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { snapToGrid(event); previousPos = event->scenePos(); + positionChanged=1; } QGraphicsPathItem::mouseMoveEvent(event); } diff --git a/Software/sie_cg/arrow.h b/Software/sie_cg/arrow.h old mode 100644 new mode 100755 index 5f8e2aa..ff152bd --- a/Software/sie_cg/arrow.h +++ b/Software/sie_cg/arrow.h @@ -42,12 +42,17 @@ #ifndef ARROW_H #define ARROW_H +#include +#include + #include #include #include "diagramtextitem.h" #include "lineitem.h" #include "diagramitem.h" +class lineItem; + QT_BEGIN_NAMESPACE class QGraphicsPolygonItem; class QGraphicsLineItem; @@ -58,8 +63,6 @@ class QGraphicsSceneMouseEvent; class QPainterPath; QT_END_NAMESPACE -class lineItem; - class Arrow : public QGraphicsPathItem { public: @@ -82,12 +85,15 @@ public: void removeLine(lineItem *line); void removeLines(); bool addLine(lineItem *line); + QList getCorners() + { return myCorners;} void createCorner(QPointF cornerPos, lineItem *inLine); void createCorner(QPointF cornerPos, int index); void moveCorner(QPointF cornerPos, lineItem *inLine); void setVisibleCorners(bool visible); + void setSelectedLines(bool sel); void snapToGrid(QGraphicsSceneMouseEvent *event); @@ -104,7 +110,13 @@ public: DiagramItem *endOwner() const { return myEndItem->ownerItem();} - QDomElement toXml(QDomDocument &,QList) const; + QDomElement toXml(QDomDocument &,QHash) const; + + QGraphicsScene *myOwnerScene; + + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + void mouseMoveEvent(QGraphicsSceneMouseEvent *event); public slots: void updatePosition(); @@ -112,9 +124,6 @@ public slots: protected: void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); - void mouseMoveEvent(QGraphicsSceneMouseEvent *event); private: DiagramTextItem *myStartItem; @@ -124,11 +133,11 @@ private: QPolygonF arrowHeadStart; QList myLines; QList myCLines; - QList myCorners; - QGraphicsScene *myOwnerScene; + QList myCorners; qreal arrowSize; bool moving; QPointF previousPos; + bool positionChanged; }; #endif diff --git a/Software/sie_cg/block_editor/adc_eight.die b/Software/sie_cg/block_editor/adc_eight.die new file mode 100644 index 0000000..48a198b --- /dev/null +++ b/Software/sie_cg/block_editor/adc_eight.die @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + >16)&0xFFFF; + out_2 = sampleData&0xFFFF; + sampleData = ADC_DATA[1]; + out_3 = (sampleData>>16)&0xFFFF; + out_4 = sampleData&0xFFFF; + sampleData = ADC_DATA[2]; + out_5 = (sampleData>>16)&0xFFFF; + out_6 = sampleData&0xFFFF; + sampleData = ADC_DATA[3]; + out_7 = (sampleData>>16)&0xFFFF; + out_8 = sampleData&0xFFFF; +]]> diff --git a/Software/sie_cg/block_editor/adc_single.die b/Software/sie_cg/block_editor/adc_single.die old mode 100644 new mode 100755 index 1bbd6b0..fce60b9 --- a/Software/sie_cg/block_editor/adc_single.die +++ b/Software/sie_cg/block_editor/adc_single.die @@ -1,23 +1,31 @@ - + + + + - - + + - - - + + - - - - - - - - + + + + + + + diff --git a/Software/sie_cg/block_editor/arrow.cpp b/Software/sie_cg/block_editor/arrow.cpp old mode 100644 new mode 100755 index 0adb705..704c3d6 --- a/Software/sie_cg/block_editor/arrow.cpp +++ b/Software/sie_cg/block_editor/arrow.cpp @@ -271,6 +271,7 @@ void Arrow::setVisibleCorners(bool visible) { foreach (lineItem *line, myCLines) { line->setVisible(visible); + line->setZValue(2000.0); } if(myOwnerScene->items().indexOf(SECLine)!=-1) { diff --git a/Software/sie_cg/block_editor/arrow.h b/Software/sie_cg/block_editor/arrow.h old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/constant.die b/Software/sie_cg/block_editor/constant.die old mode 100644 new mode 100755 index e17c5c9..747f9d8 --- a/Software/sie_cg/block_editor/constant.die +++ b/Software/sie_cg/block_editor/constant.die @@ -1,14 +1,21 @@ - + - - - + + + + + + + + + - - - - - + + + + diff --git a/Software/sie_cg/block_editor/constant_bool.die b/Software/sie_cg/block_editor/constant_bool.die new file mode 100755 index 0000000..1a2b405 --- /dev/null +++ b/Software/sie_cg/block_editor/constant_bool.die @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/diagramscene.cpp b/Software/sie_cg/block_editor/diagramscene.cpp old mode 100644 new mode 100755 index bd86d6b..4f06811 --- a/Software/sie_cg/block_editor/diagramscene.cpp +++ b/Software/sie_cg/block_editor/diagramscene.cpp @@ -62,23 +62,12 @@ DiagramScene::DiagramScene(QMenu *itemMenu, MainWindow *ownerWindow, myCorners=0; TitleText = new DiagramTextItem(0,0,1,0xFFF,255,"BLOCK NAME HERE not visible", - QPointF(500,370)); + QPointF(500,420)); + TitleText->setZValue(1000); addItem(TitleText); } -void DiagramScene::editorLostFocus(DiagramTextItem *item) -{ - QTextCursor cursor = item->textCursor(); - cursor.clearSelection(); - item->setTextCursor(cursor); - - if (item->toPlainText().isEmpty()) { - removeItem(item); - item->deleteLater(); - } -} - void DiagramScene::drawBackground(QPainter *p, const QRectF &r) { p -> save(); @@ -148,7 +137,7 @@ QString DiagramScene::createPrototype() functionPrototype += "char "; break; case 3: - functionPrototype += "integer "; + functionPrototype += "int "; break; case 4: functionPrototype += "double "; @@ -157,10 +146,10 @@ QString DiagramScene::createPrototype() functionPrototype += "float "; break; case 6: - functionPrototype += "short "; + functionPrototype += "short int "; break; case 7: - functionPrototype += "long "; + functionPrototype += "long int "; break; case 8: functionPrototype += "unsigned char "; @@ -169,10 +158,10 @@ QString DiagramScene::createPrototype() functionPrototype += "unsigned integer "; break; case 10: - functionPrototype += "unsigned short "; + functionPrototype += "unsigned short int "; break; case 11: - functionPrototype += "unsigned long "; + functionPrototype += "unsigned long int "; break; default:; } @@ -189,34 +178,6 @@ QString DiagramScene::createPrototype() void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) { doSnapToGrid(mouseEvent); - foreach (QGraphicsItem *item, this->items(mouseEvent->scenePos())) { - if (item->type() == DiagramTextItem::Type) { - if(qgraphicsitem_cast(item)->styleIO()<256) - { - myOwnerWindow->statusBar->showMessage( - qgraphicsitem_cast(item)->toPlainText() + - tr("\t : Input/Output text label -> {ID = ") + - QString::number(qgraphicsitem_cast - (item)->textID()) + tr("}")); - } - else if(qgraphicsitem_cast(item)->styleIO()==256) - { - myOwnerWindow->statusBar->showMessage( - qgraphicsitem_cast(item)->toPlainText() + - tr("\t : Text label -> {ID = ") + - QString::number(qgraphicsitem_cast - (item)->textID()) + tr("}")); - } - else if(qgraphicsitem_cast(item)->styleIO()==257) - { - myOwnerWindow->statusBar->showMessage( - qgraphicsitem_cast(item)->toPlainText() + - tr("\t : Editable text label -> {ID = ") + - QString::number(qgraphicsitem_cast - (item)->textID()) + tr("}")); - } - } - } myOwnerWindow->updateProt(); QString Text; @@ -243,8 +204,6 @@ void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) if(addResult!=-1) { textItem->setZValue(1000.0); - connect(textItem, SIGNAL(lostFocus(DiagramTextItem*)), - this, SLOT(editorLostFocus(DiagramTextItem*))); addItem(textItem); textItem->setTextID(addResult); } @@ -252,7 +211,7 @@ void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) { delete(textItem); QMessageBox::warning(0,"Full","The block can only have " - "255 text items"); + "255 labels/IOs."); } emit textInserted(textItem); break; @@ -301,8 +260,40 @@ void DiagramScene::mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent) QLineF newLine(line->line().p1(), mouseEvent->scenePos()); line->setLine(newLine); } + QGraphicsScene::mouseMoveEvent(mouseEvent); + QPointF mousePos = mouseEvent->scenePos(); + mousePos.setX(mousePos.x()-500); + mousePos.setY(-(mousePos.y()-500)); - QGraphicsScene::mouseMoveEvent(mouseEvent); + QString barMesg= QString("X[%1] Y[%2]").arg(QString::number(mousePos.x())) + .arg(QString::number(mousePos.y())); + + foreach (QGraphicsItem *item, this->items(mouseEvent->scenePos())) { + if (item->type() == DiagramTextItem::Type) { + if(qgraphicsitem_cast(item)->styleIO()<256) + { + barMesg += + tr(" ** Over In/Out text label with {ID = ") + + QString::number(qgraphicsitem_cast + (item)->textID()) + tr("}"); + } + else if(qgraphicsitem_cast(item)->styleIO()==256) + { + barMesg += + tr(" ** Over text label with {ID = ") + + QString::number(qgraphicsitem_cast + (item)->textID()) + tr("}"); + } + else if(qgraphicsitem_cast(item)->styleIO()==257) + { + barMesg += + tr(" ** Over editable text label with {ID = ") + + QString::number(qgraphicsitem_cast + (item)->textID()) + tr("}"); + } + } + } + myOwnerWindow->statusBar->showMessage(barMesg); } @@ -351,9 +342,11 @@ QDomDocument DiagramScene::toXmlFormat() QDomComment initialComments=document.createComment( "File for SIE Code Generator. Custmos Blocks"); document.appendChild(initialComments); + QDomElement diagram = document.createElement("CustomItem"); diagram.setAttribute("BlockName",TitleText->toPlainText()); document.appendChild(diagram); + //Lists of items QList Items; QList Arrows; @@ -368,7 +361,8 @@ QDomDocument DiagramScene::toXmlFormat() if(Arrows.count()>1) {printf("Something is wrong.\n"); fflush(stdout);} //Create the XML structure - diagram.appendChild(myPolygonPath->toXml(document)); + if(myPolygonPath!=0) + diagram.appendChild(myPolygonPath->toXml(document)); QDomElement element; if(Items.count()>0) @@ -386,6 +380,26 @@ QDomDocument DiagramScene::toXmlFormat() diagram.appendChild(textItems); } + + //Add the code as CDATA sections + //Order: Header Code, Init Code, Block Code and Extra Code. + + QDomCDATASection headerCode=document.createCDATASection( + myOwnerWindow->headerTextEdit->toPlainText()); + diagram.appendChild(headerCode); + + QDomCDATASection initCode=document.createCDATASection( + myOwnerWindow->initTextEdit->toPlainText()); + diagram.appendChild(initCode); + + QDomCDATASection blockCode=document.createCDATASection( + myOwnerWindow->blockTextEdit->toPlainText()); + diagram.appendChild(blockCode); + + QDomCDATASection extraCode=document.createCDATASection( + myOwnerWindow->extraTextEdit->toPlainText()); + diagram.appendChild(extraCode); + return(document); } @@ -401,11 +415,39 @@ int DiagramScene::fromXmlFormat(QDomDocument document) TitleText->setPlainText("Please set Block Name"); else TitleText->setPlainText(customItem.attribute("BlockName")); + TitleText->updatePosition(); + int codeIdx = 0; + for (QDomNode node = customItem.firstChild() ; !node.isNull() ; node = node.nextSibling()) - { + { + if(node.isCDATASection()) + { + QDomCDATASection Code = node.toCDATASection(); + switch(codeIdx) + { + case 0: + myOwnerWindow->headerTextEdit->setPlainText(Code.data()); + break; + case 1: + myOwnerWindow->initTextEdit->setPlainText(Code.data()); + break; + case 2: + myOwnerWindow->blockTextEdit->setPlainText(Code.data()); + break; + case 3: + myOwnerWindow->extraTextEdit->setPlainText(Code.data()); + break; + default: + QMessageBox::warning(0,"Parsing XML", tr("Extra CDATA found in") + +tr(" file, this section will be ignored.")); + } + codeIdx++; + } + else + { QDomElement element = node.toElement(); if(element.tagName()=="Polygon") { @@ -446,6 +488,7 @@ int DiagramScene::fromXmlFormat(QDomDocument document) int myStyleIO = textItemE.attribute("myStyleIO").toInt(); int myID = textItemE.attribute("ID").toInt(); + bool editableItem = textItemE.attribute("editableItem").toInt(); QPointF posOffset= QPointF((QPointF(textItemE.attribute("posOffset-x") @@ -465,12 +508,23 @@ int DiagramScene::fromXmlFormat(QDomDocument document) DiagramTextItem * newTextItem = new DiagramTextItem(0,0,1,myStyleIO,myID,itemString,posOffset); newTextItem->setZValue(1000.0); - connect(newTextItem, SIGNAL(lostFocus(DiagramTextItem*)), - this, SLOT(editorLostFocus(DiagramTextItem*))); addItem(newTextItem); - textItemsByID.insert(myID,newTextItem); + + if(textItemsByID.find(myID)!=textItemsByID.end()) + { + int result=addTextItem(newTextItem); + QMessageBox::warning(0,"ID Problems", + tr("Label with ID[")+QString::number(myID)+ + tr("] already exists, this will be reasigned to [")+ + QString::number(result)+ + tr("] for prevent problems.")); + newTextItem->setTextID(result); + } + else + textItemsByID.insert(myID,newTextItem); } } + } } myOwnerWindow->updateProt(); return 1; @@ -501,13 +555,15 @@ void DiagramScene::cleanScene() removeItem(myPolygonPath); delete(myPolygonPath); } - TitleText->setPlainText("BLOCK NAME HERE (not visible)"); + TitleText->setPlainText("BLOCK NAME HERE not visible"); TitleText->updatePosition(); + this->addItem(TitleText); + textItemsByID.clear(); } int DiagramScene::addTextItem(DiagramTextItem * textItem) { - for(int i=0; i<255; i++) + for(int i=0; i<256; i++) { QHash::iterator iter= textItemsByID.find(i); if(iter==textItemsByID.end()) diff --git a/Software/sie_cg/block_editor/diagramscene.h b/Software/sie_cg/block_editor/diagramscene.h old mode 100644 new mode 100755 index 39137b5..e5c8aca --- a/Software/sie_cg/block_editor/diagramscene.h +++ b/Software/sie_cg/block_editor/diagramscene.h @@ -83,11 +83,12 @@ public: int addTextItem(DiagramTextItem * textItem); void removeTextItem(DiagramTextItem * textItem); + Arrow *myPolygonPath; + QString createPrototype(); public slots: - void setMode(Mode mode){myMode=mode;} - void editorLostFocus(DiagramTextItem *item); + void setMode(Mode mode){myMode=mode;} signals: void textInserted(QGraphicsTextItem *item); @@ -108,8 +109,7 @@ private: QString myTypeString; bool leftButtonDown; QPointF startPoint; - QGraphicsLineItem *line; - Arrow *myPolygonPath; + QGraphicsLineItem *line; QFont myFont; DiagramTextItem *textItem; DiagramTextItem *TitleText; diff --git a/Software/sie_cg/block_editor/diagramscene.pro b/Software/sie_cg/block_editor/diagramscene.pro old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/diagramscene.pro.user b/Software/sie_cg/block_editor/diagramscene.pro.user old mode 100644 new mode 100755 index 01524d2..1f98396 --- a/Software/sie_cg/block_editor/diagramscene.pro.user +++ b/Software/sie_cg/block_editor/diagramscene.pro.user @@ -76,7 +76,7 @@ Debug - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-i0TevybO0n,guid=8b93acbaab2ecdba6bb7d4064ce7e29f + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-mvXjaDjNgc,guid=2d86690d9bd83b6a69b540554cf6e2bd DEFAULTS_PATH=/usr/share/gconf/gnome.default.path DESKTOP_SESSION=gnome DISPLAY=:0.0 @@ -84,7 +84,7 @@ GDM_KEYBOARD_LAYOUT=es GDM_LANG=en_US.utf8 GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_CONTROL=/tmp/keyring-7RmeU0 + GNOME_KEYRING_CONTROL=/tmp/keyring-tlrgjl GTK_MODULES=canberra-gtk-module HOME=/home/juan64bits LANG=en_US.utf8 @@ -95,17 +95,17 @@ PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PWD=/home/juan64bits QTDIR=/usr/share/qt4 - SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1244,unix/Maximus:/tmp/.ICE-unix/1244 + SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1257,unix/Maximus:/tmp/.ICE-unix/1257 SHELL=/bin/bash SPEECHD_PORT=7560 - SSH_AGENT_PID=1408 - SSH_AUTH_SOCK=/tmp/keyring-7RmeU0/ssh + SSH_AGENT_PID=1393 + SSH_AUTH_SOCK=/tmp/keyring-tlrgjl/ssh USER=juan64bits USERNAME=juan64bits - XAUTHORITY=/var/run/gdm/auth-for-juan64bits-W3dU0B/database + XAUTHORITY=/var/run/gdm/auth-for-juan64bits-UYZHqR/database XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1290265246.859440-43205519 + XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1291248314.906440-791960316 /home/juan64bits/ebd/ECB/nn-usb-fpga/Software/sie_cg/block_editor/diagramscene.pro @@ -124,7 +124,7 @@ Debug - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-i0TevybO0n,guid=8b93acbaab2ecdba6bb7d4064ce7e29f + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-mvXjaDjNgc,guid=2d86690d9bd83b6a69b540554cf6e2bd DEFAULTS_PATH=/usr/share/gconf/gnome.default.path DESKTOP_SESSION=gnome DISPLAY=:0.0 @@ -132,7 +132,7 @@ GDM_KEYBOARD_LAYOUT=es GDM_LANG=en_US.utf8 GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_CONTROL=/tmp/keyring-7RmeU0 + GNOME_KEYRING_CONTROL=/tmp/keyring-tlrgjl GTK_MODULES=canberra-gtk-module HOME=/home/juan64bits LANG=en_US.utf8 @@ -143,17 +143,17 @@ PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PWD=/home/juan64bits QTDIR=/usr/share/qt4 - SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1244,unix/Maximus:/tmp/.ICE-unix/1244 + SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1257,unix/Maximus:/tmp/.ICE-unix/1257 SHELL=/bin/bash SPEECHD_PORT=7560 - SSH_AGENT_PID=1408 - SSH_AUTH_SOCK=/tmp/keyring-7RmeU0/ssh + SSH_AGENT_PID=1393 + SSH_AUTH_SOCK=/tmp/keyring-tlrgjl/ssh USER=juan64bits USERNAME=juan64bits - XAUTHORITY=/var/run/gdm/auth-for-juan64bits-W3dU0B/database + XAUTHORITY=/var/run/gdm/auth-for-juan64bits-UYZHqR/database XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1290265246.859440-43205519 + XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1291248314.906440-791960316 false diff --git a/Software/sie_cg/block_editor/diagramscene.qrc b/Software/sie_cg/block_editor/diagramscene.qrc old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/diagramtextitem.cpp b/Software/sie_cg/block_editor/diagramtextitem.cpp old mode 100644 new mode 100755 index ab59d92..2abf365 --- a/Software/sie_cg/block_editor/diagramtextitem.cpp +++ b/Software/sie_cg/block_editor/diagramtextitem.cpp @@ -56,14 +56,19 @@ DiagramTextItem::DiagramTextItem( editableItem=editable; setPlainText(defaultText); posOffset=offset; - //setFlag(QGraphicsItem::ItemIsMovable,0); - if(editable) - setFlag(QGraphicsItem::ItemIsSelectable,1); + + setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); + setFlag(QGraphicsItem::ItemSendsScenePositionChanges, true); + + if(myStyleIO==0xFFF) + setFlag(QGraphicsItem::ItemIsMovable,false); else - setFlag(QGraphicsItem::ItemIsFocusable,0); + setFlag(QGraphicsItem::ItemIsMovable,true); + + setFlag(QGraphicsItem::ItemIsSelectable,true); + editorOpened=0; updatePosition(); - moving=0; } void DiagramTextItem::updatePosition() @@ -81,22 +86,25 @@ void DiagramTextItem::updatePosition() QVariant DiagramTextItem::itemChange(GraphicsItemChange change, const QVariant &value) { - if (change == QGraphicsItem::ItemSelectedHasChanged) - emit selectedChange(this); - return value; } void DiagramTextItem::focusOutEvent(QFocusEvent *event) { - if(editableItem) - { - if(toPlainText()=="") setPlainText("?"); - //updatePosition(); - setTextInteractionFlags(Qt::NoTextInteraction); - emit lostFocus(this); - QGraphicsTextItem::focusOutEvent(event); - } + setPlainText(toPlainText().trimmed()); + if(toPlainText()=="") setPlainText("?"); + setTextInteractionFlags(Qt::NoTextInteraction); + + if(myStyleIO!=0xFFF) + setFlag(QGraphicsItem::ItemIsMovable,true); + + QTextCursor cursor = textCursor(); + cursor.clearSelection(); + setTextCursor(cursor); + QGraphicsTextItem::focusOutEvent(event); + editorOpened=0; + + updatePosition(); } void DiagramTextItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) @@ -105,36 +113,47 @@ void DiagramTextItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { if (textInteractionFlags() == Qt::NoTextInteraction) setTextInteractionFlags(Qt::TextEditorInteraction); + setSelected(1); + setFocus(Qt::MouseFocusReason); + setFlag(QGraphicsItem::ItemIsMovable,false); + editorOpened=1; } - QGraphicsTextItem::mouseDoubleClickEvent(event); + QGraphicsTextItem::mouseDoubleClickEvent(event); } void DiagramTextItem::snapToGrid(QGraphicsSceneMouseEvent *event) { if(myStyleIO!=0xFFF) - setOffset(event->scenePos()); - updatePosition(); + setOffset(event->scenePos()); } void DiagramTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { - moving=1; - //snapToGrid(event); - QGraphicsTextItem::mousePressEvent(event); + if(editorOpened==0) + { + printf("StyleIO:[%x]",myStyleIO); fflush(stdout); + snapToGrid(event); + QGraphicsTextItem::mousePressEvent(event); + } } void DiagramTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) -{ - moving=0; - QGraphicsTextItem::mouseReleaseEvent(event); +{ + if(editorOpened==0 && myStyleIO!=0xFFF) + { + snapToGrid(event); + QGraphicsTextItem::mouseReleaseEvent(event); + } } void DiagramTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { - if(moving) - snapToGrid(event); - - QGraphicsTextItem::mouseMoveEvent(event); + if(editorOpened==0 && myStyleIO!=0xFFF) + { + snapToGrid(event); + QGraphicsTextItem::mouseMoveEvent(event); + updatePosition(); + } } QDomElement DiagramTextItem::toXml(QDomDocument &document) const diff --git a/Software/sie_cg/block_editor/diagramtextitem.h b/Software/sie_cg/block_editor/diagramtextitem.h old mode 100644 new mode 100755 index 03aa146..72a4449 --- a/Software/sie_cg/block_editor/diagramtextitem.h +++ b/Software/sie_cg/block_editor/diagramtextitem.h @@ -112,7 +112,7 @@ private: int myStyleIO; unsigned char myID; QGraphicsScene *myOwnerScene; - bool moving; + bool editorOpened; }; #endif diff --git a/Software/sie_cg/block_editor/divider.die b/Software/sie_cg/block_editor/divider.die new file mode 100644 index 0000000..8efd2fc --- /dev/null +++ b/Software/sie_cg/block_editor/divider.die @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/framebuffer_drawline.die b/Software/sie_cg/block_editor/framebuffer_drawline.die new file mode 100644 index 0000000..085c131 --- /dev/null +++ b/Software/sie_cg/block_editor/framebuffer_drawline.die @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/framebuffer_line.die b/Software/sie_cg/block_editor/framebuffer_line.die new file mode 100644 index 0000000..e6657cd --- /dev/null +++ b/Software/sie_cg/block_editor/framebuffer_line.die @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/framebuffer_put_int.die b/Software/sie_cg/block_editor/framebuffer_put_int.die new file mode 100644 index 0000000..851708e --- /dev/null +++ b/Software/sie_cg/block_editor/framebuffer_put_int.die @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/left_shift.die b/Software/sie_cg/block_editor/left_shift.die old mode 100644 new mode 100755 index 1493f2d..6838525 --- a/Software/sie_cg/block_editor/left_shift.die +++ b/Software/sie_cg/block_editor/left_shift.die @@ -1,18 +1,40 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + diff --git a/Software/sie_cg/block_editor/lineitem.cpp b/Software/sie_cg/block_editor/lineitem.cpp old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/lineitem.h b/Software/sie_cg/block_editor/lineitem.h old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/main.cpp b/Software/sie_cg/block_editor/main.cpp old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/mainwindow.cpp b/Software/sie_cg/block_editor/mainwindow.cpp old mode 100644 new mode 100755 index 0adf950..f83e5d4 --- a/Software/sie_cg/block_editor/mainwindow.cpp +++ b/Software/sie_cg/block_editor/mainwindow.cpp @@ -64,6 +64,9 @@ MainWindow::MainWindow() headerTextEdit = new QTextEdit; headerTextEdit->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); headerTextEdit->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); + initTextEdit = new QTextEdit; + initTextEdit->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + initTextEdit->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); blockTextEdit = new QTextEdit; blockTextEdit->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); blockTextEdit->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); @@ -72,26 +75,36 @@ MainWindow::MainWindow() extraTextEdit->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded); prototypeLabel = new QLabel; prototypeLabel->setText("\nvoid BLOCK_NAME () {"); + QFont proFont = prototypeLabel->font(); proFont.setBold(true); + prototypeLabel->setFont(proFont); + prototypeLabel->setMaximumWidth(1280); + initLabel = new QLabel; + initLabel->setText("Code For Initialization Section Here"); + proFont = initLabel->font(); proFont.setItalic(true);; + initLabel->setFont(proFont); headerLabel = new QLabel; - headerLabel->setText("Code for Header Section Here"); + headerLabel->setText("Code For Header Section Here"); + headerLabel->setFont(proFont); extraLabel = new QLabel; - extraLabel->setText("}\n\nCode for Extra Section Here"); + extraLabel->setText("}\n\nCode For Extra Section Here"); + extraLabel->setFont(proFont); /* Create central widget */ QGridLayout *layout = new QGridLayout; - layout->addWidget(toolBox,0,0,7,1); + layout->addWidget(toolBox,0,0,9,1); view = new QGraphicsView(scene); layout->addWidget(view,0,1,1,1); layout->addWidget(headerLabel,1,1,1,1); layout->addWidget(headerTextEdit,2,1,1,1); - layout->addWidget(prototypeLabel,3,1,1,1); - layout->addWidget(blockTextEdit,4,1,1,1); - layout->addWidget(extraLabel,5,1,1,1); - layout->addWidget(extraTextEdit,6,1,1,1); + layout->addWidget(initLabel,3,1,1,1); + layout->addWidget(initTextEdit,4,1,1,1); + layout->addWidget(prototypeLabel,5,1,1,1); + layout->addWidget(blockTextEdit,6,1,1,1); + layout->addWidget(extraLabel,7,1,1,1); + layout->addWidget(extraTextEdit,8,1,1,1); QWidget *widget = new QWidget; widget->setLayout(layout); - setCentralWidget(widget); setWindowTitle(tr("SIE Code Generator (Block Editor)")); setUnifiedTitleAndToolBarOnMac(true); @@ -110,6 +123,9 @@ void MainWindow::deleteItem() if (item->type() == Arrow::Type) { qgraphicsitem_cast(item)->removeLines(); scene->removeItem(item); + if(qgraphicsitem_cast(item)==scene->myPolygonPath) + scene->myPolygonPath=0; + delete(item); } //If line is deleted then is romoved from the arrow owner @@ -376,6 +392,10 @@ bool MainWindow::newDiagram(QString filePath) { saveIfNeeded(); scene->cleanScene(); + this->headerTextEdit->clear(); + this->initTextEdit->clear(); + this->blockTextEdit->clear(); + this->extraTextEdit->clear(); prototypeLabel->setText("\nvoid BLOCK_NAME () {"); myFilePath=""; diff --git a/Software/sie_cg/block_editor/mainwindow.h b/Software/sie_cg/block_editor/mainwindow.h old mode 100644 new mode 100755 index 08c9967..5476055 --- a/Software/sie_cg/block_editor/mainwindow.h +++ b/Software/sie_cg/block_editor/mainwindow.h @@ -85,6 +85,15 @@ public: QStatusBar *statusBar; + QLabel * headerLabel; + QTextEdit * headerTextEdit; + QLabel * initLabel; + QTextEdit * initTextEdit; + QLabel * prototypeLabel; + QTextEdit * blockTextEdit; + QLabel * extraLabel; + QTextEdit * extraTextEdit; + private slots: void deleteItem(); void sceneScaleChanged(const QString &scale); @@ -131,14 +140,6 @@ private: QButtonGroup *buttonGroup; - QLabel * headerLabel; - QTextEdit * headerTextEdit; - QLabel * prototypeLabel; - QTextEdit * blockTextEdit; - QLabel * extraLabel; - QTextEdit * extraTextEdit; - - int selectedButton; QString myFilePath; diff --git a/Software/sie_cg/block_editor/multiplier_int.die b/Software/sie_cg/block_editor/multiplier_int.die new file mode 100644 index 0000000..dbb4336 --- /dev/null +++ b/Software/sie_cg/block_editor/multiplier_int.die @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/plus.die b/Software/sie_cg/block_editor/plus.die new file mode 100644 index 0000000..ce57689 --- /dev/null +++ b/Software/sie_cg/block_editor/plus.die @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/printf_int.die b/Software/sie_cg/block_editor/printf_int.die new file mode 100755 index 0000000..a406692 --- /dev/null +++ b/Software/sie_cg/block_editor/printf_int.die @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/pwm_single.die b/Software/sie_cg/block_editor/pwm_single.die old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/right_shift.die b/Software/sie_cg/block_editor/right_shift.die old mode 100644 new mode 100755 index e7a0a7a..3328ef6 --- a/Software/sie_cg/block_editor/right_shift.die +++ b/Software/sie_cg/block_editor/right_shift.die @@ -1,18 +1,39 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + - - + > value_11;]]> diff --git a/Software/sie_cg/block_editor/test_block1.die b/Software/sie_cg/block_editor/test_block1.die old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/test_block2.die b/Software/sie_cg/block_editor/test_block2.die old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/test_block3.die b/Software/sie_cg/block_editor/test_block3.die old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/test_block4.die b/Software/sie_cg/block_editor/test_block4.die old mode 100644 new mode 100755 index 2993401..81bc41c --- a/Software/sie_cg/block_editor/test_block4.die +++ b/Software/sie_cg/block_editor/test_block4.die @@ -1,29 +1,38 @@ - + - - - - - - - - - + + + + + + - - - - - - - - + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/block_editor/timer.die b/Software/sie_cg/block_editor/timer.die old mode 100644 new mode 100755 diff --git a/Software/sie_cg/block_editor/while.die b/Software/sie_cg/block_editor/while.die old mode 100644 new mode 100755 index ab4ada0..fda6387 --- a/Software/sie_cg/block_editor/while.die +++ b/Software/sie_cg/block_editor/while.die @@ -1,29 +1,35 @@ - - - - - - - - - - + + + + + - - - - - - - + + + + + + + + + + + + + + - - - - + + + diff --git a/Software/sie_cg/callapp.cpp b/Software/sie_cg/callapp.cpp new file mode 100755 index 0000000..ac4fc67 --- /dev/null +++ b/Software/sie_cg/callapp.cpp @@ -0,0 +1,45 @@ +#include "callapp.h" + +callApp::callApp(QString command, QWidget *parent) : + QWidget(parent) +{ + myProcess = new QProcess; + myProcess->start(command); + connect(myProcess,SIGNAL(finished(int)),this,SIGNAL(appClosed())); + connect(myProcess,SIGNAL(readyReadStandardError()),this,SLOT(newStderr())); + connect(myProcess,SIGNAL(readyReadStandardOutput()),this,SLOT(newStdout())); +} + +bool callApp::isRuning() +{ + if(myProcess->state()==QProcess::Running) + return 1; + else + return 0; +} + +void callApp::newStderr() +{ + myProcess->setReadChannel(QProcess::StandardError); + data = myProcess->readAll(); + emit newData(); +} + +void callApp::newStdout() +{ + myProcess->setReadChannel(QProcess::StandardOutput); + data = myProcess->readAll(); + emit newData(); +} + +void callApp::deleteProcess() +{ + myProcess->terminate(); + myProcess->deleteLater(); +} + +void callApp::writeData(QString outData) +{ + if(isRuning()) + myProcess->write(outData.toAscii().data()); +} diff --git a/Software/sie_cg/callapp.h b/Software/sie_cg/callapp.h new file mode 100755 index 0000000..32993f2 --- /dev/null +++ b/Software/sie_cg/callapp.h @@ -0,0 +1,31 @@ +#ifndef CALLAPP_H +#define CALLAPP_H + +#include +#include + +class callApp : public QWidget +{ +Q_OBJECT +public: + explicit callApp(QString,QWidget *parent = 0); + QString readData() + { return data;} + bool isRuning(); + void writeData(QString); + +signals: + void newData(); + void appClosed(); + +public slots: + void newStderr(); + void newStdout(); + void deleteProcess(); + +private: + QProcess * myProcess; + QString data; +}; + +#endif // CALLAPP_H diff --git a/Software/sie_cg/codedialog.cpp b/Software/sie_cg/codedialog.cpp old mode 100644 new mode 100755 diff --git a/Software/sie_cg/codedialog.h b/Software/sie_cg/codedialog.h old mode 100644 new mode 100755 diff --git a/Software/sie_cg/codedialog.ui b/Software/sie_cg/codedialog.ui old mode 100644 new mode 100755 index db9309b..152b828 --- a/Software/sie_cg/codedialog.ui +++ b/Software/sie_cg/codedialog.ui @@ -6,27 +6,2796 @@ 0 0 - 640 - 480 + 803 + 473 MainWindow - - - - - &Ok - - + + + + + + + + Courier 10 Pitch + + + + QTabWidget::South + + + 0 + + + + Main code template + + + + + + + 16777215 + 16777215 + + + + + + + + + 255 + 255 + 255 + + + + + + + 80 + 80 + 80 + + + + + + + 120 + 120 + 120 + + + + + + + 100 + 100 + 100 + + + + + + + 40 + 40 + 40 + + + + + + + 53 + 53 + 53 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 80 + 80 + 80 + + + + + + + 0 + 0 + 0 + + + + + + + 40 + 40 + 40 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 80 + 80 + 80 + + + + + + + 120 + 120 + 120 + + + + + + + 100 + 100 + 100 + + + + + + + 40 + 40 + 40 + + + + + + + 53 + 53 + 53 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 80 + 80 + 80 + + + + + + + 0 + 0 + 0 + + + + + + + 40 + 40 + 40 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 40 + 40 + 40 + + + + + + + 80 + 80 + 80 + + + + + + + 120 + 120 + 120 + + + + + + + 100 + 100 + 100 + + + + + + + 40 + 40 + 40 + + + + + + + 53 + 53 + 53 + + + + + + + 40 + 40 + 40 + + + + + + + 255 + 255 + 255 + + + + + + + 40 + 40 + 40 + + + + + + + 80 + 80 + 80 + + + + + + + 80 + 80 + 80 + + + + + + + 0 + 0 + 0 + + + + + + + 80 + 80 + 80 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + Qt::ScrollBarAsNeeded + + + + + + + + Makefile template + + + + + + + 16777215 + 320 + + + + + + + + + 255 + 255 + 255 + + + + + + + 80 + 80 + 80 + + + + + + + 120 + 120 + 120 + + + + + + + 100 + 100 + 100 + + + + + + + 40 + 40 + 40 + + + + + + + 53 + 53 + 53 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 80 + 80 + 80 + + + + + + + 0 + 0 + 0 + + + + + + + 40 + 40 + 40 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 80 + 80 + 80 + + + + + + + 120 + 120 + 120 + + + + + + + 100 + 100 + 100 + + + + + + + 40 + 40 + 40 + + + + + + + 53 + 53 + 53 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 80 + 80 + 80 + + + + + + + 0 + 0 + 0 + + + + + + + 40 + 40 + 40 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 40 + 40 + 40 + + + + + + + 80 + 80 + 80 + + + + + + + 120 + 120 + 120 + + + + + + + 100 + 100 + 100 + + + + + + + 40 + 40 + 40 + + + + + + + 53 + 53 + 53 + + + + + + + 40 + 40 + 40 + + + + + + + 255 + 255 + 255 + + + + + + + 40 + 40 + 40 + + + + + + + 80 + 80 + 80 + + + + + + + 80 + 80 + 80 + + + + + + + 0 + 0 + 0 + + + + + + + 80 + 80 + 80 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + Courier New + + + + Qt::ScrollBarAsNeeded + + + + + + + + + + + + + C&lose + + + + + + + Update code from diagram... + + + &Update + + + + + + + Save current code to a file... + + + &Save files ... + + + + + + + Compile current code,,, + + + &Compile + + + + + + + Connect to SIE using SSH + + + Init SS&H on SIE + + + + + + + false + + + Execute binary on SIE + + + &Excecute on SIE + + + + + + + false + + + Configure FPGA with predeterminated peripherals... + + + Configure &FPGA + + + + + + - - - - Qt::ScrollBarAsNeeded + + + + true + + + 16777215 + 260 + + + + + Courier 10 Pitch + + + + Qt::LeftToRight + + + QTabWidget::South + + + QTabWidget::Rounded + + + 2 + + + + Log + + + + + + + 16777215 + 200 + + + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + Qt::ScrollBarAsNeeded + + + + + + + + Compile output + + + + + + + 16777215 + 200 + + + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + Qt::ScrollBarAsNeeded + + + + + + + + SSH output + + + + + + + 16777215 + 200 + + + + + + + + + 255 + 255 + 255 + + + + + + + 4 + 3 + 3 + + + + + + + 6 + 4 + 4 + + + + + + + 5 + 3 + 3 + + + + + + + 2 + 1 + 1 + + + + + + + 2 + 2 + 2 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 4 + 3 + 3 + + + + + + + 0 + 0 + 0 + + + + + + + 2 + 1 + 1 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 4 + 3 + 3 + + + + + + + 6 + 4 + 4 + + + + + + + 5 + 3 + 3 + + + + + + + 2 + 1 + 1 + + + + + + + 2 + 2 + 2 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 4 + 3 + 3 + + + + + + + 0 + 0 + 0 + + + + + + + 2 + 1 + 1 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 2 + 1 + 1 + + + + + + + 4 + 3 + 3 + + + + + + + 6 + 4 + 4 + + + + + + + 5 + 3 + 3 + + + + + + + 2 + 1 + 1 + + + + + + + 2 + 2 + 2 + + + + + + + 2 + 1 + 1 + + + + + + + 255 + 255 + 255 + + + + + + + 2 + 1 + 1 + + + + + + + 4 + 3 + 3 + + + + + + + 4 + 3 + 3 + + + + + + + 0 + 0 + 0 + + + + + + + 4 + 3 + 3 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + Courier New + + + + false + + + Qt::ScrollBarAsNeeded + + + + + + + + + false + + + + + + + + 255 + 255 + 255 + + + + + + + 4 + 3 + 3 + + + + + + + 6 + 4 + 4 + + + + + + + 5 + 3 + 3 + + + + + + + 2 + 1 + 1 + + + + + + + 2 + 2 + 2 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 4 + 3 + 3 + + + + + + + 0 + 0 + 0 + + + + + + + 2 + 1 + 1 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 255 + 255 + 255 + + + + + + + 4 + 3 + 3 + + + + + + + 6 + 4 + 4 + + + + + + + 5 + 3 + 3 + + + + + + + 2 + 1 + 1 + + + + + + + 2 + 2 + 2 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 4 + 3 + 3 + + + + + + + 0 + 0 + 0 + + + + + + + 2 + 1 + 1 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + + 2 + 1 + 1 + + + + + + + 4 + 3 + 3 + + + + + + + 6 + 4 + 4 + + + + + + + 5 + 3 + 3 + + + + + + + 2 + 1 + 1 + + + + + + + 2 + 2 + 2 + + + + + + + 2 + 1 + 1 + + + + + + + 255 + 255 + 255 + + + + + + + 2 + 1 + 1 + + + + + + + 4 + 3 + 3 + + + + + + + 4 + 3 + 3 + + + + + + + 0 + 0 + 0 + + + + + + + 4 + 3 + 3 + + + + + + + 255 + 255 + 220 + + + + + + + 0 + 0 + 0 + + + + + + + + false + + + + + + + false + + + Sen&d to SIE + + + + + + + false + + + Send &Kill + + + + + + + false + + + Send LCD &On + + + + + + + false + + + Send LC&D Off + + + + + + + diff --git a/Software/sie_cg/diagramitem.cpp b/Software/sie_cg/diagramitem.cpp old mode 100644 new mode 100755 index 7e96bdb..1ddc126 --- a/Software/sie_cg/diagramitem.cpp +++ b/Software/sie_cg/diagramitem.cpp @@ -42,6 +42,7 @@ #include #include "diagramitem.h" +#include "diagramscene.h" #include "arrow.h" #include "diagramtextitem.h" #include "lineitem.h" @@ -109,9 +110,10 @@ DiagramItem::DiagramItem( QString itemString=textItemE.attribute("text"); DiagramTextItem * newTextItem = - new DiagramTextItem(0,0,editableItem,this,myStyleIO, + new DiagramTextItem(0,myOwnerScene,editableItem,this,myStyleIO, myID,itemString,posOffset); myOwnerScene->addItem(newTextItem); + newTextItem->setZValue(zValue()); addText(newTextItem); } @@ -121,7 +123,9 @@ DiagramItem::DiagramItem( setPolygon(myPolygon); setFlag(QGraphicsItem::ItemIsMovable, true); - setFlag(QGraphicsItem::ItemIsSelectable, true); + setFlag(QGraphicsItem::ItemIsSelectable, true); + setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); + setFlag(QGraphicsItem::ItemSendsScenePositionChanges, true); } bool DiagramItem::setValue(unsigned char ID, QString value) @@ -158,6 +162,16 @@ bool DiagramItem::textIsIO(unsigned char ID) return 0; } +bool DiagramItem::existText(DiagramTextItem * text) +{ + foreach(DiagramTextItem *item, textItems) + { + if(item==text) + return 1; + } + return 0; +} + unsigned char DiagramItem::existArrow(DiagramTextItem *startItem, DiagramTextItem *endItem) { @@ -244,19 +258,28 @@ QVariant DiagramItem::itemChange(GraphicsItemChange change, const QVariant &value) { if (change == QGraphicsItem::ItemPositionChange) { - foreach (Arrow *arrow, arrows) { - arrow->updatePosition(); - } - + positionChanged=1; } return value; } -void DiagramItem::mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent) +void DiagramItem::updateTexts() { foreach (DiagramTextItem *texts, textItems) { texts->updatePosition(); } +} + +void DiagramItem::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) +{ + positionChanged=0; + qobject_cast(myOwnerScene)->saveUndo(); + QGraphicsPolygonItem::mousePressEvent(mouseEvent); +} + +void DiagramItem::mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent) +{ + updateTexts(); foreach (Arrow *arrow, arrows) { arrow->updatePosition(); } @@ -271,6 +294,12 @@ void DiagramItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) foreach (Arrow *arrow, arrows) { arrow->updatePosition(); } + + if(!positionChanged) + qobject_cast(myOwnerScene)->removeLastUndo(); + else + qobject_cast(myOwnerScene)->clearRedo(); + QGraphicsPolygonItem::mouseReleaseEvent(mouseEvent); } diff --git a/Software/sie_cg/diagramitem.h b/Software/sie_cg/diagramitem.h old mode 100644 new mode 100755 index bf67f49..c3855af --- a/Software/sie_cg/diagramitem.h +++ b/Software/sie_cg/diagramitem.h @@ -48,6 +48,9 @@ #include #include +class Arrow; +class DiagramTextItem; + QT_BEGIN_NAMESPACE class QPixmap; class QGraphicsItem; @@ -64,9 +67,6 @@ QT_END_NAMESPACE class QObject; -class Arrow; -class DiagramTextItem; - class DiagramItem : public QGraphicsPolygonItem { public: @@ -105,11 +105,13 @@ public: QList getTextItems() const { return textItems;} + QList getArrows() const + { return arrows;} + unsigned char existArrow(DiagramTextItem *startItem, DiagramTextItem *endItem); - void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) - {QGraphicsPolygonItem::mousePressEvent(mouseEvent);} + void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent); void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent); void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent); @@ -122,20 +124,35 @@ public: void setColor(const QColor &color) { myColor=color; setBrush(color); } + int getID() + { return myID;} + + void setID(int value) + { myID=value;} + + bool existText(DiagramTextItem * text); + + QGraphicsScene * getOwnerScene() + { return myOwnerScene;} + + void updateTexts(); + protected: void contextMenuEvent(QGraphicsSceneContextMenuEvent *event); QVariant itemChange(GraphicsItemChange change, const QVariant &value); private: + QGraphicsScene *myOwnerScene; QString myDiagramType; + int myID; QPolygonF myPolygon; QMenu *myContextMenu; QList arrows; - QList textItems; - QGraphicsScene *myOwnerScene; + QList textItems; DiagramTextItem *textItem; QColor myColor; QDomElement *myDomElement; + bool positionChanged; }; #endif diff --git a/Software/sie_cg/diagramscene.cpp b/Software/sie_cg/diagramscene.cpp old mode 100644 new mode 100755 index 112eead..bb8ed83 --- a/Software/sie_cg/diagramscene.cpp +++ b/Software/sie_cg/diagramscene.cpp @@ -58,51 +58,84 @@ DiagramScene::DiagramScene(QMenu *itemMenu, MainWindow *ownerWindow, myLineColor = Qt::black; snapToGrid=1; myGrid=10; - drawGrid=1; + drawGrid=0; myOwnerWindow=ownerWindow; } void DiagramScene::setLineColor(const QColor &color) { myLineColor = color; - if (isItemChange(Arrow::Type)) { - Arrow *item = - qgraphicsitem_cast(selectedItems().first()); - item->setColor(myLineColor); - update(); + + //Lists of items + QList Arrows; + QList lineItems; + foreach(QGraphicsItem *item, selectedItems()){ + if(item->type() == lineItem::Type) + lineItems.append(qgraphicsitem_cast(item)); + else if(item->type() == Arrow::Type) + Arrows.append(qgraphicsitem_cast(item)); } + + foreach(Arrow *arrow, Arrows){ + saveUndoState(); + arrow->setColor(myLineColor); + } + + foreach(lineItem *line, lineItems){ + saveUndoState(); + line->myOwner()->setColor(myLineColor); + } + + update(); } void DiagramScene::setTextColor(const QColor &color) { myTextColor = color; - if (isItemChange(DiagramTextItem::Type)) { - DiagramTextItem *item = - qgraphicsitem_cast(selectedItems().first()); - item->setDefaultTextColor(myTextColor); + //Lists of items + QList textItems; + foreach(QGraphicsItem *item, selectedItems()){ + if(item->type() == DiagramTextItem::Type) + textItems.append(qgraphicsitem_cast(item)); } + + foreach(DiagramTextItem *textItem, textItems){ + if(textItem->ownerItem()==0) + { + saveUndoState(); + textItem->setDefaultTextColor(myTextColor); + } + } + + update(); } void DiagramScene::setItemColor(const QColor &color) { myItemColor = color; - if (isItemChange(DiagramItem::Type)) { - DiagramItem *item = - qgraphicsitem_cast(selectedItems().first()); + //Lists of items + QList items; + foreach(QGraphicsItem *item, selectedItems()){ + if(item->type() == DiagramItem::Type) + items.append(qgraphicsitem_cast(item)); + } + + foreach(DiagramItem *item, items){ + saveUndoState(); item->setColor(myItemColor); } + } -void DiagramScene::setFont(const QFont &font) +void DiagramScene::setFont(QFont font) { myFont = font; if (isItemChange(DiagramTextItem::Type)) { - QGraphicsTextItem *item = + saveUndoState(); + DiagramTextItem *item = qgraphicsitem_cast(selectedItems().first()); - //At this point the selection can change so the first selected item might not be a DiagramTextItem - if (item) - item->setFont(myFont); + item->setFontt(myFont); } } @@ -116,16 +149,29 @@ void DiagramScene::setItemType(QString type) myItemType = type; } -void DiagramScene::editorLostFocus(DiagramTextItem *item) +void DiagramScene::saveUndoState() { - QTextCursor cursor = item->textCursor(); - cursor.clearSelection(); - item->setTextCursor(cursor); + saveUndo(); + clearRedo(); + fflush(stdout); +} +void DiagramScene::saveUndo() +{ + myOwnerWindow->undoList.append(toXmlFormat()); + fflush(stdout); +} - if (item->toPlainText().isEmpty()) { - removeItem(item); - item->deleteLater(); - } +void DiagramScene::removeLastUndo() +{ + if(!myOwnerWindow->undoList.isEmpty()) + myOwnerWindow->undoList.removeLast(); + fflush(stdout); +} + +void DiagramScene::clearRedo() +{ + myOwnerWindow->redoList.clear(); + fflush(stdout); } void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) @@ -135,36 +181,55 @@ void DiagramScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) if (mouseEvent->button() != Qt::LeftButton) return; + foreach (QGraphicsItem *item, this->items(mouseEvent->scenePos())) { + if (item->type() == DiagramTextItem::Type) + { + myOwnerWindow->setFontSettings(qgraphicsitem_cast + (item)->font()); + } + } + DiagramItem *item; + int addResult=0; + switch (myMode) { case InsertItem: + saveUndoState(); item = new DiagramItem(myItemMenu,myItemType, - domElementsByName.value(myItemType),0,this); - item->setColor(myItemColor); - addItem(item); - item->setPos(mouseEvent->scenePos()); + domElementsByName->value(myItemType),0,this); + addResult=addDiagramItem(item); + if(addResult!=-1) + { + item->setColor(myItemColor); + item->setPos(mouseEvent->scenePos()); + item->setID(addResult); + item->updateTexts(); + addItem(item); + } + else + { + delete(item); + QMessageBox::warning(0,"Full","The diagram can only have " + "5000 blocks. You are crasy?"); + } emit itemInserted(item); break; case InsertLine: line = new QGraphicsLineItem(QLineF(mouseEvent->scenePos(), mouseEvent->scenePos())); line->setPen(QPen(myLineColor, 2)); - line->setZValue(1000.0); - addItem(line); + line->setZValue(1000.0); snapToGrid=0; + addItem(line); break; - case InsertText: - textItem = new DiagramTextItem(); - textItem->setFont(myFont); - textItem->setTextInteractionFlags(Qt::TextEditorInteraction); - textItem->setZValue(1000.0); - connect(textItem, SIGNAL(lostFocus(DiagramTextItem*)), - this, SLOT(editorLostFocus(DiagramTextItem*))); - connect(textItem, SIGNAL(selectedChange(QGraphicsItem*)), - this, SIGNAL(itemSelected(QGraphicsItem*))); - addItem(textItem); + case InsertText: + saveUndoState(); + textItem = new DiagramTextItem(0,this); + textItem->setFontt(myFont); + textItem->setZValue(1000.0); textItem->setDefaultTextColor(myTextColor); textItem->setPos(mouseEvent->scenePos()); + addItem(textItem); emit textInserted(textItem); default: ; @@ -191,6 +256,18 @@ void DiagramScene::mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent) } else if (myMode == MoveItem) { QGraphicsScene::mouseMoveEvent(mouseEvent); } + QPointF mousePos = mouseEvent->scenePos(); + QString barMesg= QString("X[%1] Y[%2]").arg(QString::number(mousePos.x())) + .arg(QString::number(mousePos.y())); + + foreach (QGraphicsItem *item, items(mousePos)) { + if (item->type() == DiagramItem::Type) { + barMesg+= tr(" ** Over diagram block with ID[") + + QString::number(qgraphicsitem_cast + (item)->getID()) + tr("]"); + } + } + myOwnerWindow->statusBar->showMessage(barMesg); } void DiagramScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent) @@ -223,7 +300,7 @@ void DiagramScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) DiagramTextItem *endItem_ = qgraphicsitem_cast(endItems.first()); - //Real first and end item + //Real first and real end item DiagramTextItem *startItem = startItem_; DiagramTextItem *endItem = endItem_; if(startItem_->styleIO()>>7) @@ -232,7 +309,7 @@ void DiagramScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) endItem = startItem_; } - //Inputs to outputs and diferent owner diagram item + //Inputs to outputs and diferent owner if(startItem->styleIO()>0 && endItem->styleIO()>0 && (startItem->styleIO()>>7 != endItem->styleIO()>>7) && @@ -240,6 +317,7 @@ void DiagramScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) !endItem->ownerItem()->existArrow(startItem,endItem) ) { + saveUndoState(); Arrow *arrow = new Arrow(startItem, endItem,0,this); arrow->setColor(myLineColor); startItem->ownerItem()->addArrow(arrow); @@ -264,6 +342,25 @@ bool DiagramScene::isItemChange(int type) return false; } +int DiagramScene::addDiagramItem(DiagramItem * item) +{ + for(int i=0; i<5000; i++) + { + QHash::iterator iter= DiagramsID.find(i); + if(iter==DiagramsID.end()) + { + DiagramsID.insert(i,item); + return i; + } + } + return -1; +} + +void DiagramScene::removeDiagramItem(DiagramItem * item) +{ + DiagramsID.remove(DiagramsID.key(item)); +} + QDomDocument DiagramScene::toXmlFormat() { QDomDocument document; @@ -280,15 +377,21 @@ QDomDocument DiagramScene::toXmlFormat() //Lists of items QList Items; QList Arrows; + QList TextItems; foreach(QGraphicsItem *item, items()) { if(item->type() == DiagramItem::Type) Items.append(qgraphicsitem_cast(item)); else if(item->type() == Arrow::Type) Arrows.append(qgraphicsitem_cast(item)); + else if(item->type() == DiagramTextItem::Type) + if(qgraphicsitem_cast(item)->ownerItem() == 0) + TextItems.append(qgraphicsitem_cast(item)); } //Create the XML structure QDomElement element; + + //Save libraries if(!libraryList.isEmpty()) { QDomElement libraries = document.createElement("Libraries"); @@ -301,35 +404,67 @@ QDomDocument DiagramScene::toXmlFormat() diagram.appendChild(libraries); } + + //Save options + QDomElement options = document.createElement("Options"); + options.setAttribute("templateDir", myOwnerWindow->templateDir); + options.setAttribute("templateFile", myOwnerWindow->templateFile); + options.setAttribute("makeFile", myOwnerWindow->makeFile); + options.setAttribute("workDir", myOwnerWindow->workDir); + options.setAttribute("executableFile", myOwnerWindow->executableFile); + options.setAttribute("mipsToolChainDir", myOwnerWindow->mipsToolChainDir); + options.setAttribute("mipsToolChain", myOwnerWindow->mipsToolChain); + options.setAttribute("sieWorkDir", myOwnerWindow->sieWorkDir); + options.setAttribute("fpgaFile", myOwnerWindow->fpgaFile); + options.setAttribute("sieIP", myOwnerWindow->sieIP); + options.setAttribute("configApp", myOwnerWindow->configApp); + diagram.appendChild(options); + + //Save items if(!Items.isEmpty()) { QDomElement diagramItems = document.createElement("DiagramItems"); foreach(DiagramItem *item, Items) { element = item->toXml(document); - element.setAttribute("ID",Items.indexOf(item)); //save index + element.setAttribute("ID",item->getID()); //save index diagramItems.appendChild(element); } diagram.appendChild(diagramItems); } + + //Save arrows if(!Arrows.isEmpty()) { QDomElement arrowItems = document.createElement("Arrows"); foreach(Arrow *item, Arrows) { - element = item->toXml(document,Items); + element = item->toXml(document,DiagramsID); element.setAttribute("ID",Arrows.indexOf(item)); //save index arrowItems.appendChild(element); } diagram.appendChild(arrowItems); } + + //Save text items + if(!TextItems.isEmpty()) + { + QDomElement textItems = document.createElement("TextItems"); + foreach(DiagramTextItem *item, TextItems) + { + element = item->toXml(document); + textItems.appendChild(element); + } + diagram.appendChild(textItems); + } + return(document); } int DiagramScene::fromXmlFormat(QDomDocument document) { - //Read diagrams TODO: in future... add multi projects functionality DiagramsID.clear(); + //Read diagrams TODO: in future... add multi projects functionality QDomNodeList diagrams = document.elementsByTagName("Diagram"); if(!diagrams.at(0).isElement()) return 0; @@ -344,7 +479,21 @@ int DiagramScene::fromXmlFormat(QDomDocument document) node = node.nextSibling()) { QDomElement element = node.toElement(); - if(element.tagName()=="Libraries") + if(element.tagName()=="Options") + { + myOwnerWindow->templateDir= element.attribute("templateDir"); + myOwnerWindow->templateFile= element.attribute("templateFile"); + myOwnerWindow->makeFile= element.attribute("makeFile"); + myOwnerWindow->workDir= element.attribute("workDir"); + myOwnerWindow->executableFile= element.attribute("executableFile"); + myOwnerWindow->mipsToolChainDir= element.attribute("mipsToolChainDir"); + myOwnerWindow->mipsToolChain= element.attribute("mipsToolChain"); + myOwnerWindow->sieWorkDir= element.attribute("sieWorkDir"); + myOwnerWindow->fpgaFile= element.attribute("fpgaFile"); + myOwnerWindow->sieIP= element.attribute("sieIP"); + myOwnerWindow->configApp= element.attribute("configApp"); + } + else if(element.tagName()=="Libraries") { libraryList.clear(); for (QDomNode node = element.firstChild() ; @@ -373,7 +522,7 @@ int DiagramScene::fromXmlFormat(QDomDocument document) QPointF position = QPointF(diagramItem.attribute("x").toFloat(), diagramItem.attribute("y").toFloat()); //PREVENT Segmentation faults: - if(!domElementsByName.contains( + if(!domElementsByName->contains( diagramItem.attribute("type"))) { QMessageBox::critical(0,"Error",QObject::tr( @@ -387,14 +536,15 @@ int DiagramScene::fromXmlFormat(QDomDocument document) DiagramItem *newItem=new DiagramItem( myItemMenu, diagramItem.attribute("type"), - domElementsByName.value(diagramItem.attribute("type")), + domElementsByName->value(diagramItem.attribute("type")), 0,this, position, diagramItem.attribute("z").toDouble()); newItem->setColor(QColor(diagramItem.attribute("color"))); + int itemID=diagramItem.attribute("ID").toInt(); + newItem->setID(itemID); - addItem(newItem); - DiagramsID.insert(diagramItem.attribute("ID").toInt(),newItem); + addItem(newItem); for (QDomNode node = diagramItem.firstChild() ; !node.isNull() ; node = node.nextSibling()) @@ -413,8 +563,21 @@ int DiagramScene::fromXmlFormat(QDomDocument document) return 0; newItem->setValue(diagramValue.attribute("ID").toInt(), diagramValue.attribute("value")); - } + } } + newItem->updateTexts(); + if(DiagramsID.find(itemID)!=DiagramsID.end()) + { + int result=addDiagramItem(newItem); + QMessageBox::warning(0,"ID Problems", + tr("Block with ID[")+QString::number(itemID)+ + tr("] already exists, this will be reasigned to [")+ + QString::number(result)+ + tr("] for prevent problems.")); + newItem->setID(result); + } + else + DiagramsID.insert(itemID,newItem); } } else if(element.tagName()=="Arrows") @@ -496,6 +659,35 @@ int DiagramScene::fromXmlFormat(QDomDocument document) } } } + else if(element.tagName()=="TextItems") + { + for (QDomNode node = element.firstChild() ; + !node.isNull() ; + node = node.nextSibling()) + { + //Load library directory + QDomElement textItem = node.toElement(); + if(textItem.tagName()!="TextItem") + return 0; + + QFont textFont; + textFont.setFamily(textItem.attribute("Family")); + textFont.setPointSize(textItem.attribute("PointSize").toInt()); + textFont.setBold(textItem.attribute("Bold").toInt()); + textFont.setItalic(textItem.attribute("Italic").toInt()); + textFont.setUnderline(textItem.attribute("Underline").toInt()); + + DiagramTextItem *newText = new DiagramTextItem(0,this); + newText->setFontt(textFont); + newText->setDefaultTextColor( + QColor(textItem.attribute("Color"))); + newText->setPos(QPointF( + textItem.attribute("x").toFloat(), + textItem.attribute("y").toFloat())); + newText->setPlainText(textItem.attribute("Text")); + addItem(newText); + } + } } return 1; @@ -530,10 +722,14 @@ void DiagramScene::cleanScene() removeItem(item); delete(item); } + this->clear(); + DiagramsID.clear(); } void DiagramScene::drawBackground(QPainter *p, const QRectF &r) { + //TODO: add a button for activate/deactivate the grid. + QGraphicsScene::drawBackground(p,r); if(drawGrid) { diff --git a/Software/sie_cg/diagramscene.h b/Software/sie_cg/diagramscene.h old mode 100644 new mode 100755 index 4453c00..c753183 --- a/Software/sie_cg/diagramscene.h +++ b/Software/sie_cg/diagramscene.h @@ -49,6 +49,9 @@ #include "diagramtextitem.h" #include "mainwindow.h" +class MainWindow; +class DiagramTextItem; + QT_BEGIN_NAMESPACE class QGraphicsSceneMouseEvent; class QMenu; @@ -58,7 +61,6 @@ class QFont; class QGraphicsTextItem; class QColor; QT_END_NAMESPACE -class MainWindow; class DiagramScene : public QGraphicsScene { @@ -81,7 +83,7 @@ public: void setLineColor(const QColor &color); void setTextColor(const QColor &color); void setItemColor(const QColor &color); - void setFont(const QFont &font); + void setFont(QFont font); void setDawGrid(bool value) {drawGrid=value;} QDomDocument toXmlFormat(); @@ -95,17 +97,25 @@ public: void setLibList(QStringList list) {libraryList=list;} - void setDomElementsByName(QHash hash) + void setDomElementsByName(QHash *hash) {domElementsByName=hash;} void setButtonIdByName(QHash hash) {buttonIdByName=hash;} + int addDiagramItem(DiagramItem * item); + void removeDiagramItem(DiagramItem * item); + + MainWindow *myOwnerWindow; + + void saveUndoState(); + void saveUndo(); + void removeLastUndo(); + void clearRedo(); public slots: void setMode(Mode mode); void setItemType(QString type); - void editorLostFocus(DiagramTextItem *item); signals: void itemInserted(DiagramItem *item); @@ -137,10 +147,9 @@ private: bool drawGrid; short int myGrid; QStringList libraryList; - QHash domElementsByName; + QHash *domElementsByName; QHash buttonIdByName; - QHash DiagramsID; - MainWindow *myOwnerWindow; + QHash DiagramsID; }; #endif diff --git a/Software/sie_cg/diagramscene.pro b/Software/sie_cg/diagramscene.pro old mode 100644 new mode 100755 index ad392fd..3ab0f14 --- a/Software/sie_cg/diagramscene.pro +++ b/Software/sie_cg/diagramscene.pro @@ -6,7 +6,9 @@ HEADERS = mainwindow.h \ lineitem.h \ codedialog.h \ codedialog.h \ - codedialog.h + codedialog.h \ + optionsdialog.h \ + callapp.h SOURCES = mainwindow.cpp \ diagramitem.cpp \ main.cpp \ @@ -14,7 +16,9 @@ SOURCES = mainwindow.cpp \ diagramtextitem.cpp \ diagramscene.cpp \ lineitem.cpp \ - codedialog.cpp + codedialog.cpp \ + optionsdialog.cpp \ + callapp.cpp RESOURCES = diagramscene.qrc TARGET = diagrameditor @@ -34,4 +38,6 @@ QT += xml \ svg \ network FORMS += librarydialog.ui \ - codedialog.ui + codedialog.ui \ + optionsdialog.ui + diff --git a/Software/sie_cg/diagramscene.pro.user b/Software/sie_cg/diagramscene.pro.user old mode 100644 new mode 100755 index 854b225..21901c3 --- a/Software/sie_cg/diagramscene.pro.user +++ b/Software/sie_cg/diagramscene.pro.user @@ -76,7 +76,7 @@ Debug - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-i0TevybO0n,guid=8b93acbaab2ecdba6bb7d4064ce7e29f + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ANEmxjNrar,guid=b2cd0a27678afcae11dfdd2f4cf7f3f4 DEFAULTS_PATH=/usr/share/gconf/gnome.default.path DESKTOP_SESSION=gnome DISPLAY=:0.0 @@ -84,11 +84,10 @@ GDM_KEYBOARD_LAYOUT=es GDM_LANG=en_US.utf8 GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_CONTROL=/tmp/keyring-7RmeU0 + GNOME_KEYRING_CONTROL=/tmp/keyring-9rqYs9 GTK_MODULES=canberra-gtk-module HOME=/home/juan64bits LANG=en_US.utf8 - LANGUAGE= LD_LIBRARY_PATH=/usr/lib/qtcreator LOGNAME=juan64bits MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path @@ -96,17 +95,17 @@ PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PWD=/home/juan64bits QTDIR=/usr/share/qt4 - SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1244,unix/Maximus:/tmp/.ICE-unix/1244 + SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1361,unix/Maximus:/tmp/.ICE-unix/1361 SHELL=/bin/bash SPEECHD_PORT=7560 - SSH_AGENT_PID=1408 - SSH_AUTH_SOCK=/tmp/keyring-7RmeU0/ssh + SSH_AGENT_PID=1397 + SSH_AUTH_SOCK=/tmp/keyring-9rqYs9/ssh USER=juan64bits USERNAME=juan64bits - XAUTHORITY=/var/run/gdm/auth-for-juan64bits-W3dU0B/database + XAUTHORITY=/var/run/gdm/auth-for-juan64bits-GWLb48/database XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1290265246.859440-43205519 + XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1291318260.225592-1616873193 /home/juan64bits/ebd/ECB/nn-usb-fpga/Software/sie_cg/diagramscene.pro @@ -125,7 +124,7 @@ Debug - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-i0TevybO0n,guid=8b93acbaab2ecdba6bb7d4064ce7e29f + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ANEmxjNrar,guid=b2cd0a27678afcae11dfdd2f4cf7f3f4 DEFAULTS_PATH=/usr/share/gconf/gnome.default.path DESKTOP_SESSION=gnome DISPLAY=:0.0 @@ -133,11 +132,10 @@ GDM_KEYBOARD_LAYOUT=es GDM_LANG=en_US.utf8 GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_CONTROL=/tmp/keyring-7RmeU0 + GNOME_KEYRING_CONTROL=/tmp/keyring-9rqYs9 GTK_MODULES=canberra-gtk-module HOME=/home/juan64bits LANG=en_US.utf8 - LANGUAGE= LD_LIBRARY_PATH=/usr/lib/qtcreator LOGNAME=juan64bits MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path @@ -145,17 +143,17 @@ PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PWD=/home/juan64bits QTDIR=/usr/share/qt4 - SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1244,unix/Maximus:/tmp/.ICE-unix/1244 + SESSION_MANAGER=local/Maximus:@/tmp/.ICE-unix/1361,unix/Maximus:/tmp/.ICE-unix/1361 SHELL=/bin/bash SPEECHD_PORT=7560 - SSH_AGENT_PID=1408 - SSH_AUTH_SOCK=/tmp/keyring-7RmeU0/ssh + SSH_AGENT_PID=1397 + SSH_AUTH_SOCK=/tmp/keyring-9rqYs9/ssh USER=juan64bits USERNAME=juan64bits - XAUTHORITY=/var/run/gdm/auth-for-juan64bits-W3dU0B/database + XAUTHORITY=/var/run/gdm/auth-for-juan64bits-GWLb48/database XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1290265246.859440-43205519 + XDG_SESSION_COOKIE=b9a7fbc4d869fc15bd6cdd474bcc9a28-1291318260.225592-1616873193 false diff --git a/Software/sie_cg/diagramscene.qrc b/Software/sie_cg/diagramscene.qrc old mode 100644 new mode 100755 index 6850782..2e12971 --- a/Software/sie_cg/diagramscene.qrc +++ b/Software/sie_cg/diagramscene.qrc @@ -25,5 +25,8 @@ images/zoom_in.png images/zoom_out.png images/cg.png + images/grid.png + images/redo.png + images/undo.png diff --git a/Software/sie_cg/diagramtextitem.cpp b/Software/sie_cg/diagramtextitem.cpp old mode 100644 new mode 100755 index 82248ea..b8e5950 --- a/Software/sie_cg/diagramtextitem.cpp +++ b/Software/sie_cg/diagramtextitem.cpp @@ -49,7 +49,9 @@ DiagramTextItem::DiagramTextItem(QGraphicsItem *parent, QGraphicsScene *scene, unsigned char ID, QString defaultText, QPointF offset) : QGraphicsTextItem(parent, scene) { + myOwnerScene = scene; myOwnerItem = ownerItem; + //currentOwnerItem=0; myStyleIO = styleIO; myID=ID; editableItem=editable; @@ -61,16 +63,17 @@ DiagramTextItem::DiagramTextItem(QGraphicsItem *parent, QGraphicsScene *scene, setPlainText(defaultText); posOffset=offset; - if(editable) + if(editable && myOwnerItem==0) { - if (myOwnerItem==0) - setFlag(QGraphicsItem::ItemIsMovable); - setFlag(QGraphicsItem::ItemIsSelectable); + setFlag(QGraphicsItem::ItemIsMovable,true); + setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); + setFlag(QGraphicsItem::ItemSendsScenePositionChanges, true); } - else - setFlag(QGraphicsItem::ItemIsFocusable,0); - updatePosition(); + setFlag(QGraphicsItem::ItemIsSelectable,true); + onlyOneUndo=1; + editorOpened=0; + updatePosition(); } void DiagramTextItem::updatePosition() @@ -102,8 +105,8 @@ void DiagramTextItem::updatePosition() QVariant DiagramTextItem::itemChange(GraphicsItemChange change, const QVariant &value) { - if (change == QGraphicsItem::ItemSelectedHasChanged) - emit selectedChange(this); + if (change == QGraphicsItem::ItemPositionChange) + positionChanged=1; return value; } @@ -114,49 +117,110 @@ void DiagramTextItem::focusOutEvent(QFocusEvent *event) { if(toPlainText()=="") setPlainText("?"); if(myOwnerItem!=0) updatePosition(); + //Close editor setTextInteractionFlags(Qt::NoTextInteraction); - emit lostFocus(this); + QTextCursor cursor = textCursor(); + cursor.clearSelection(); + setTextCursor(cursor); QGraphicsTextItem::focusOutEvent(event); + //Determine undo state + if(myOwnerItem==0) setFlag(QGraphicsItem::ItemIsMovable,true); + if(toPlainText()==currentText) + qobject_cast(myOwnerScene)->removeLastUndo(); + else + qobject_cast(myOwnerScene)->clearRedo(); + onlyOneUndo=1; + editorOpened=0; + //Allow deletions when editor is closed + qobject_cast(myOwnerScene)->myOwnerWindow + ->dontDelete =0; } } void DiagramTextItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { if(editableItem) - { - if (textInteractionFlags() == Qt::NoTextInteraction) - setTextInteractionFlags(Qt::TextEditorInteraction); - QGraphicsTextItem::mouseDoubleClickEvent(event); - } + { + if(onlyOneUndo) + { + //Save current state to undo list + currentText = toPlainText(); + qobject_cast(myOwnerScene)->saveUndo(); + //Open editor + if (textInteractionFlags() == Qt::NoTextInteraction) + setTextInteractionFlags(Qt::TextEditorInteraction); + setSelected(1); + setFocus(Qt::MouseFocusReason); + setFlag(QGraphicsItem::ItemIsMovable,false); + editorOpened=1; + //Prevent deletions when editor is opened + qobject_cast(myOwnerScene)->myOwnerWindow + ->dontDelete = 1; + } + doubleClicked=1; + onlyOneUndo=0; + } } void DiagramTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event) -{ - if (myOwnerItem!=0) - { - setSelected(0); - myOwnerItem->mousePressEvent(event); - } - else - QGraphicsTextItem::mousePressEvent(event); +{ + if (myOwnerItem!=0 && editorOpened==0) + { + setSelected(0); + myOwnerItem->mousePressEvent(event); + } + else + { + positionChanged=0; + doubleClicked=0; + qobject_cast(myOwnerScene)->saveUndo(); + QGraphicsTextItem::mousePressEvent(event); + } } void DiagramTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { - if (myOwnerItem!=0) + if (myOwnerItem!=0 && editorOpened==0) { myOwnerItem->mouseReleaseEvent(event); } else + { + if(!doubleClicked) + { + if(!positionChanged) + qobject_cast(myOwnerScene)->removeLastUndo(); + else + qobject_cast(myOwnerScene)->clearRedo(); + } QGraphicsTextItem::mouseReleaseEvent(event); + } } void DiagramTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { - if (myOwnerItem!=0) + if (myOwnerItem!=0 && editorOpened==0) { myOwnerItem->mouseMoveEvent(event); } else QGraphicsTextItem::mouseMoveEvent(event); } + +QDomElement DiagramTextItem::toXml(QDomDocument &document) const +{ + QDomElement textItem = document.createElement("TextItem"); + + //Set attibutes; Text and Font + textItem.setAttribute("Text",toPlainText()); + textItem.setAttribute("Family",myFont.family()); + textItem.setAttribute("PointSize",myFont.pointSize()); + textItem.setAttribute("Bold",myFont.bold()); + textItem.setAttribute("Italic",myFont.italic()); + textItem.setAttribute("Underline",myFont.underline()); + textItem.setAttribute("Color",defaultTextColor().name()); + textItem.setAttribute("x",pos().x()); + textItem.setAttribute("y",pos().y()); + + return (textItem); +} diff --git a/Software/sie_cg/diagramtextitem.h b/Software/sie_cg/diagramtextitem.h old mode 100644 new mode 100755 index f4ae616..80f017f --- a/Software/sie_cg/diagramtextitem.h +++ b/Software/sie_cg/diagramtextitem.h @@ -43,6 +43,7 @@ #define DIAGRAMTEXTITEM_H #include +#include #include #include "diagramitem.h" @@ -52,6 +53,7 @@ class QGraphicsItem; class QGraphicsScene; class QGraphicsSceneMouseEvent; QT_END_NAMESPACE +class QFont; class DiagramTextItem : public QGraphicsTextItem { @@ -63,7 +65,7 @@ public: DiagramTextItem( QGraphicsItem *parent = 0, QGraphicsScene *scene = 0, bool editable =1, DiagramItem *ownerItem=0, unsigned char styleIO = 0, - unsigned char ID=0, QString defaultText="", + unsigned char ID=0,QString defaultText="", QPointF offset=QPointF(0,0)); int type() const @@ -84,6 +86,11 @@ public: bool isEditable() { return editableItem;} + void setFontt(QFont f) + {myFont = f; setFont(myFont);} + + QDomElement toXml(QDomDocument &) const; + public slots: void updatePosition(); @@ -101,10 +108,18 @@ protected: private: bool editableItem; - DiagramItem *myOwnerItem; + DiagramItem *myOwnerItem; + DiagramItem *currentOwnerItem; + QGraphicsScene *myOwnerScene; QPointF posOffset; unsigned char myStyleIO; unsigned char myID; + QFont myFont; + QString currentText; + bool positionChanged; + bool doubleClicked; + bool onlyOneUndo; + bool editorOpened; }; #endif diff --git a/Software/sie_cg/images/background1.png b/Software/sie_cg/images/background1.png old mode 100644 new mode 100755 index 1afe1566a4da4130b1324bd6361dda98eafb4c27..8a202dc126672b32e4c8fd7b01b076c3bb18ed76 GIT binary patch literal 7328 zcmV;R9AD#!P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igl4 z0y`zKT_n!{000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000~NNklZ0QyiR76J(orym|oH}BrZ zJbuOay#P}7_v81PzXxIN@@OTYD*g)+DscB^Px*9L9@U!O68}B{5B>^O!=;KmO(a&KV);OqO z1nm4q`khXmV#YHKB0QJt4RHM|k;~g?9s2lY+W%3U9!l7bf5+jisBrkfd)c2g|9*Rl zx4-uQ;i4cN)XABrb6wA+y^gyUHs-?hk-N*GWKYq2-@_<4&U1XP0BD0aZuWNW-rNh& zzjAypgeU&E>_*?5E{EUt6Wl*1O)tv*qoRicMHj$vaM{I&XEbhiS{~Pn&J*6|*L2+I z{e5Uz#4rl-c!hPKlHYcFea80|!^9IcfazXyz(#ZZ_tPh#bp!pQ(h3>btN3qZMir7t zjU%1zTluxapQV(rtZU8@3TAj1&)xQ9c7%b$!$|&yH+z$M+8zL&6Lm(fY9Pgl@}!I? z2V*gvDR*>x)3~w6-KIH$;|=eJn9>KyT=?=@8ow(29RP5zR+s}H(c}qF)Bu=2$aL$= zxvNj`$aE0pBWMV1W;;^~rYZo- zNV4mrK;UVI0I`YpjEP;T(yT;eaI5Ax{4kFfqxw=pb`TMHIugCZMT-%HU@aVv@N(j! zrghUUdFSTOe*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y z?A`lRmDqCn+A1@*;Xc(V9T`#5?r3aq0?yeu;^PiY-4feW$q%VA^s(C(UjCWNgZcW2 z1dYKL*jyvR8^jXUVBr8XB<7_9jGe>+Yrge%g%{1LE8n~k@g#B}iRgm9r_5Q)JnAXv!$Y}5+&Zy*<+fMxjHFxHSGf0b!J#l_ z3o-2D&`#%glT`WdeAm->h8f1sj8nARxC{6Ww@%hw%i5IJs1&Lu^x1>lie7=(x>)Um zPi1j1{;|U>ei*vJ)HNXL&ddVu&+#FUPj+}OcvHvFOkma{N(WC)cafaMtcVcj9gjA4 z$I0(+@l!vXdoK~Bd_lD`nGdtnKp&hrB9ZwdSZ7qJPOiWhCP-I=q>X6pM(4!X1CM*K z!3y)s1zMsry-hepPpPNJs?gzLT##-T0Z}~bS~Oysmc3kSzYXsnmjzV^U_&XFsPt7@ zu|RCPuElP$1(q_iuIkNe43Acs_Bak?CaV-jK{=z`G6p_;mGxZn(4ni879t`2(D%}P3O9PT1xGZ*M$Pps|RGhYu>+ErE2lv;imdKI;Vst0Q<#jK>z>% diff --git a/Software/sie_cg/images/background3.png b/Software/sie_cg/images/background3.png old mode 100644 new mode 100755 index 396f5f6fd396cacaaff70438adb85d7734c8b7ac..33ab08d63e090b716102e337692a53515304f692 GIT binary patch literal 5975 zcmV-d7pUloP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igl4 z0yP8u(~P_T000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000)UNkl}PZj z;P(3+2mnvsXnAfsnBEg0wqt6?h&xN%gBRP=qX0^P0Pauj@(?LNxV$I(p!eqs(0ytX zi#bBI-*x`x)bA~QivF1VTbJLtf8$bsV@(Ku!f}EC)y2%9C=jS5g04hCVmuJKJBj@* z$*b6Yiu}1W3eKefCzqO{1myoOTn5`suS@)Oa#P)l$65U<|hg&)L zc3z=C)6@CK!pF zc0R3Q@InU>7&~iqJxKl?HKcGKl9q@{@H8j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$(B_M45ZzhKez+V}r>om-3}m;C!(d-qr?$6V)&_Bzhp4TrQR*sC38t>K>@A(j6D*&Vm2**Z`@FQyej)zp%a(H3{M*AnY0rW! l8-J8XDdttpQMNuUzqa!UGn0m!EieQaJYD@<);T3K0RX~9ic|mq diff --git a/Software/sie_cg/images/bold.png b/Software/sie_cg/images/bold.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/bringtofront.png b/Software/sie_cg/images/bringtofront.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/copy.png b/Software/sie_cg/images/copy.png new file mode 100644 index 0000000000000000000000000000000000000000..d34cdcd32f09d66b88ae0133c6379e7d7be5afcc GIT binary patch literal 515 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H3?x5i&EW)6%*9TgAsieWw;%dH0CG7CJR*yM zqGce=SbMeU3{X(A#5JNMI6tkVJh3R1p}f3YFEcN@I61K(RWH9NefB#WDWIas0X`wF z|Ns97G9iG4g;`KgP)tlrRaFHdqNb*%p`ig}3kwVH+__`Vp52EIA3Ad6@X=#O)~#E& ze*O9l8#Zj*xN*~_O_wfRx_tTa_3PJf+_-V~-o2;Ko;`p5{N>A+@87@w^5x6duV23b z!FMqD0R}(8;1>w|{{8#UpFe;9{{8pwAJ9GFA|gP~FbJ0f`2{lwOQ@(D7@GU|rlvMe z{`B?duis_ima0JM!=5gVAr-e``y4khDe|~jujPKuwCn4?@J)AW?(W(o;_7L4S=385 zqQz#GIM23&->X;{)@;1FpK}(Y*?Z?kgH^LP7PB$2sic*7CH4JJm{z?lZFS~1?)9h2 z9=?}&a!J2a|L-BUpEp;Z)L-NBz4)VWuVU!cUXv%=pUf0XxU}biMMqYQ#@w7GcePvF z1GY>Rllx_Ecdm@{!?#yIDp@iX?wEe#=*lg9f7yJR4D!XESD&4D`2E$N;qxRaPQ1MS iDMVM4h`MnzV%zfAl3T#hTKbLh*2~7ZZD)ig{ literal 0 HcmV?d00001 diff --git a/Software/sie_cg/images/delete.png b/Software/sie_cg/images/delete.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/exit.png b/Software/sie_cg/images/exit.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/floodfill.png b/Software/sie_cg/images/floodfill.png old mode 100644 new mode 100755 index 54c0dae237849b1ac4c8f74edd2a9f868df636e0..16d5157941f23f912e1b8b414796338076fe4d96 GIT binary patch literal 299 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmPiw>Y!7b@4(8Q=pJ!iEBiObAE1a zYF-J0b5UwyNotBhd1gt5g1e`0KzJjcI8afWr;B4q#Np%w307tvi9{aloBRH6+4ADX zV;3wEZ*j7vhmKZ0(n16wJMg+fwz_BD4sF7klB#OcR-X&S)HYz_0S0}#+-!) zpPU$MMcmRj6xt7+;B90qZ}|Gqt}VI0Tf#k!<3Nr5rppH!EEz0+xW{oU_+6LM%3yXs j`3v`lt@qszZeV3NTA(kZy4PC(=pqJBS3j3^P6!)JbaM(j+t z*`p6k+Y&m*-QGCti{d?Yr?U^l-S&Rl_D1UcGDjwpO^yu-D(C0UdS}sHSJCWWm$KO) zBV53!M2U6A#7>?k0UbP7T%IVLyK`_xXR~pkLMPLcxv~ih^&I}cWcvG2i|^9E>c)Uu zOnvW}?6@m7=P=gCN-?L&nlLasiEenprD7hS5`JKk_KQi<6YeyC_#cY%WeVb>%WRI@ YUkl7o2x`3@5A+9vr>mdKI;Vst01-}XF8}}l diff --git a/Software/sie_cg/images/grid.png b/Software/sie_cg/images/grid.png new file mode 100755 index 0000000000000000000000000000000000000000..f5360b965d5bcbe0c369220cbfd1f7c48d12796d GIT binary patch literal 1164 zcmds#F>6#&5QR@z5Djd!lmxNUfR#*Pt!yw0VF@vfU?E5bu?i?g#6~+y3z30G|~3f?gph~l1m|_R9%_LTo$sFRd2eb6ww=3$=Z)f8-oTZBbgR6}t#-7+lGvS8$@m0N{X zTG171#DInpEcR%OHqvNux!O?ItZ+~FYJaq)ittE}YP(RdnclI$XtbY(`}iIg&I1z{PQb z#w}5j2bkO@4wx{EL#Po0nwwz3L1VO$t{zdJW}BK-OpGA$M_a0_>H&`NH^rD}&vOi^ zp+@dK-VtRpj&yq3!*C-H4?X;W)ec4{r1>0}65-)#v>IRHKY#5#esWG)(u1AF4KV)8 z^|zs}eU5vaJ+;4i^S-ol)X&n(ODk*qd0{@gy1V}3&fTNaXV+hSdb)Pz;+Os76O)Hq khrizae*5$I^6NK0ruzQ%+m*e;gInElzOk6SzjpiCABw3$YXATM literal 0 HcmV?d00001 diff --git a/Software/sie_cg/images/italic.png b/Software/sie_cg/images/italic.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/linecolor.png b/Software/sie_cg/images/linecolor.png old mode 100644 new mode 100755 index 98a821f27e6f7d77b6de60c570bdb2e2816f9152..57cce9e2488ae5af45a4d95553c5ed0f14b33845 GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmPiw>Yze_RBtzc|ak_64!_l=ltB< z)VvY~=c3falGGH1^30M91$R&1fbd2>aiF3mPZ!6Kh{JEM@8xT7;9!1m=*@5YmA`jd zym%^9@AV=mO?aO+5679Uy^Y7bQa@WeT##XC%G>8&(9ktqxFaP#z__WBCqE#5e|?No zpitz_02_w}kB-v}%sd7M7?`UVyFahDZ{%Dkd5~3bYT>_~%eFFTHFB{`W#G2U_dhFi fs;*5;*_vVZW37;fn{0}Ju3_+W^>bP0l+XkKyo+F| literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^T0pGL$P6S+0z38sDYgKg5ZC|z{{xw!hc4FvDaMi@ zzhDN3XE)M-97|6Z#}J9|y*Prg8NDWuEbzopr0L)V>;{X5v diff --git a/Software/sie_cg/images/linepointer.png b/Software/sie_cg/images/linepointer.png old mode 100644 new mode 100755 index 66933d43b30e4352c763cadb4f0ca3bd80325037..ec12b7cf09ed9683aed24e6d251b85ca380e532b GIT binary patch literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}Y)RhkE)4%c zaKYZ?lYt_f1s;*b3=G`DAk4@xYmNj^kiEpy*OmPiw>Yz;h}&n5M?fLT64!_l=ltB< z)VvY~=c3falGGH1^30M91$R&1fbd2>aiF3?PZ!6Kh{JEM2XY-y;9njSvnt8qMemGQJr?D+|q4%SJE za~OFN7?>pvFzjO7wUBvNB1@5u{IpyvUXAtfUS$io(mn|tvvaXt-f1~57jA6TiibPNs#rC#A#|~biTOcF^ z2IZw&q&F`SL9{Mig_W&iQr8YeY|$Z-+FS0ywk@+->!7&nzja2(e!pR7csp-oq%Zt< z^B&L7e1E_By{9mpPQgmGTJ4P2>;0yxDo{)&6KzDDjYgy2!A3K|sZ{EvBuN(qLGb8n zxc9K%@4qXT%a`T`=W@9_2+FuzF6jt-8Xap+&8~~Z;xADYHT#O93R%8reV@FUw}LPia0LkHvUAep?4q z{b`IL8{0I>l5D8@K`1VI0^RY7e)oF%RX(|1O0-nt=1yn1cIwJcx(W zeiD09**>`#-2nBxVdRA0uXUcCW7Zi5?e%)l_}PF~s|7CC0t5m9==S@60btL@ zu>s=_$7nQy&($iNUs-|WbIaOV{YPD0efZ!yT|IW~W_D|s7!HS+l|q-12HoBLsutE( zuawp|UgKP~J$bBH69?TcES_A{o_BV>Kw+(L?eWHw7X&q5o3h8_S{noq+%V002ovPDHLkV1lb( BQ|15w literal 0 HcmV?d00001 diff --git a/Software/sie_cg/images/pointer.png b/Software/sie_cg/images/pointer.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/preview.png b/Software/sie_cg/images/preview.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/raise1.png b/Software/sie_cg/images/raise1.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/redo.png b/Software/sie_cg/images/redo.png new file mode 100644 index 0000000000000000000000000000000000000000..45f0450282ce942502b60692c7803ab583884f3b GIT binary patch literal 1245 zcmV<31S0#1P)GN ziX7vfcqi%eq|k}x&gOVH+=PMHFuKA?gtQRW%IlcUT*b}I0@90ja@-YfNzo}erwzc# zdLi%C#aqG{fKLNq^X2^q9;4l%7$SNArmmqPitsS00WMRKb@Es)tzmlVidf4QCIJj5 zdv^^^48DXhr;cjR&EVfvW4nZ2B6A2%T*Slvo)TfBsEq z*ycoQcgLQ-L?2wXi8~d3mqa5UI2gEKKpjFJ3RLWAOUiM9vbzDduGH$)zM`AH7kUz1 z$W>M#Wb;r+LE6e-v3wh;$}$|`Afh*6ml?-Mum`5*2Lw<+(d%mSbiENCH1^rv7=YQ4 zv9U|Wx{3*mwvre ztNWNg6bL&;RUXDFJV;S6Q=Aj6MhyG3BeXbsLuBoga~UYlOCE$dYwL|8x!T9%b9Zsz6T zh7nc`IIIYlIkLA=<+hZ&TjKF}G>XMyx>R7LWtsVvYG!Ik>vwO?EeHT_$a{KHrV8Mz z*3NjWsa=3u1+@5D5u^qP?x4a7$T=%;xV?3FV?t%vVEG$@ur36OHn&TL>pQq%JD%)& zY_tEs-fqe{ImE*WfCvIqyD80R0YE6Nx{%C!Vs2M02ni8khnG7|0SdjbKx>iU5D1%V8T`Q$(YA18pYu*+>BDdoU0ABFo zFV9fR?x40>*<;bK!9Z&pMb|e3EUvqolPf=I~V0rQ^a+9&fmbde{!pHKS zL-LIj7f>hJ(da+5bWRi;i{+oS?kl@iaiwCTsoIc)j#W?WC)K)TtelQop-6+_AGV8? z=ZJ|zhd=E7wtX~lHrduj*Q*Om6Ql-IA4SfXw0^uI?iHU!)xEBi%)pSZvu`$-KJQm_ z+f?-GtyublB#%Y?7DZH0l^9=TO z29$!FJQQ&C(UsRf#wNe(v!6UDXYoZ>5=|E8;$}$5ZbnB7uF0V9!X1eptB3 zq}Z*?ZBx}9zoK!C6#nC(X@LiDpV)(Bo49a17)hkml??b=d6Na@0zp-0hN6q_4*nw` zc}Vd#PyT*{##=kJx%D*f51S%aS{GlBUJ{Tzl=xAg;1TgZ^n)Y&TS`qw00000NkvXX Hu0mjfQR7Rq literal 0 HcmV?d00001 diff --git a/Software/sie_cg/images/save.png b/Software/sie_cg/images/save.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/save_as.png b/Software/sie_cg/images/save_as.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/sendtoback.png b/Software/sie_cg/images/sendtoback.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/textpointer.png b/Software/sie_cg/images/textpointer.png old mode 100644 new mode 100755 index b25832cada22845efb19650500edf1ceb522a8b4..b204ed1c36eddc91f6e4b7cb4a4cd898a2e0df9f GIT binary patch literal 680 zcmV;Z0$2TsP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2igl4 z0~RU(3JHb)000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}00065Nkl6oL^Fe}G_A;E&qO1AV`;}-#q?7V5Hpw zq_e-^zVq$e9f?4H5AaIJtpP8(P1nfA-8?NZFbQ;de4mZg+W>B-8&6ypFwtrO)qvI4 z%MmR@;-UWupgcKez*61VGH~jNA9nLaF(6gFZmd4IJYcLo0@hl&8IuO9Pnw+l`6j2r zcPAvF47>my3NPKN$M*sF>G2H!&qE84uFw_VGwa4zVr8h*(SHy40d$toefk22`5g0(OBuPtvTh`dvf| zp8<0o_Z~1{tUkZYz)J!A!kzIL`v{zSeEkmZiUbn7<6Oxq3}Xp!An${_X1-= z@cS0Emh#3_n%}Q6Fb#B+P{69-yX|mEn$W*hYdm7jSiJ*m74WN9uKfdXPJh;(eVJwe O0000E}0|Ntca&k#YN&Ni$6B82z1O%U-pTxw(si~<21qD}ER~Hu- z_V)G`78a(arl6ppU|?V*BqTmQJ|iO|x3{-VO-=at_`txxFfcF)2?^}%>>wZ@ii(Qb z+S>8)@eK_PnVFdx85#Nc`OVGE^z`&OIXNvYEjv3q5)u+aLqo#C!lb06+}zw%RaIzc zXj)oYP*70t@bCr(1|J_EbaZsFv9VoUT_GVMHa0d02ng!x>f77ffq{XXoSch`i*swgN1UC~rmJr6ZtwP$GZ*2`gv#l)X+8W}u^wiyPzo88jdmHTu(7OW- zlMU)k*g-2Zf^IIXHN!c(mF2ss+o!$2N6utNCw?(Ir*Vhc(JTP?=-L*|eis=D!-$m8 zUDdSq;cma*Ha6*!kgMyZ_X*pCVd~Gj?q|^)9YbKI(OrqVm{ZfZ@2PHF{gGgN-D*TgnTzabF6H?ke2Co}~y&DfWYwGHLUN z>ECB+w+ga*=wh-X*@Ob}V=m+b+3A^No>RkxNH1yW3PgHsQ;K9ZRdFD@*Sjvt00000NkvXXu0mjfuiIx( diff --git a/Software/sie_cg/images/underline.png b/Software/sie_cg/images/underline.png old mode 100644 new mode 100755 diff --git a/Software/sie_cg/images/undo.png b/Software/sie_cg/images/undo.png new file mode 100644 index 0000000000000000000000000000000000000000..57abbe17da3085eda16e2e90cc464201c8f4561f GIT binary patch literal 1220 zcmV;#1UvhQP)zjN<-_l=noGj*`qmJSYWZMBG{NEI!D zLR-WcTox1;x>6S|#D$BZpy0-Zi;Al*)K+jTXqBq1Z9>^d%SWS$4(xiZ&5eftit0Ivf_ zfv4gRN8{)d%2MyQElRgGwrHAKmXOLW1!dv8BUGj?QXHFN{GvA|Ms~+D`>q$RZhYj0 zO#akIj10{D4xDIcOYK~7XD?1}3wEv(DB8txL`>+~sK`D=aLX1N+b)3TRVa}cQ&I@d~64wBP9xBs8Tl;pD zoq<#eflL& z@ezW_0+wx)Xz3!=vx4-ZWq@H0yN#~JYnUkX?~MP?)A81O=dNPImbDmtH&_bPtl-a# zQXV=S$Lr*pL!7k1Lhwt5>N!KAaVZUJ?!`(Z01yoInf?6HSDXe`XaFM-Q5b@)Vj*&i zlnRH?*@$e9VQ9eMS3_5X_y9Y#=r$XM&Plo7R}HJTf)W56wVG7!aI;&9wpjqg(J*j{ zA{S#kJU@?>BMuv?RfSgxCPZWvNRwX=pE-LnD6+&-VRgi>4flspy)LnsAVVqxz(xxo zbPLo9{rEE%iNYFAV=uX$jaXe>WSWJJUZ)-SFuprKb}z8|!l0nLRp^bK8Hj4t^RdOS z5>4f@8sIJsoG#XaZM=cBe2;j(q zup|<*8gaB){^Xbp>|3f@TS|7-SLvj~p`>jY-%FjnxhFd!VUPh;M{p*@+8RU>RVw^! z+kCkojN`;%n^n(G3Bbx7!*b%&TMat+rs_pan>Y84&2A?_m_ZRCq{_9BqNUr5`TBkl z_CEWjl$3~YBlLf@)&i6=MiGQs1wm4If#X%&^mv`c 0 0 - 333 - 341 + 538 + 454 Dialog - - - - + - - - &Add Library - - + - - - &Remove library - - - - - - - &Edit library - - + + + + + + + + 140 + 16777215 + + + + &Add Library + + + + + + + + 140 + 16777215 + + + + &Edit library + + + + + + + + 140 + 16777215 + + + + &Remove library + + + + + + + + + Qt::Horizontal + + + + + + + + + + 140 + 16777215 + + + + &Up + + + + + + + + 140 + 16777215 + + + + &Down + + + + + + @@ -50,14 +113,25 @@ - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - + + + + + Library paths will be saved when you save your diagram... + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + diff --git a/Software/sie_cg/lineitem.cpp b/Software/sie_cg/lineitem.cpp old mode 100644 new mode 100755 index 48f1a24..7e30d35 --- a/Software/sie_cg/lineitem.cpp +++ b/Software/sie_cg/lineitem.cpp @@ -42,6 +42,7 @@ #include #include "lineitem.h" +#include "diagramscene.h" #include lineItem::lineItem(QPointF startPoint, QPointF endItem, Arrow *ownerArrow, @@ -49,7 +50,8 @@ lineItem::lineItem(QPointF startPoint, QPointF endItem, Arrow *ownerArrow, : QGraphicsLineItem(parent, scene) { isMovable=movable; - if(isMovable) setFlag(QGraphicsItem::ItemIsMovable, true); + if(isMovable) + setFlag(QGraphicsItem::ItemIsMovable, true); setFlag(QGraphicsItem::ItemIsSelectable, true); @@ -103,10 +105,21 @@ void lineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, } } +QVariant lineItem::itemChange(GraphicsItemChange change, + const QVariant &value) +{ + if (change == QGraphicsItem::ItemPositionChange) + positionChanged=1; + + return value; +} + void lineItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent) { if(!isMovable) { + qobject_cast(myOwnerArrow->myOwnerScene) + ->saveUndoState(); myOwnerArrow->createCorner(mouseEvent->pos(),this); } QGraphicsLineItem::mouseDoubleClickEvent(mouseEvent); @@ -114,7 +127,11 @@ void lineItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent) void lineItem::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) -{ +{ + positionChanged=0; + qobject_cast(myOwnerArrow->myOwnerScene)->saveUndo(); + myOwner()->setSelectedLines(false); + setSelected(true); QGraphicsLineItem::mousePressEvent(mouseEvent); } @@ -133,5 +150,11 @@ void lineItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) { updatePos(); } + if(!positionChanged) + qobject_cast(myOwnerArrow->myOwnerScene) + ->removeLastUndo(); + else + qobject_cast(myOwnerArrow->myOwnerScene) + ->clearRedo(); QGraphicsLineItem::mouseReleaseEvent(mouseEvent); } diff --git a/Software/sie_cg/lineitem.h b/Software/sie_cg/lineitem.h old mode 100644 new mode 100755 index b2388ce..03178c2 --- a/Software/sie_cg/lineitem.h +++ b/Software/sie_cg/lineitem.h @@ -86,6 +86,7 @@ protected: void mousePressEvent(QGraphicsSceneMouseEvent *event); void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + QVariant itemChange(GraphicsItemChange change, const QVariant &value); private: QColor myColor; @@ -93,6 +94,7 @@ private: Arrow *myOwnerArrow; int moveItem; bool isMovable; + bool positionChanged; }; #endif diff --git a/Software/sie_cg/main.cpp b/Software/sie_cg/main.cpp old mode 100644 new mode 100755 diff --git a/Software/sie_cg/main.cpp2 b/Software/sie_cg/main.cpp2 new file mode 100755 index 0000000..070c8b3 --- /dev/null +++ b/Software/sie_cg/main.cpp2 @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Nokia. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +#include "mainwindow.h" + +int main(int argv, char *args[]) +{ + Q_INIT_RESOURCE(diagramscene); + + QApplication app(argv, args); + MainWindow mainWindow; + mainWindow.setGeometry(100, 100, 1024, 640); + mainWindow.show(); + return app.exec(); +} diff --git a/Software/sie_cg/mainwindow.cpp b/Software/sie_cg/mainwindow.cpp old mode 100644 new mode 100755 index 7453b38..9b5369b --- a/Software/sie_cg/mainwindow.cpp +++ b/Software/sie_cg/mainwindow.cpp @@ -48,6 +48,7 @@ const int InsertTextButton = 100000; MainWindow::MainWindow() { + domElementsByName=0; buttonGroup=0; toolBox=0; statusBar = new QStatusBar(this); @@ -59,18 +60,24 @@ MainWindow::MainWindow() this, SLOT(itemInserted(DiagramItem*))); connect(scene, SIGNAL(textInserted(QGraphicsTextItem*)), this, SLOT(textInserted(QGraphicsTextItem*))); - connect(scene, SIGNAL(itemSelected(QGraphicsItem*)), - this, SLOT(itemSelected(QGraphicsItem*))); createToolBox(); createToolbars(); + setDefaultOptions(); setWindowTitle(tr("SIE Code Generator (Diagram Editor)")); setUnifiedTitleAndToolBarOnMac(true); myFilePath = ""; libDialog=0; cgDialog=0; + optionsDialog=0; + sieSSH=0; + compile=0; + sshReady=0; + dontDelete=0; if(QApplication::argc()>1) {newDiagram(QString(QApplication::argv()[1]));} + else + newDiagram(); statusBar->showMessage("Ready..."); this->setStatusBar(statusBar); } @@ -113,35 +120,63 @@ void MainWindow::buttonGroupClicked(int id) void MainWindow::deleteItem() { - foreach (QGraphicsItem *item, scene->selectedItems()) { - if (item->type() == DiagramItem::Type) { - qgraphicsitem_cast(item)->removeArrows(); - qgraphicsitem_cast(item)->removeTextItems(); + if(!dontDelete) + { + if(!scene->selectedItems().isEmpty()) + scene->saveUndoState(); + //List od items + QList Items; + QList Arrows; + QList Lines; + QList TextItems; + foreach(QGraphicsItem *item, scene->selectedItems()) + { + if(item->type() == DiagramItem::Type) + Items.append(qgraphicsitem_cast(item)); + else if(item->type() == Arrow::Type) + Arrows.append(qgraphicsitem_cast(item)); + else if(item->type() == lineItem::Type) + Lines.append(qgraphicsitem_cast(item)); + else if(item->type() == DiagramTextItem::Type) + if(qgraphicsitem_cast(item)->ownerItem() == 0) + TextItems.append(qgraphicsitem_cast(item)); + } + + foreach(DiagramItem * item, Items){ + item->removeArrows(); + item->removeTextItems(); + scene->removeDiagramItem(item); + scene->removeItem(item); + delete(item); + } + + foreach(Arrow * item, Arrows){ + if(scene->items().contains(item)) + { + item->removeLines(); + item->startItem()->ownerItem()->removeArrow(item); + item->endItem()->ownerItem()->removeArrow(item); + scene->removeItem(item); + delete(item); + } + } + + foreach(lineItem * item, Lines){ + if(!item->itemIsMovable() && scene->items().contains(item)) + { + item->myOwner()->removeLine(item); + item->myOwner()->updatePosition(); scene->removeItem(item); delete(item); } - //If arrow is deleted then is romoved from diagram owner - else if (item->type() == Arrow::Type) { - qgraphicsitem_cast(item)->removeLines(); - qgraphicsitem_cast(item)->startItem()->ownerItem() - ->removeArrow(qgraphicsitem_cast(item)); - qgraphicsitem_cast(item)->endItem()->ownerItem() - ->removeArrow(qgraphicsitem_cast(item)); - scene->removeItem(item); - delete(item); - } - //If line is deleted then is romoved from the arrow owner - else if (item->type() == lineItem::Type && - !qgraphicsitem_cast(item)->itemIsMovable()) { - - qgraphicsitem_cast(item)->myOwner()->removeLine( - qgraphicsitem_cast(item)); - qgraphicsitem_cast(item)->myOwner()->updatePosition(); - scene->removeItem(item); - delete(item); - } - } + + foreach(DiagramTextItem * item, TextItems){ + scene->removeItem(item); + delete(item); + } + + } } void MainWindow::pointerGroupClicked(int) @@ -149,33 +184,475 @@ void MainWindow::pointerGroupClicked(int) scene->setMode(DiagramScene::Mode(pointerTypeGroup->checkedId())); } -void MainWindow::cgGroupClicked(int id) -{ - if(id==0) - { - QString Test; - QHash DiagramsID = scene->getDiagramsID(); - foreach (QGraphicsItem *item, scene->items()) { - if (item->type() == DiagramItem::Type) { - Test+=(tr("\nDiagramID=\t") + QString::number(DiagramsID. - key(qgraphicsitem_cast(item)))); - QList TextItems = - qgraphicsitem_cast(item)->getTextItems(); - foreach (DiagramTextItem *textItem, TextItems) { - Test+=(tr("\n\tTextItemID=\t") + QString::number( - textItem->textID())); - Test+=(tr("\n\t\tTextItemStyleIO=\t") + QString::number( - textItem->styleIO())); - Test+=(tr("\n\t\tTextItemValue=\t") + - textItem->toPlainText()); - Test+=(tr("\n\t\tTextItemEditable=\t") + - (textItem->isEditable()?"true":"false")); - } - } +void MainWindow::cgGroupClicked() +{ + QList allItems; + QList headItems; + QList passItems; + QList passArrows; + QString headerCode; + QString initCode; + QString blockCode; + QString extraCode; + QString mainCode; + QString iosCode; + QString warnings; + QString mainSCode; + + // Find all Diagram Items and select the "heads" (has no inputs) + foreach (QGraphicsItem *item, scene->items()) { + if (item->type() == DiagramItem::Type) + { + allItems.append(qgraphicsitem_cast(item)); + if(itemIsHead(qgraphicsitem_cast(item))) + headItems.append(qgraphicsitem_cast(item)); } - codeForm(); - cgUi->codeTextEdit->setPlainText(Test); } + // Get code for segments with heads-ends + foreach(DiagramItem * item, headItems) + { + passItem(item,passItems,passArrows, headerCode, initCode, blockCode, + extraCode, mainCode, iosCode, warnings, mainSCode); + } + // Get code for items in segments with no heads-ends + foreach(DiagramItem * item, allItems) + { + if(!passItems.contains(item)) + passItem(item,passItems,passArrows,headerCode,initCode, + blockCode,extraCode,mainCode,iosCode,warnings,mainSCode); + } + + if(mainSCode.contains("/***![SYSTEM WHILE]***/")) + mainSCode = mainSCode.replace("/***![SYSTEM WHILE]***/",mainCode); + else if(mainSCode.contains("/***![SYSTEM TIMER]***/")) + mainSCode = mainSCode.replace("/***![SYSTEM TIMER]***/",mainCode); + else + mainSCode = mainCode; + + // create work dir + QString tempWorkDir = workDir+"/"+executableFile; + if(!QDir(tempWorkDir).exists()) + { + warnings += tr("\nExecuting command: mkdir ") + + tempWorkDir + tr("/") + tr("\n"); + warnings += callexternapp("mkdir ",workDir + tr("\n")); + warnings += callexternapp("mkdir ",tempWorkDir + tr("\n")); + } + // Copy files from template + if(QDir(templateDir).exists()) + { + warnings += tr("\nExecuting command: cp -fR ") + + templateDir+tr("/. ")+ + tempWorkDir+tr("/"); + warnings += callexternapp(tr("cp -fR ") + + templateDir+tr("/. ")+ + tempWorkDir+tr("/"),""); + } + else + { + warnings += tr("\nWARNING*** Could not found template files"); + } + + //TODO: Makefile creation!!! + + + //Open main code template + QString protoCode,tempTemplateFile; + tempTemplateFile = tempWorkDir+tr("/")+templateFile; + if(!QFileInfo(tempTemplateFile).isReadable()) + { + warnings +="\nERROR***: " + "Main code template file is not readable or not exists."; + protoCode+="Main code template file is not readable or not exists."; + } + else + { + warnings +=tr("\nOpening File: ") + tempTemplateFile; + QFile file(tempTemplateFile); + if(file.open(QIODevice::ReadOnly | QIODevice::Text)) + { + QByteArray text = file.readAll(); + protoCode = text.data(); + file.close(); + } + else + warnings += "\nERROR***: " + "Could not open main code template file for read."; + + warnings +=tr("\nReplacing code on main code template"); + protoCode.replace("/***![HEADER SECTION]***/",headerCode); + protoCode.replace("/***![BLOCK SECTION]***/",blockCode); + protoCode.replace("/***![INIT SECTION]***/",initCode); + protoCode.replace("/***![IO SECTION]***/",iosCode); + protoCode.replace("/***![MAIN SECTION]***/",mainSCode); + protoCode.replace("/***![EXTRA SECTION]***/",extraCode); + } + + + //Open Makefile template + QString protoMake,tempMakeFile; + tempMakeFile = tempWorkDir+tr("/")+makeFile; + if(!QFileInfo(makeFile).isReadable()) + { + warnings +="\nERROR***: " + "Makefile template file is not readable or not exists."; + protoMake+="Makefile template file is not readable or not exists."; + } + else + { + warnings +=tr("\nOpening File: ") + tempMakeFile; + QFile file(tempMakeFile); + if(file.open(QIODevice::ReadOnly | QIODevice::Text)) + { + QByteArray text = file.readAll(); + protoMake = text.data(); + file.close(); + } + else + warnings +="\nERROR***: " + "Could not open Makefile template file for read."; + warnings +=tr("\nReplacing code on Makefile template"); + protoMake.replace("![MIPS TOOLCHAIN]",mipsToolChainDir); + protoMake.replace("![MIPS TOOLCHAIN BASE]",mipsToolChain); + protoMake.replace("![SIE APP NAME]",executableFile); + protoMake.replace("![MAIN TEMPLATE]",templateFile); + protoMake.replace("![MAIN OBJECT]", + QFileInfo(templateFile).baseName()+".o"); + + } + + //Open code generator form + codeForm(); + + // Update form: + cgUi->codeTextEdit->setPlainText(protoCode); + cgUi->makeTextEdit->setPlainText(protoMake); + saveTemplates(); + cgUi->logTextEdit->append(warnings); + cgUi->codesTab->setCurrentIndex(0); + cgUi->outputsTab->setCurrentIndex(0); +} + +void MainWindow::saveTemplates() +{ + QString tempWorkDir = workDir+"/"+executableFile; + //Save files from templates + QFile file(tempWorkDir+"/"+templateFile); + if(file.open(QIODevice::WriteOnly | QIODevice::Text)) + { + QTextStream out(&file); + out.setCodec("UTF-8"); + out << cgUi->codeTextEdit->toPlainText(); + file.close(); + } + else + cgUi->logTextEdit->append( + "ERROR*** Could not open main code file for write."); + + file.setFileName(tempWorkDir+tr("/")+makeFile); + if(file.open(QIODevice::WriteOnly | QIODevice::Text)) + { + QTextStream out(&file); + out.setCodec("UTF-8"); + out << cgUi->makeTextEdit->toPlainText(); + file.close(); + } + else + cgUi->logTextEdit->append( + "ERROR*** Could not open Makefile for write."); +} + +QString MainWindow::passItem(DiagramItem * item, + QList &passItems, + QList &passArrows, + QString &headerCode, + QString &initCode, + QString &blockCode, + QString &extraCode, + QString &mainCode, + QString &iosCode, + QString &warnings, + QString &mainSCode) +{ +if(!passItems.contains(item)) +{ + QHash DiagramsID = scene->getDiagramsID(); + // Get Dom Element: From item + QDomElement * itemDomElement = item->getDomElement(); + // Get basic information + QString blockID = QString::number(DiagramsID.key(item)); + + QString blockName = itemDomElement->attribute("BlockName"); + + QList TextItems =item->getTextItems(); + + // Create list de ios and values, and get function prototye + QList ioTypes; + QList ioNames; + QList valueNames; + QList values; + QList inputs; + QList outputs; + + QString protoFunction = createPrototype( + TextItems,ioTypes,ioNames,valueNames,values, + blockName+blockID,inputs,outputs); + + // Read Code: + int codeIdx = 0; + QString headerCodet; + QString initCodet; + QString blockCodet; + QString extraCodet; + for (QDomNode node = itemDomElement->firstChild() ; + !node.isNull() ; + node = node.nextSibling()) + { + if(node.isCDATASection()) + { + QDomCDATASection Code = node.toCDATASection(); + switch(codeIdx) + { + case 0: + headerCodet=(Code.data()); + break; + case 1: + initCodet=(Code.data()); + break; + case 2: + blockCodet=(Code.data()); + break; + case 3: + extraCodet=(Code.data()); + break; + default:; + } + codeIdx++; + } + } + // Replace values: + for(int i = 0; i with ID[") + blockID + tr("] \n"); + // Generate inputs/outputs and function declaration + QString prototype = tr("\t") + QString(blockName + blockID) + .replace(' ','_') + tr(" ("); + int first = 0; + for(int i = 0; i connectedInputs; + QList connectedOutputs; + foreach(Arrow *arrow, item->getArrows()){ + if(item == arrow->endOwner()) + { + mainCode += tr("\tin_") + + QString::number(arrow->endItem()->textID()) + + tr("_") + + QString::number(arrow->endOwner()->getID()) + + tr(" = out_") + + QString::number(arrow->startItem()->textID()) + + tr("_") + + QString::number(arrow->startOwner()->getID()) + + tr(";\n"); + connectedInputs.append(arrow->endItem()); + } + } + // Find unconnected inputs + foreach(DiagramTextItem * item, inputs){ + if(!connectedInputs.contains(item)) + warnings += tr("\nWARNING** Unconnected input[") + + QString::number(item->textID()) + + tr("] in block ") + blockName + + tr(" with ID [") + blockID + tr("]\n"); + } + + if(blockName != "System While" && + blockName != "System Timer") + { + mainCode += prototype; + } + + passItems.append(item); + + // Apply passItem to items connected to the outputs + foreach(Arrow *arrow, item->getArrows()){ + if(item == arrow->startOwner()) + { + passItem(arrow->endOwner(),passItems,passArrows, + headerCode, initCode, blockCode, + extraCode, mainCode, iosCode, + warnings, mainSCode); + connectedOutputs.append(arrow->startItem()); + } + } + // Find unconnected outputs + foreach(DiagramTextItem * item, outputs){ + if(!connectedOutputs.contains(item)) + warnings += tr("\nWARNING** Unconnected output[") + + QString::number(item->textID()) + + tr("] in block ") + blockName + + tr(" with ID [") + blockID + tr("]\n"); + } +} + + return 0; +} + +bool MainWindow::itemIsHead(DiagramItem * item) +{ + foreach (DiagramTextItem *text, item->getTextItems()) + { + if(text->styleIO()>>7) + return 0; + } + return 1; +} + +bool MainWindow::itemIsEnd(DiagramItem * item) +{ + foreach (DiagramTextItem *text, item->getTextItems()) + { + if(!text->styleIO()>>7) + return 0; + } + return 1; +} + +QString MainWindow::getIoType(DiagramTextItem * item) +{ + QString ioType; + switch(item->styleIO()&127) + { + case 1: + ioType += "bool "; + break; + case 2: + ioType += "char "; + break; + case 3: + ioType += "int "; + break; + case 4: + ioType += "double "; + break; + case 5: + ioType += "float "; + break; + case 6: + ioType += "short int "; + break; + case 7: + ioType += "long int "; + break; + case 8: + ioType += "unsigned char "; + break; + case 9: + ioType += "unsigned int "; + break; + case 10: + ioType += "unsigned short int "; + break; + case 11: + ioType += "unsigned long int "; + break; + default: + ioType += " ";; + } + return ioType; +} + +QString MainWindow::createPrototype(QList &textItems, + QList &ioTypes, + QList &ioNames, + QList &valueNames, + QList &values, + QString blockNameID, + QList &inputs, + QList &outputs) +{ + foreach (DiagramTextItem *item, textItems) { + int styleIO = item->styleIO(); + if(styleIO<256 && styleIO>0) + { + QString ioType, ioName; + int ioID = item->textID(); + ioType = getIoType(item); + ioName = ((styleIO>>7)? tr("in"):tr("out")) + "_" + + QString::number(ioID); + if(styleIO>>7) + { + ioName = tr("in") + "_" + QString::number(ioID); + inputs.append(item); + } + else + { + ioName = tr("out") + "_" + QString::number(ioID); + outputs.append(item); + } + ioTypes.append(ioType); + ioNames.append(ioName); + } + else if(item->isEditable()) + { + QString valueName = tr("value_") + QString::number(item->textID()); + values.append(item->toPlainText()); + valueNames.append(valueName); + } + } + + + QString prototype = tr("void ") + blockNameID.replace(' ','_') + tr(" ("); + if(!ioNames.isEmpty()) + { + int first = 0; + for(int i = 0; icurrentFont(); font.setPointSize(fontSizeCombo->currentText().toInt()); - font.setWeight(boldAction->isChecked() ? QFont::Bold : QFont::Normal); + font.setBold(boldAction->isChecked()); font.setItalic(italicAction->isChecked()); font.setUnderline(underlineAction->isChecked()); scene->setFont(font); } -void MainWindow::itemSelected(QGraphicsItem *item) +void MainWindow::setFontSettings(QFont font) { - DiagramTextItem *textItem = - qgraphicsitem_cast(item); - - QFont font = textItem->font(); - QColor color = textItem->defaultTextColor(); - fontCombo->setCurrentFont(font); - fontSizeCombo->setEditText(QString().setNum(font.pointSize())); - boldAction->setChecked(font.weight() == QFont::Bold); - italicAction->setChecked(font.italic()); - underlineAction->setChecked(font.underline()); + fontSizeCombo->setEditText(QString::number(font.pointSize())); + font.bold()? boldAction->setChecked(true): boldAction->setChecked(false); + font.italic()? italicAction->setChecked(true): + italicAction->setChecked(false); + font.underline()? underlineAction->setChecked(true): + underlineAction->setChecked(false); + fontCombo->setEditText(font.family()); } void MainWindow::about() @@ -322,10 +796,22 @@ void MainWindow::about() tr("TODO :)")); } +void MainWindow::cleanDomElementsByName() +{ + if(domElementsByName!=0) + { + foreach(QDomElement * domElement,domElementsByName->values()) + {delete(domElement);} + delete(domElementsByName); + } +} + void MainWindow::addLibrariesButtons(QGridLayout *layout) { - int i=1; - domElementsByName.clear(); buttonIdByName.clear(); + int i = 1; + cleanDomElementsByName(); + domElementsByName = new QHash; + buttonIdByName.clear(); QDomDocument customItems; foreach(QString filepath, libraryList) { @@ -337,7 +823,7 @@ void MainWindow::addLibrariesButtons(QGridLayout *layout) QDomElement *customItem = new QDomElement(node.toElement()); if(customItem->tagName()=="CustomItem") { - if(domElementsByName.contains( + if(domElementsByName->contains( customItem->attribute("BlockName"))) { QMessageBox::warning(this,"Block name in use.", @@ -350,16 +836,15 @@ void MainWindow::addLibrariesButtons(QGridLayout *layout) } else { - domElementsByName.insert(customItem->attribute("BlockName"), + domElementsByName->insert(customItem->attribute("BlockName"), customItem); - buttonIdByName.insert(customItem->attribute("BlockName"),i-1); - + buttonIdByName.insert(customItem->attribute("BlockName"),i-1); scene->setDomElementsByName(domElementsByName); scene->setButtonIdByName(buttonIdByName); layout->addWidget(createCellWidget( customItem->attribute("BlockName"), - domElementsByName. + domElementsByName-> value(customItem->attribute("BlockName"))),i/2,i&1); i++; } @@ -469,6 +954,18 @@ void MainWindow::createActions() exportImgAction->setStatusTip("Export current diagram to picture"); connect(exportImgAction,SIGNAL(triggered()),this,SLOT(exportDiagram())); + + redoAction = new QAction(QIcon(":/images/redo.png"),tr("&Redo"),this); + redoAction->setShortcuts(QKeySequence::Redo); + redoAction->setStatusTip("Redo changes on diagram"); + connect(redoAction,SIGNAL(triggered()),this,SLOT(redoDiagram())); + + undoAction = new QAction(QIcon(":/images/undo.png"),tr("&Undo"),this); + undoAction->setShortcuts(QKeySequence::Undo); + undoAction->setStatusTip("Undo changes on diagram"); + connect(undoAction,SIGNAL(triggered()),this,SLOT(undoDiagram())); + + exitAction = new QAction(tr("E&xit"), this); exitAction->setShortcuts(QKeySequence::Quit); exitAction->setStatusTip(tr("Quit diagram editor")); @@ -484,14 +981,14 @@ void MainWindow::createActions() tr("Italic"), this); italicAction->setCheckable(true); italicAction->setShortcut(tr("Ctrl+I")); - connect(italicAction, SIGNAL(triggered()), + connect(italicAction, SIGNAL(triggered(bool)), this, SLOT(handleFontChange())); underlineAction = new QAction(QIcon(":/images/underline.png"), tr("Underline"), this); underlineAction->setCheckable(true); underlineAction->setShortcut(tr("Ctrl+U")); - connect(underlineAction, SIGNAL(triggered()), + connect(underlineAction, SIGNAL(triggered(bool)), this, SLOT(handleFontChange())); @@ -508,7 +1005,6 @@ void MainWindow::createActions() this, SLOT(optionsForm())); aboutAction = new QAction(tr("A&bout"), this); - aboutAction->setShortcut(tr("Ctrl+B")); connect(aboutAction, SIGNAL(triggered()), this, SLOT(about())); } @@ -546,24 +1042,26 @@ void MainWindow::createToolbars() fileToolBar->addAction(openAction); fileToolBar->addAction(saveAction); - editToolBar = addToolBar(tr("Edit")); - editToolBar->addAction(deleteAction); - editToolBar->addAction(toFrontAction); - editToolBar->addAction(sendBackAction); - QToolButton *cgButton = new QToolButton; cgButton->setCheckable(false); cgButton->setIcon(QIcon(":/images/cg.png")); + cgButton->setToolTip("Generate code for SIE"); cgGroup = new QButtonGroup; cgGroup->addButton(cgButton,0); connect(cgGroup, SIGNAL(buttonClicked(int)), - this, SLOT(cgGroupClicked(int))); + this, SLOT(cgGroupClicked())); cgToolbar = addToolBar(tr("Code Generator")); cgToolbar->addWidget(cgButton); + editToolBar = addToolBar(tr("Edit")); + editToolBar->addAction(deleteAction); + editToolBar->addAction(toFrontAction); + editToolBar->addAction(sendBackAction); + editToolBar->addAction(undoAction); + editToolBar->addAction(redoAction); fontCombo = new QFontComboBox(); fontSizeCombo = new QComboBox(); @@ -610,18 +1108,6 @@ void MainWindow::createToolbars() connect(lineColorToolButton, SIGNAL(clicked()), this, SLOT(lineButtonTriggered())); - textToolBar = addToolBar(tr("Font")); - textToolBar->addWidget(fontCombo); - textToolBar->addWidget(fontSizeCombo); - textToolBar->addAction(boldAction); - textToolBar->addAction(italicAction); - textToolBar->addAction(underlineAction); - - colorToolBar = addToolBar(tr("Color")); - colorToolBar->addWidget(fontColorToolButton); - colorToolBar->addWidget(fillColorToolButton); - colorToolBar->addWidget(lineColorToolButton); - QToolButton *pointerButton = new QToolButton; pointerButton->setCheckable(true); pointerButton->setChecked(true); @@ -645,11 +1131,38 @@ void MainWindow::createToolbars() connect(sceneScaleCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(sceneScaleChanged(QString))); + pointerToolbar = addToolBar(tr("Pointer type")); pointerToolbar->addWidget(pointerButton); pointerToolbar->addWidget(linePointerButton); pointerToolbar->addWidget(sceneScaleCombo); + gridButton = new QToolButton; + gridButton->setCheckable(true); + gridButton->setChecked(false); + gridButton->setIcon(QIcon(":/images/grid.png")); + + connect(gridButton,SIGNAL(clicked()),this,SLOT(setGridState())); + + colorToolBar = addToolBar(tr("Color")); + colorToolBar->addWidget(fontColorToolButton); + colorToolBar->addWidget(fillColorToolButton); + colorToolBar->addWidget(lineColorToolButton); + colorToolBar->addWidget(gridButton); + + textToolBar = addToolBar(tr("Font")); + textToolBar->addWidget(fontCombo); + textToolBar->addWidget(fontSizeCombo); + textToolBar->addAction(boldAction); + textToolBar->addAction(italicAction); + textToolBar->addAction(underlineAction); + +} + +void MainWindow::setGridState() +{ + scene->setDawGrid(gridButton->isChecked()); + scene->update(); } QWidget *MainWindow::createCellWidget(QString text, QDomElement *customItem) @@ -677,17 +1190,17 @@ QWidget *MainWindow::createCellWidget(QString text, QDomElement *customItem) QMenu *MainWindow::createColorMenu(const char *slot, QColor defaultColor) { QList colors; - colors << Qt::black << Qt::white << Qt::magenta + colors << Qt::black << Qt::white << Qt::magenta << Qt::gray << Qt::cyan << Qt::red << Qt::blue << Qt::yellow << Qt::green << Qt::darkMagenta << Qt::darkCyan << Qt::darkRed << Qt::darkBlue << Qt::darkYellow << Qt::darkGreen << Qt::darkGray; QStringList names; - names << tr("Black") << tr("White") << tr("Magenta") << tr("Cyan") - << tr("Red") << tr("Blue") << tr("Yellow") << tr("Green") - << tr("Dark Magenta") << tr("Dark Cyan") << tr("Dark Red") - << tr("Dark Blue") << tr("Dark Yellow") << tr("Dark Green") - << tr("Dark Gray") ; + names << tr("Black") << tr("White") << tr("Magenta") << tr("Gray") + << tr("Cyan") << tr("Red") << tr("Blue") << tr("Yellow") + << tr("Green") << tr("Dark Magenta") << tr("Dark Cyan") + << tr("Dark Red") << tr("Dark Blue") << tr("Dark Yellow") + << tr("Dark Green") << tr("Dark Gray") ; QMenu *colorMenu = new QMenu; for (int i = 0; i < colors.count(); ++i) { @@ -732,16 +1245,18 @@ QIcon MainWindow::createColorIcon(QColor color) int MainWindow::newDiagram(QString filePath) { saveIfNeeded(); - scene->cleanScene(); + undoList.clear(); + redoList.clear(); + scene->cleanScene(); libraryList.clear(); //or set defaults - domElementsByName.clear(); //or set defaults buttonIdByName.clear();//or set defaults scene->setLibList(libraryList); updateLibraries(); myFilePath=""; + setDefaultOptions(); - if(filePath=="") - return 0; + if(filePath=="") + return 0; myFilePath=filePath; if(!scene->fromXmlFormat(parseDocument(myFilePath))) @@ -751,7 +1266,7 @@ int MainWindow::newDiagram(QString filePath) } QDomDocument MainWindow::parseDocument(QString filePath) -{ +{ QDomDocument document; QFile file(filePath); if(file.open(QIODevice::ReadOnly | QIODevice::Text)) @@ -863,36 +1378,32 @@ int MainWindow::exportDiagram() Qt::KeepAspectRatio); p.end(); img.save(picturePath, "png"); - scene->setDawGrid(1); //TODO : set correct value + scene->setDawGrid(gridButton->isChecked()); //TODO : set correct value return 1; } int MainWindow::libraryForm() { - bool firstTime=0; if(!libDialog) - { createLibraryDialog(); - firstTime=1; - } libDialog->setModal(1); libUi->listLib->clear(); libUi->listLib->addItems(libraryList); libDialog->setWindowTitle(tr("Library paths...")); QStringList oldLibraryList=libraryList; - if(firstTime) - libDialog->exec(); - else - libDialog->show(); + libDialog->exec(); if (libDialog->result() == QDialog::Rejected) libraryList = oldLibraryList; else { scene->setLibList(libraryList); + QDomDocument backUp = scene->toXmlFormat(); updateLibraries(); - } - + scene->cleanScene(); + scene->fromXmlFormat(backUp); + } + libDialog->close(); return 0; } @@ -905,6 +1416,8 @@ void MainWindow::createLibraryDialog() connect(libUi->addLib,SIGNAL(clicked()),this,SLOT(addLibPath())); connect(libUi->delLib,SIGNAL(clicked()),this,SLOT(delLibPath())); connect(libUi->editLib,SIGNAL(clicked()),this,SLOT(editLibPath())); + connect(libUi->upLib,SIGNAL(clicked()),this,SLOT(upLibPath())); + connect(libUi->downLib,SIGNAL(clicked()),this,SLOT(downLibPath())); } int MainWindow::codeForm() @@ -913,11 +1426,7 @@ int MainWindow::codeForm() { createCgDialog(); } - - cgDialog->setWindowTitle(tr("Code Generator...")); - cgUi->codeTextEdit->setAcceptRichText(true); - cgDialog->show(); - + cgDialog->show(); cgDialog->show(); //Dummy return 0; } @@ -926,10 +1435,30 @@ void MainWindow::createCgDialog() cgDialog = new QMainWindow(this); cgUi = new Ui_codeDialog; cgUi->setupUi(cgDialog); + connect(cgUi->updateButton,SIGNAL(clicked()),this,SLOT(cgGroupClicked())); + connect(cgUi->compileButton,SIGNAL(clicked()),this,SLOT(executeCompile())); + connect(cgUi->connectButton,SIGNAL(clicked()),this,SLOT(executeSSH())); + connect(cgUi->sendButton,SIGNAL(clicked()),this,SLOT(sendCommand())); + connect(cgUi->commandEdit,SIGNAL(returnPressed()),this,SLOT(sendCommand())); + connect(cgUi->fpgaButton,SIGNAL(clicked()),this,SLOT(configFPGA())); + connect(cgUi->exeButton,SIGNAL(clicked()),this,SLOT(exeOnSie())); + connect(cgUi->saveButton,SIGNAL(clicked()),this,SLOT(saveTemplates())); + connect(cgUi->killButton,SIGNAL(clicked()),this,SLOT(killProcess())); + connect(cgUi->lcdOnButton,SIGNAL(clicked()),this,SLOT(lcdOn())); + connect(cgUi->lcdOffButton,SIGNAL(clicked()),this,SLOT(lcdOff())); + + cgDialog->setWindowTitle(tr("Code Generator...")); + cgUi->codeTextEdit->setAcceptRichText(true); + cgUi->logTextEdit->setAcceptRichText(true); + cgUi->compileTextEdit->setAcceptRichText(true); + cgUi->sshTextEdit->setAcceptRichText(true); + cgUi->logTextEdit->setReadOnly(true); + cgUi->compileTextEdit->setReadOnly(true); + cgUi->sshTextEdit->setReadOnly(true); } void MainWindow::addLibPath() -{ +{ QString filePath = QFileDialog::getOpenFileName(this,"Open", currentDir(),"Custom block for SIE code generator (*.die)"); @@ -969,13 +1498,57 @@ void MainWindow::editLibPath() { QList selected = libUi->listLib->selectedItems(); if(selected.count()>0) - { - callexternapp("block_editor/blockeditor",selected.at(0)->text()); + { + QEventLoop waitToFinish; + callApp *openBlockEditor = new callApp( + tr("block_editor/blockeditor ") + selected.at(0)->text()); + connect(openBlockEditor, SIGNAL(appClosed()), + &waitToFinish, SLOT(quit())); + libDialog->setEnabled(false); + waitToFinish.exec(); + libDialog->setEnabled(true); + openBlockEditor->deleteProcess(); + openBlockEditor->deleteLater(); } } -int MainWindow::updateLibraries() +void MainWindow::upLibPath() { + QList selected = libUi->listLib->selectedItems(); + if(selected.count()>0) + { + int idx = libraryList.indexOf(selected.first()->text()); + if(idx>0) + { + libraryList.move(idx,idx-1); + libUi->listLib->clear(); + libUi->listLib->addItems(libraryList); + libUi->listLib->setCurrentRow(idx-1); + } + } +} + +void MainWindow::downLibPath() +{ + QList selected = libUi->listLib->selectedItems(); + if(selected.count()>0) + { + int idx = libraryList.indexOf(selected.first()->text()); + if(idxlistLib->clear(); + libUi->listLib->addItems(libraryList); + libUi->listLib->setCurrentRow(idx+1); + } + } +} + + +int MainWindow::updateLibraries() +{ + // TODO: the update lib generate segmentartion fault on CG process + // update the DomElement of each block is needed. libraryList=scene->getLibList(); createToolBox(); return 0; @@ -984,10 +1557,119 @@ int MainWindow::updateLibraries() int MainWindow::optionsForm() { - + if(!optionsDialog) + createOptionsDialog(); + optionsDialog->setModal(1); + optUi->templateDir->setText(templateDir); + optUi->templateFile->setText(templateFile); + optUi->makeFile->setText(makeFile); + optUi->workDir->setText(workDir); + optUi->executableFile->setText(executableFile); + optUi->mipsToolChainDir->setText(mipsToolChainDir); + optUi->mipsToolChain->setText(mipsToolChain); + optUi->sieWorkDir->setText(sieWorkDir); + optUi->fpgaFile->setText(fpgaFile); + optUi->sieIP->setText(sieIP); + optUi->configApp->setText(configApp); + optionsDialog->exec(); + if(optionsDialog->result() == QDialog::Accepted) + { + templateDir = optUi->templateDir->text(); + templateFile = optUi->templateFile->text(); + makeFile = optUi->makeFile->text(); + workDir = optUi->workDir->text(); + executableFile = optUi->executableFile->text(); + mipsToolChainDir = optUi->mipsToolChainDir->text(); + mipsToolChain = optUi->mipsToolChain->text(); + sieWorkDir = optUi->sieWorkDir->text(); + fpgaFile = optUi->fpgaFile->text(); + sieIP = optUi->sieIP->text(); + configApp = optUi->configApp->text(); + } + optionsDialog->close(); return 0; } +void MainWindow::createOptionsDialog() +{ + optionsDialog = new QDialog(this); + optUi = new Ui_optionsDialog; + optUi->setupUi(optionsDialog); + connect(optUi->templateButton,SIGNAL(clicked()),SLOT(editTemplateDir())); + connect(optUi->workButton,SIGNAL(clicked()),SLOT(editWorkDir())); + connect(optUi->fpgaButton,SIGNAL(clicked()),SLOT(editFPGABinary())); + connect(optUi->toolchainButton,SIGNAL(clicked()),this,SLOT(editToolChain())); +} + +void MainWindow::editToolChain() +{ + QString + filePath = QFileDialog::getExistingDirectory(this, + "Select the toolchain directory...", + optUi->mipsToolChainDir->text()); + + if(filePath.isEmpty()) + return; + + QDir myCurrentDir = this->currentDir(); + QString relativePath= myCurrentDir.relativeFilePath(filePath); + optUi->mipsToolChainDir->setText(relativePath); +} + +void MainWindow::editTemplateDir() +{ + QString + filePath = QFileDialog::getExistingDirectory(this, + "Select the template directory", + optUi->templateDir->text()); + + if(filePath.isEmpty()) + return; + + QDir myCurrentDir = this->currentDir(); + QString relativePath= myCurrentDir.relativeFilePath(filePath); + optUi->templateDir->setText(relativePath); +} + + +void MainWindow::editWorkDir() +{ + QString + filePath = QFileDialog::getExistingDirectory(this, + "Select the work directory", + optUi->workDir->text()); + + if(filePath.isEmpty()) + return; + + QDir myCurrentDir = this->currentDir(); + QString relativePath= myCurrentDir.relativeFilePath(filePath); + optUi->workDir->setText(relativePath); +} + +void MainWindow::editFPGABinary() +{ + QString + filePath = QFileDialog::getOpenFileName(this, + "Select the FPGA binary file", + optUi->fpgaFile->text(), + "Binary file for SIE FPGA (*.bit)"); + + if(filePath.isEmpty()) + return; + + if(!QFileInfo(filePath).isReadable()) + { + QMessageBox::critical(this,"Error","File is not readable " + " or not exists."); + return; + } + + QDir myCurrentDir = this->currentDir(); + QString relativePath= myCurrentDir.relativeFilePath(filePath); + optUi->fpgaFile->setText(relativePath); +} + QString MainWindow::callexternapp(QString xexecFile, QString xexecParm) { QEventLoop cxaw; @@ -1000,4 +1682,253 @@ QString MainWindow::callexternapp(QString xexecFile, QString xexecParm) return cxat.retnValu; } +void MainWindow::finishSSH() +{ + if(sieSSH!=0) + sieSSH->deleteProcess(); + sieSSH->deleteLater(); + sieSSH=0; + sshReady=0; + cgUi->exeButton->setEnabled(false); + cgUi->fpgaButton->setEnabled(false); + cgUi->sendButton->setEnabled(false); + cgUi->commandEdit->setEnabled(false); + cgUi->killButton->setEnabled(false); + cgUi->lcdOnButton->setEnabled(false); + cgUi->lcdOffButton->setEnabled(false); + cgUi->connectButton->setText("Init SS&H on SIE"); + cgUi->logTextEdit->append(tr("SSH process killed")); + cgUi->outputsTab->setCurrentIndex(0); +} +void MainWindow::executeSSH() +{ + if(sieSSH!=0) + finishSSH(); + sieSSH = new callApp(tr("ssh root@") + sieIP); + connect(sieSSH,SIGNAL(newData()),this,SLOT(readSSH())); + connect(sieSSH,SIGNAL(appClosed()),this,SLOT(finishSSH())); + cgUi->logTextEdit->append(tr("Executing command: ") + + tr("ssh root@") + sieIP); + cgUi->logTextEdit->append(tr("WARNING*** You have to configure SIE Ethernet" + " Gadget connection previously (USB0).")); + cgUi->outputsTab->setCurrentIndex(2); + sshReady=0; + cgUi->connectButton->setText("Connecting..."); +} + +void MainWindow::readSSH() +{ + if(sieSSH!=0) + { + QString newData = sieSSH->readData(); + cgUi->sshTextEdit->append(newData); + //TODO: Another better metode to detect ssh terminal ready? + if(newData.contains("|__| W I R E L E S S F R E E D O M")) + { + sshReady=1; + cgUi->logTextEdit->append(tr("Creating work directory on SIE")); + writeSSH(tr("mkdir ") + sieWorkDir + "\n"); + writeSSH(tr("mkdir ") + sieWorkDir + + "/" +executableFile + "/ \n"); + //TODO: find another better metode to mkdir! + QString command = tr("cd ") + sieWorkDir + tr("/") + + executableFile + tr("/"); + writeSSH("echo \"root@host: "+command+tr("\"\n")); + writeSSH(command + tr("\n")); + cgUi->exeButton->setEnabled(true); + cgUi->fpgaButton->setEnabled(true); + cgUi->sendButton->setEnabled(true); + cgUi->commandEdit->setEnabled(true); + cgUi->killButton->setEnabled(true); + cgUi->lcdOnButton->setEnabled(true); + cgUi->lcdOffButton->setEnabled(true); + cgUi->connectButton->setText("Stop SS&H on SIE"); + } else if(newData.contains("s password:")) + { + writeSSH(tr("\n")); + } + } +} + +void MainWindow::sendCommand() +{ + writeSSH("echo \"root@host: "+cgUi->commandEdit->text()+tr("\"\n")); + writeSSH(cgUi->commandEdit->text()+tr(" &\n")); + cgUi->commandEdit->setText(""); +} + +void MainWindow::writeSSH(QString data) +{ + if(sieSSH!=0) + sieSSH->writeData(data); +} + +void MainWindow::finishCompile() +{ + if(compile!=0) + compile->deleteProcess(); + compile->deleteLater(); + compile=0; + cgUi->compileButton->setEnabled(true); +} + +void MainWindow::executeCompile() +{ + if(compile!=0) + finishCompile(); + QString tempWorkDir = workDir+"/"+executableFile+"/"; + QString command = + tr("make -C ") + tempWorkDir + tr(" -f ") + makeFile + " clean"; + cgUi->logTextEdit->append(tr("Executing command: ") + command ); + compile = new callApp(command); + usleep(1000000); //1s delay + command = tr("make -C ") + tempWorkDir + tr(" -f ") + makeFile; + cgUi->logTextEdit->append(tr("Executing command: ") + command ); + compile = new callApp(command); + connect(compile,SIGNAL(newData()),this,SLOT(readCompile())); + connect(compile,SIGNAL(appClosed()),this,SLOT(finishCompile())); + cgUi->compileButton->setEnabled(false); + cgUi->outputsTab->setCurrentIndex(1); +} + +void MainWindow::readCompile() +{ + if(compile!=0) + cgUi->compileTextEdit->append(compile->readData()); +} + +void MainWindow::configFPGA() +{ + QString tempFPGAFile = fpgaFile; + cgUi->logTextEdit->append(tr("WARNING*** Make sure before that the " + "SIE processor is not too loaded.")); + cgUi->fpgaButton->setEnabled(false); + cgUi->connectButton->setEnabled(false); + cgUi->exeButton->setEnabled(false); + cgUi->fpgaButton->setText("Configuring..."); + if(!copyFileToSie(tempFPGAFile)) + { + cgUi->logTextEdit->append(tr("ERROR*** FPGA binary file could not " + "be found. Make sure that this file {") + + tempFPGAFile + tr("} exists.")); + cgUi->outputsTab->setCurrentIndex(0); + } + else + { + cgUi->logTextEdit->append(tr("Programming FPGA with file ") + + tempFPGAFile ); + QString configCommand = configApp; + configCommand=configCommand.replace("$FPGA_BINARY", + QFileInfo(fpgaFile).fileName()); + writeSSH("echo \"root@host: "+configCommand+tr("\"\n")); + writeSSH(configCommand + tr("\n")); + cgUi->outputsTab->setCurrentIndex(2); + } + cgUi->fpgaButton->setEnabled(true); + cgUi->connectButton->setEnabled(true); + cgUi->exeButton->setEnabled(true); + cgUi->fpgaButton->setText("Configure &FPGA"); +} + +int MainWindow::copyFileToSie(QString filepath) +{ + + if(QFileInfo(filepath).exists()) + { + QEventLoop waitToFinish; + cgUi->logTextEdit->append(tr("Executing command: ") + + tr("scp ") + filepath + tr(" root@") + + sieIP + tr(":") + sieWorkDir + + "/"+executableFile + "/"); + + callApp copyFile(tr("scp ") + filepath + tr(" root@") + sieIP + + tr(":") + sieWorkDir + "/" + executableFile + "/"); + + connect(©File, SIGNAL(appClosed()), &waitToFinish, SLOT(quit())); + waitToFinish.exec(); + cgUi->logTextEdit->append(copyFile.readData()); + copyFile.deleteProcess(); + return 1; + } + return 0; +} + +void MainWindow::exeOnSie() +{ + QString tempSieApp = workDir + "/" + executableFile + "/" + executableFile; + + cgUi->fpgaButton->setEnabled(false); + cgUi->connectButton->setEnabled(false); + cgUi->exeButton->setEnabled(false); + cgUi->exeButton->setText("Running ..."); + killProcess(); + if(!copyFileToSie(tempSieApp)) + { + cgUi->logTextEdit->append(tr("ERROR*** SIE binary file could not " + "be found. Make sure that the application" + " was compiled.")); + cgUi->outputsTab->setCurrentIndex(0); + } + else + { + cgUi->logTextEdit->append(tr("Executing binary file on SIE.") + + tempSieApp ); + QString Command = "./" + executableFile + " &"; + writeSSH("echo \"root@host: "+Command+tr("\"\n")); + writeSSH(Command + tr("\n")); + cgUi->outputsTab->setCurrentIndex(2); + } + cgUi->fpgaButton->setEnabled(true); + cgUi->connectButton->setEnabled(true); + cgUi->exeButton->setEnabled(true); + cgUi->exeButton->setText("&Excecute on SIE"); +} + +void MainWindow::killProcess() +{ + cgUi->logTextEdit->append(tr("Stoping all running process...")); + writeSSH("killall -9 " + executableFile + tr("\n")); + usleep(200000); //wait 200ms +} + +void MainWindow::lcdOn() +{ + cgUi->logTextEdit->append(tr("Turning On LCD...")); + writeSSH(tr("echo 0 > /sys/class/graphics/fb0/blank \n")); + usleep(200000); //wait 200ms +} + +void MainWindow::lcdOff() +{ + cgUi->logTextEdit->append(tr("Turning Off LCD...")); + writeSSH(tr("echo 4 > /sys/class/graphics/fb0/blank \n")); + usleep(200000); //wait 200ms +} + +//TODO: Change list for pointer list for consumption memory reduction + +void MainWindow::undoDiagram() +{ + if(!undoList.isEmpty()) + { + redoList.append(scene->toXmlFormat()); + scene->cleanScene(); + scene->fromXmlFormat(undoList.last()); + undoList.removeLast(); + } + fflush(stdout); +} + + +void MainWindow::redoDiagram() +{ + if(!redoList.isEmpty()) + { + undoList.append(scene->toXmlFormat()); + scene->cleanScene(); + scene->fromXmlFormat(redoList.last()); + redoList.removeLast(); + } + fflush(stdout); +} diff --git a/Software/sie_cg/mainwindow.h b/Software/sie_cg/mainwindow.h old mode 100644 new mode 100755 index 6502c13..d35dab5 --- a/Software/sie_cg/mainwindow.h +++ b/Software/sie_cg/mainwindow.h @@ -55,11 +55,16 @@ #include "arrow.h" #include "ui_librarydialog.h" #include "ui_codedialog.h" +#include "ui_optionsdialog.h" +#include "callapp.h" +class callApp; class DiagramScene; class DiagramTextItem; class DiagramItem; class Ui_libraryDialog; +class Ui_cgDialog; +class Ui_optionsDialog; class callexternappT; QT_BEGIN_NAMESPACE @@ -91,11 +96,31 @@ public: int updateLibraries(); QStatusBar *statusBar; + void setFontSettings(QFont font); + + // Options + QString templateDir; + QString templateFile; + QString makeFile; + QString workDir; + QString executableFile; + QString mipsToolChain; + QString mipsToolChainDir; + QString sieWorkDir; + QString fpgaFile; + QString sieIP; + QString configApp; + void writeSSH(QString); + + //Undo-Redo + QList undoList; + QList redoList; + bool dontDelete; private slots: void backgroundButtonGroupClicked(QAbstractButton *button); void buttonGroupClicked(int id); - void cgGroupClicked(int id); + void cgGroupClicked(); void deleteItem(); void pointerGroupClicked(int id); void bringToFront(); @@ -112,7 +137,6 @@ private slots: void fillButtonTriggered(); void lineButtonTriggered(); void handleFontChange(); - void itemSelected(QGraphicsItem *item); void about(); int newDiagram(QString pathFile=""); @@ -121,21 +145,52 @@ private slots: int saveAsDiagram(); int exportDiagram(); + void undoDiagram(); + void redoDiagram(); + + void setGridState(); + int libraryForm(); void addLibPath(); void delLibPath(); void editLibPath(); + void downLibPath(); + void upLibPath(); int optionsForm(); + void editTemplateDir(); + void editWorkDir(); + void editToolChain(); + void editFPGABinary(); int codeForm(); + void executeSSH(); + void finishSSH(); + void readSSH(); + void sendCommand(); + + void executeCompile(); + void finishCompile(); + void readCompile(); + + void configFPGA(); + void exeOnSie(); + + void saveTemplates(); + + void killProcess(); + void lcdOn(); + void lcdOff(); + private: + void cleanDomElementsByName(); int saveIfNeeded(); void addLibrariesButtons(QGridLayout *layout); QDomDocument parseDocument(QString filePath); void createLibraryDialog(); void createCgDialog(); + void createOptionsDialog(); void createToolBox(); void createActions(); void createMenus(); @@ -169,6 +224,9 @@ private: QAction *sendBackAction; QAction *aboutAction; + QAction *undoAction; + QAction *redoAction; + QMenu *fileMenu; QMenu *itemMenu; QMenu *preferencesMenu; @@ -195,6 +253,7 @@ private: QToolButton *fontColorToolButton; QToolButton *fillColorToolButton; QToolButton *lineColorToolButton; + QToolButton *gridButton; QAction *boldAction; QAction *underlineAction; QAction *italicAction; @@ -206,10 +265,57 @@ private: Ui_libraryDialog *libUi; QMainWindow *cgDialog; Ui_codeDialog *cgUi; + QDialog *optionsDialog; + Ui_optionsDialog * optUi; QStringList libraryList; - QHash domElementsByName; + QHash *domElementsByName; QHash buttonIdByName; - static QString callexternapp(QString xexecFile, QString xexecParm); + static QString callexternapp(QString xexecFile, QString xexecParm); + + void setDefaultOptions(){ + templateDir = "templates/basic"; + templateFile = "main.cpp"; + makeFile = "Makefile"; + workDir = "tmp"; + executableFile = "SIE_APP"; + mipsToolChainDir = ""; + mipsToolChain = "mipsel-openwrt-linux"; + sieWorkDir = "/tmp/CG"; + fpgaFile = "templates/basic/basic.bit"; + sieIP = "192.168.254.101"; + configApp = "xc3sprog $FPGA_BINARY"; + } + + /* CG */ + QString createPrototype(QList &textItems, + QList &ioTypes, + QList &ioNames, + QList &valueNames, + QList &values, + QString blockNameID, + QList &inputs, + QList &outputs); + + bool itemIsHead(DiagramItem * item); + bool itemIsEnd(DiagramItem * item); + QString getIoType(DiagramTextItem * item); + QString passItem(DiagramItem * item, + QList &passItems, + QList &passArrows, + QString &headerCode, + QString &initCode, + QString &blockCode, + QString &extraCode, + QString &mainCode, + QString &iosCode, + QString &warnings, + QString &errors); + + callApp *sieSSH; + callApp *compile; + bool sshReady; + int copyFileToSie(QString filepath); + QString appDir; }; class callexternappT : public QThread diff --git a/Software/sie_cg/moc_librarydialog.cpp b/Software/sie_cg/moc_librarydialog.cpp old mode 100644 new mode 100755 diff --git a/Software/sie_cg/optionsdialog.cpp b/Software/sie_cg/optionsdialog.cpp new file mode 100755 index 0000000..e9b7d90 --- /dev/null +++ b/Software/sie_cg/optionsdialog.cpp @@ -0,0 +1,26 @@ +#include "optionsdialog.h" +#include "ui_optionsdialog.h" + +optionsDialog::optionsDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::optionsDialog) +{ + ui->setupUi(this); +} + +optionsDialog::~optionsDialog() +{ + delete ui; +} + +void optionsDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} diff --git a/Software/sie_cg/optionsdialog.h b/Software/sie_cg/optionsdialog.h new file mode 100755 index 0000000..4f590f5 --- /dev/null +++ b/Software/sie_cg/optionsdialog.h @@ -0,0 +1,23 @@ +#ifndef OPTIONSDIALOG_H +#define OPTIONSDIALOG_H + +#include + +namespace Ui { + class optionsDialog; +} + +class optionsDialog : public QDialog { + Q_OBJECT +public: + optionsDialog(QWidget *parent = 0); + ~optionsDialog(); + +protected: + void changeEvent(QEvent *e); + +private: + Ui::optionsDialog *ui; +}; + +#endif // OPTIONSDIALOG_H diff --git a/Software/sie_cg/optionsdialog.ui b/Software/sie_cg/optionsdialog.ui new file mode 100755 index 0000000..4827af3 --- /dev/null +++ b/Software/sie_cg/optionsdialog.ui @@ -0,0 +1,426 @@ + + + optionsDialog + + + + 0 + 0 + 547 + 577 + + + + Dialog + + + + + + 0 + + + + General + + + + + + + + + 140 + 0 + + + + Template directory + + + + + + + templates/basic + + + + + + + + 30 + 25 + + + + ... + + + + + + + + + + + + 140 + 0 + + + + Main code template + + + + + + + main.cpp + + + + + + + + + + + + 140 + 0 + + + + Makefile template + + + + + + + Makefile + + + + + + + + + + + + 140 + 0 + + + + Local work directory + + + + + + + tmp + + + + + + + + 30 + 25 + + + + ... + + + + + + + + + Qt::Horizontal + + + + + + + + + + 140 + 0 + + + + Executable name + + + + + + + SIE_APP + + + + + + + + + + + + 140 + 0 + + + + FPGA binary file + + + + + + + templates/FPGA_binarys/basic.bit + + + + + + + + 30 + 25 + + + + ... + + + + + + + + + Qt::Horizontal + + + + + + + + + + 140 + 0 + + + + Toolchain directory + + + + + + + + + + + + + + + 30 + 25 + + + + ... + + + + + + + + + + + + 140 + 0 + + + + Toolchain base name + + + + + + + mipsel-openwrt-linux + + + + + + + + + Qt::Horizontal + + + + + + + + + + 140 + 0 + + + + SIE work directory + + + + + + + /tmp/CG + + + + + + + + + + + + 140 + 0 + + + + SIE USB0 ip + + + + + + + 192.168.254.101 + + + + + + + + + + + + 140 + 0 + + + + SIE configuration command + + + + + + + xcs3prog $FPGA_BINARY + + + + + + + + + + + + + + + Options will be saved when you save your diagram... + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + buttonBox + accepted() + optionsDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + optionsDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/Software/sie_cg/templates/basic (copy)/Makefile b/Software/sie_cg/templates/basic (copy)/Makefile new file mode 100755 index 0000000..1f60216 --- /dev/null +++ b/Software/sie_cg/templates/basic (copy)/Makefile @@ -0,0 +1,46 @@ +CC = ![MIPS TOOLCHAIN]-gcc +CXX = ![MIPS TOOLCHAIN]-g++ +CFLAGS = -pipe -O2 -Wall +CXXFLAGS = -pipe -O2 -Wall +INCPATH = -I. +LINK = ![MIPS TOOLCHAIN]-g++ +LFLAGS = -Wl,-O1 +LIBS = -L/usr/lib +AR = ![MIPS TOOLCHAIN]-ar cqs +RANLIB = ![MIPS TOOLCHAIN]-ranlib +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +MKDIR = mkdir -p +TARGET = ![SIE APP NAME] + + +OBJECTS = ![MAIN OBJECT] \ + jz_adc_peripheral.o \ + jz47xx_gpio.o \ + jz47xx_mmap.o + +all: $(TARGET) + +$(TARGET): $(OBJECTS) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) + +![MAIN OBJECT]: ![MAIN TEMPLATE] \ + jz_adc_peripheral.h \ + jz47xx_mmap.h \ + jz47xx_gpio.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp + +jz_adc_peripheral.o: jz_adc_peripheral.cpp jz_adc_peripheral.h \ + jz47xx_mmap.h \ + jz47xx_gpio.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o jz_adc_peripheral.o jz_adc_peripheral.cpp + +jz47xx_gpio.o: jz47xx_gpio.cpp jz47xx_gpio.h \ + jz47xx_mmap.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o jz47xx_gpio.o jz47xx_gpio.cpp + +jz47xx_mmap.o: jz47xx_mmap.cpp jz47xx_mmap.h \ + jz47xx_gpio.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o jz47xx_mmap.o jz47xx_mmap.cpp diff --git a/Software/sie_cg/templates/basic (copy)/basic.bit b/Software/sie_cg/templates/basic (copy)/basic.bit new file mode 100755 index 0000000000000000000000000000000000000000..d1ad2ab84557c47c02cd55c00f7e33649c9f2c36 GIT binary patch literal 283852 zcmeHwdyE{(d0%z!>~eN*NDg_tgn`IIi^mv*LP^8BlRyYW(mc}=VaS(_VcLNH(b|#@ zNgyO^*>Dbs02S}fGOb*!4J0LqV*wlaAB7-vgdM;Jq(CE|VbKyJoeh+V{^dXa z*hhZz!=HH9zxc>U#jlCZBfs&UUhiYS_3IaUJ@FB7-^0BNy>|!iefNc)_^4RF@SgWQ z^2q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vj`7cJiS z9vuSA^ds9MpeczC4dNtaEYzlQx6MVhA&yRgEo5@8VIwL9CXYFm;c`ea(u!oV1(M-I zSCkZ;R^{4mLdHtl+)8VjLC_`Ib`>r$ophtP(x7H5NM6QvEw^0W%NOhDc-lwAc@pS~ zf5>9HfmjW=pf+5H)3z$^#0*{PWI3*gAYbXUb1_Y`KeE&10T3l>a6750XgaHi1T3O4 z$ChHObg78mG}hvJZJ+7e=Fhr&kJu28S|Xd<@!yFGy;$f775(-GS!lO6I;x93IwlA~ zGPF}j`tv-&dk+22Nk@Vlraq9QYJ%-NxjY`J?HfKhSLwRi%7PG#kds+mhi%CXTZr-` z(h;+;K=8P!D_suLU6-jwg6#^fOqQ*1XbMqKu22CjiO>Cfm5wI`rmYK|Ydd~h$%lTZ zxS`OwBJwv{FQ<;D6HYeQRJpC$N$kFor{vU)f00e*l5MTt>FZR?kLSn<@D* +#include +#include + +#include +#include + + +#define JZ_GPIO_BASE 0x10010000 + +void +jz_gpio_as_output (JZ_PIO * pio, unsigned int o) +{ + pio->PXFUNC = (1 << (o)); + pio->PXSELC = (1 << (o)); + pio->PXDIRS = (1 << (o)); +} + +void +jz_gpio_as_input (JZ_PIO * pio, unsigned int o) +{ + pio->PXFUNC = (1 << (o)); + pio->PXSELC = (1 << (o)); + pio->PXDIRC = (1 << (o)); +} + +void +jz_gpio_set_pin (JZ_PIO * pio, unsigned int o) +{ + pio->PXDATS = (1 << (o)); +} + +void +jz_gpio_clear_pin (JZ_PIO * pio, unsigned int o) +{ + pio->PXDATC = (1 << (o)); +} + +void +jz_gpio_out (JZ_PIO * pio, unsigned int o, unsigned int val) +{ + if (val == 0) + pio->PXDATC = (1 << (o)); + else + pio->PXDATS = (1 << (o)); +} + +unsigned int +jz_gpio_get_pin (JZ_PIO * pio, unsigned int o) +{ + return (pio->PXPIN & (1 << o)) ? 1 : 0; +} + +int +jz_gpio_as_func (JZ_PIO * pio, unsigned int o, int func) +{ + switch (func) + { + case 0: + pio->PXFUNS = (1 << o); + pio->PXTRGC = (1 << o); + pio->PXSELC = (1 << o); + return 1; + + case 1: + pio->PXFUNS = (1 << o); + pio->PXTRGC = (1 << o); + pio->PXSELS = (1 << o); + return 1; + + case 2: + pio->PXFUNS = (1 << o); + pio->PXTRGS = (1 << o); + pio->PXSELC = (1 << o); + return 1; + } + return 0; +} + +JZ_PIO * +jz_gpio_map (int port) +{ + JZ_PIO *pio; + + pio = (JZ_PIO *) jz_mmap (JZ_GPIO_BASE); + pio = (JZ_PIO *) ((unsigned int) pio + port * 0x100); + + return pio; +} diff --git a/Software/sie_cg/templates/basic (copy)/jz47xx_gpio.h b/Software/sie_cg/templates/basic (copy)/jz47xx_gpio.h new file mode 100755 index 0000000..d8b0113 --- /dev/null +++ b/Software/sie_cg/templates/basic (copy)/jz47xx_gpio.h @@ -0,0 +1,84 @@ +/* + JZ47xx GPIO at userspace + + Copyright (C) 2010 Andres Calderon andres.calderon@emqbit.com + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef __jz47xx_gpio_h__ +#define __jz47xx_gpio_h__ + +#define JZ_GPIO_PORT_A 0 +#define JZ_GPIO_PORT_B 1 +#define JZ_GPIO_PORT_C 2 +#define JZ_GPIO_PORT_D 3 + +typedef volatile unsigned int JZ_REG; /* Hardware register definition */ + +typedef struct _JZ_PIO +{ + JZ_REG PXPIN; /* PIN Level Register */ + JZ_REG Reserved0; + JZ_REG Reserved1; + JZ_REG Reserved2; + JZ_REG PXDAT; /* Port Data Register */ + JZ_REG PXDATS; /* Port Data Set Register */ + JZ_REG PXDATC; /* Port Data Clear Register */ + JZ_REG Reserved3; + JZ_REG PXIM; /* Interrupt Mask Register */ + JZ_REG PXIMS; /* Interrupt Mask Set Reg */ + JZ_REG PXIMC; /* Interrupt Mask Clear Reg */ + JZ_REG Reserved4; + JZ_REG PXPE; /* Pull Enable Register */ + JZ_REG PXPES; /* Pull Enable Set Reg. */ + JZ_REG PXPEC; /* Pull Enable Clear Reg. */ + JZ_REG Reserved5; + JZ_REG PXFUN; /* Function Register */ + JZ_REG PXFUNS; /* Function Set Register */ + JZ_REG PXFUNC; /* Function Clear Register */ + JZ_REG Reserved6; + JZ_REG PXSEL; /* Select Register */ + JZ_REG PXSELS; /* Select Set Register */ + JZ_REG PXSELC; /* Select Clear Register */ + JZ_REG Reserved7; + JZ_REG PXDIR; /* Direction Register */ + JZ_REG PXDIRS; /* Direction Set Register */ + JZ_REG PXDIRC; /* Direction Clear Register */ + JZ_REG Reserved8; + JZ_REG PXTRG; /* Trigger Register */ + JZ_REG PXTRGS; /* Trigger Set Register */ + JZ_REG PXTRGC; /* Trigger Set Register */ + JZ_REG Reserved9; + JZ_REG PXFLG; /* Port Flag Register */ + JZ_REG PXFLGC; /* Port Flag clear Register */ +} JZ_PIO, *PJZ_PIO; + +void jz_gpio_as_output (JZ_PIO * pio, unsigned int o); + +void jz_gpio_as_input (JZ_PIO * pio, unsigned int o); + +void jz_gpio_set_pin (JZ_PIO * pio, unsigned int o); + +void jz_gpio_clear_pin (JZ_PIO * pio, unsigned int o); + +void jz_gpio_out (JZ_PIO * pio, unsigned int o, unsigned int val); + +unsigned int jz_gpio_get_pin (JZ_PIO * pio, unsigned int o); + +int jz_gpio_as_func (JZ_PIO * pio, unsigned int o, int func); + +JZ_PIO *jz_gpio_map (int port); + +#endif diff --git a/Software/sie_cg/templates/basic (copy)/jz47xx_mmap.cpp b/Software/sie_cg/templates/basic (copy)/jz47xx_mmap.cpp new file mode 100755 index 0000000..0ff32cf --- /dev/null +++ b/Software/sie_cg/templates/basic (copy)/jz47xx_mmap.cpp @@ -0,0 +1,53 @@ +/* + * JZ47xx GPIO lines + * + * Written 2010 by Andres Calderon andres.calderon@emqbit.com + */ + +#include "jz47xx_mmap.h" + +unsigned int * +jz_mmap (off_t address) +{ + int fd; + + unsigned int *pio; + + if ((fd = open ("/dev/mem", O_RDWR | O_SYNC)) == -1) + { + fprintf (stderr, "Cannot open /dev/mem.\n"); + return 0; + } + + pio = (unsigned int *) mmap (0, getpagesize (), PROT_READ | PROT_WRITE, MAP_SHARED, fd, address); + + if (pio == (unsigned int *) -1) + { + fprintf (stderr, "Cannot mmap.\n"); + return 0; + } + + return pio; +} + +void +jz_cs2_init() +{ + JZ_PIO *pio; + + pio = jz_gpio_map (CS2_PORT); + jz_gpio_as_func (pio, CS2_PIN, 0); + + virt_addr = (JZ_REG *) (jz_mmap(0x13010000) + 0x18); + + if (*virt_addr != 0x0FFF7700) + { + *virt_addr = 0x0FFF7700; + printf ("ADC: Configuring CS2 8 bits and 0 WS: %08X\n", *virt_addr); + } + else + printf ("ADC: CS2, already configured: %08X\n", *virt_addr); + + virt_addr = (JZ_REG *) jz_mmap (0x14000000); +} + diff --git a/Software/sie_cg/templates/basic (copy)/jz47xx_mmap.h b/Software/sie_cg/templates/basic (copy)/jz47xx_mmap.h new file mode 100755 index 0000000..612d427 --- /dev/null +++ b/Software/sie_cg/templates/basic (copy)/jz47xx_mmap.h @@ -0,0 +1,30 @@ +/* + * JZ47xx GPIO lines + * + * Written 2010 by Andres Calderon andres.calderon@emqbit.com + */ + +#ifndef __jz47xx_mmap_h__ +#define __jz47xx_mmap_h__ + +#include +#include +#include +#include +#include +#include +#include + +#include "jz47xx_gpio.h" + + +#define CS2_PORT JZ_GPIO_PORT_B +#define CS2_PIN 26 + +JZ_REG *virt_addr; + +unsigned int * jz_mmap (off_t address); + +void jz_cs2_init(); + +#endif diff --git a/Software/sie_cg/templates/basic (copy)/jz_adc_peripheral.cpp b/Software/sie_cg/templates/basic (copy)/jz_adc_peripheral.cpp new file mode 100755 index 0000000..9e45eb2 --- /dev/null +++ b/Software/sie_cg/templates/basic (copy)/jz_adc_peripheral.cpp @@ -0,0 +1,48 @@ +/* ADC Peripheral.c + +Copyright (C) 2010 Carlos Camargo cicamargoba@unal.edu.co + Andres Calderon andres.calderon@emqbit.com + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include +#include + +#include "jz_adc_peripheral.h" + +void ADCTest() +{ + +} + +void ADCPowerDown() +{ + +} + +JZ_REG * ADCTakeSamples(int CHANNEL) +{ + +} + +void ADCConfig(uchar CMD) +{ + +} + +int ADCCheckBufferFull() +{ + +} diff --git a/Software/sie_cg/templates/basic (copy)/jz_adc_peripheral.h b/Software/sie_cg/templates/basic (copy)/jz_adc_peripheral.h new file mode 100755 index 0000000..6ecf9dc --- /dev/null +++ b/Software/sie_cg/templates/basic (copy)/jz_adc_peripheral.h @@ -0,0 +1,87 @@ +/* ADC Peripheral.h + +Copyright (C) 2010 Carlos Camargo cicamargoba@unal.edu.co + Andres Calderon andres.calderon@emqbit.com + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef __adc_peripheral_h__ +#define __adc_peripheral_h__ + +#include "jz47xx_mmap.h" + +#define ADC_CMD_NONE 0x00 /* Nothing to do */ +#define ADC_CMD_SET_SPI_CLKDIV 0x00 /* Set clock divider for ADC sclk */ +#define ADC_CMD_SET_BUFFER_SIZE 0x00 /* Set clock divider for ADC sclk */ + +#define ADC_CMD_SET_CHANNEL0 0x30 /* Set channel 0 */ +#define ADC_CMD_READ_CHANNEL0 0x20 /* Read channel 0 */ + +#define ADC_CMD_SET_CHANNEL1 0x31 /* Set channel 1 */ +#define ADC_CMD_READ_CHANNEL1 0x21 /* Read channel 1 */ + +#define ADC_CMD_SET_CHANNEL2 0x32 /* Set channel 2 */ +#define ADC_CMD_READ_CHANNEL2 0x22 /* Read channel 2 */ + +#define ADC_CMD_SET_CHANNEL3 0x33 /* Set channel 3 */ +#define ADC_CMD_READ_CHANNEL3 0x23 /* Read channel 3 */ + +#define ADC_CMD_SET_CHANNEL4 0x34 /* Set channel 4 */ +#define ADC_CMD_READ_CHANNEL4 0x24 /* Read channel 4 */ + +#define ADC_CMD_SET_CHANNEL5 0x35 /* Set channel 5 */ +#define ADC_CMD_READ_CHANNEL5 0x25 /* Read channel 5 */ + +#define ADC_CMD_SET_CHANNEL6 0x36 /* Set channel 6 */ +#define ADC_CMD_READ_CHANNEL6 0x26 /* Read channel 6 */ + +#define ADC_CMD_SET_CHANNEL7 0x37 /* Set channel 7 */ +#define ADC_CMD_READ_CHANNEL7 0x27 /* Read channel 8 */ + +#define ADC_CMD_SET_POWER_DOWN 0X38 /* Set ADC power down mode (1uA) */ + +#define ADC_CMD_SET_FAST_CONV 0X39 /* Initialize ADC Fast Convertion(<10us)*/ + +#define ADC_CMD_SET_LOW_CONV 0X3A /* Initialize ADC Slow Convertion(<40us)*/ + +#define ADC_CMD_SET_AUTOSELFT_1 0x3B /* Set Autoselft ADC {(Vref+)-(Vref-)}/2*/ +#define ADC_CMD_READ_AUTOSELFT_1 0x2B /* Read Autoselft ADC 1 (0x0200) */ + +#define ADC_CMD_SET_AUTOSELFT_2 0x3C /* Set Autoselft ADC (Vref-) */ +#define ADC_CMD_READ_AUTOSELFT_2 0x2C /* Read Autoselft ADC 2 (0x0000) */ + +#define ADC_CMD_SET_AUTOSELFT_3 0x3D /* Set Autoselft ADC (Vref+) */ +#define ADC_CMD_READ_AUTOSELFT_3 0x2D /* Read Autoselft ADC 3 (0x03FF) */ + +#define ADC_SPI_CLKDIV_MIN 0x08 /* 50/(2*9) -> 2.78MHz (MAX=2.8MHz) */ +#define ADC_SPI_CLKDIV_MAX 0xFF /* 50/(2*256) -> 97.65KHz */ + +#define ADC_MAX_BUFFER 0x3FE/* 1022 reads/commands */ + + +typedef unsigned char uchar; + +void ADCTest(); +void ADCPowerDown(); +JZ_REG * ADCTakeSamples(int CHANNEL); +void ADCConfig(uchar CMD); +int ADCCheckBufferFull(); + +uchar ADC_SPI_CLKDIV; +int ADC_BUFFER_LEN; +int ADC_BUFFER_OFFSET; +uchar ADC_MUX_CHANNELS; + +#endif diff --git a/Software/sie_cg/templates/basic (copy)/main.cpp b/Software/sie_cg/templates/basic (copy)/main.cpp new file mode 100755 index 0000000..17c4e39 --- /dev/null +++ b/Software/sie_cg/templates/basic (copy)/main.cpp @@ -0,0 +1,18 @@ +/***![HEADER SECTION]***/ + +/***![BLOCK SECTION]***/ + +/***![EXTRA SECTION]***/ + +int main() +{ + /***![INIT SECTION]***/ + + /***![IO SECTION]***/ + + /***![MAIN SECTION]***/ + + return 0; +} + + diff --git a/Software/sie_cg/templates/basic/Makefile b/Software/sie_cg/templates/basic/Makefile new file mode 100755 index 0000000..97aeeab --- /dev/null +++ b/Software/sie_cg/templates/basic/Makefile @@ -0,0 +1,63 @@ +TOOLCHAIN_BASE= ![MIPS TOOLCHAIN]/![MIPS TOOLCHAIN BASE] +CC = ${TOOLCHAIN_BASE}-gcc +CXX = ${TOOLCHAIN_BASE}-g++ +INCPATH = -I. +CFLAGS = ${INCPATH} -pipe -O2 -mips32 -mtune=mips32 -Wall +CXXFLAGS = ${INCPATH} -pipe -O2 -mips32 -mtune=mips32 -Wall +LINK = ${TOOLCHAIN_BASE}-g++ +LFLAGS = -Wl,-O1 +LIBS = -lstdc++ +AR = ${TOOLCHAIN_BASE}-ar cqs +RANLIB = ${TOOLCHAIN_BASE}-ranlib +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +MKDIR = mkdir -p +TARGET = ![SIE APP NAME] + + +OBJECTS = ![MAIN OBJECT] \ + jz_adc_peripheral.o \ + jz_fpga_init.o \ + jz47xx_gpio.o \ + jz47xx_mmap.o \ + fbutils.o + +#BUILD RULES +all: $(TARGET) + +$(TARGET): $(OBJECTS) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) + +fbutils.o: fbutils.c fbutils.h + $(CC) $(CFLAGS) $(INCPATH) -c $< -o $@ + +jz47xx_gpio.o: jz47xx_gpio.cpp \ + jz47xx_mmap.h + $(CXX) $(CXXFLAGS) $(INCPATH) -c $< -o $@ + +jz47xx_mmap.o: jz47xx_mmap.cpp \ + jz47xx_gpio.h + $(CXX) $(CXXFLAGS) $(INCPATH) -c $< -o $@ + +jz_adc_peripheral.o: jz_adc_peripheral.cpp \ + jz_fpga_init.h \ + jz47xx_gpio.h \ + jz47xx_mmap.h + $(CXX) $(CXXFLAGS) $(INCPATH) -c $< -o $@ + +jz_fpga_init.o: jz_fpga_init.cpp \ + jz47xx_gpio.h \ + jz47xx_mmap.h + $(CXX) $(CXXFLAGS) $(INCPATH) -c $< -o $@ + +![MAIN OBJECT]: ![MAIN TEMPLATE] \ + jz_adc_peripheral.h \ + jz_fpga_init.h + $(CXX) $(CXXFLAGS) $(INCPATH) -c $< -o $@ + + +clean: + $(DEL_FILE) *.o $(TARGET) + diff --git a/Software/sie_cg/templates/basic/basic.bit b/Software/sie_cg/templates/basic/basic.bit new file mode 100755 index 0000000000000000000000000000000000000000..d1ad2ab84557c47c02cd55c00f7e33649c9f2c36 GIT binary patch literal 283852 zcmeHwdyE{(d0%z!>~eN*NDg_t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r>VMQ=&a6`~W;pA_QMw)pvWxF-*bmFt~H#m_Bz+h?YIg#RV_ z^UhH}TorBl7gDzfUvv*k%8{mkKuA8ew4d%3;jOo+KZKCt9L|n3DwE%yAQwk_+K<<# z(SNQhPJP_xcSh(x(lij@(eB-#%_Yja{)YIPFZ^xdwD+gsez|=3wz;0PB_Vj`7cJiS z9vuSA^ds9MpeczC4dNtaEYzlQx6MVhA&yRgEo5@8VIwL9CXYFm;c`ea(u!oV1(M-I zSCkZ;R^{4mLdHtl+)8VjLC_`Ib`>r$ophtP(x7H5NM6QvEw^0W%NOhDc-lwAc@pS~ zf5>9HfmjW=pf+5H)3z$^#0*{PWI3*gAYbXUb1_Y`KeE&10T3l>a6750XgaHi1T3O4 z$ChHObg78mG}hvJZJ+7e=Fhr&kJu28S|Xd<@!yFGy;$f775(-GS!lO6I;x93IwlA~ zGPF}j`tv-&dk+22Nk@Vlraq9QYJ%-NxjY`J?HfKhSLwRi%7PG#kds+mhi%CXTZr-` z(h;+;K=8P!D_suLU6-jwg6#^fOqQ*1XbMqKu22CjiO>Cfm5wI`rmYK|Ydd~h$%lTZ zxS`OwBJwv{FQ<;D6HYeQRJpC$N$kFor{vU)f00e*l5MTt>FZR?kLSn<@D* +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "fbutils.h" + + +static unsigned char fontdata_8x8[FONTDATAMAX] = { + + /* 0 0x00 '^@' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 1 0x01 '^A' */ + 0x7e, /* 01111110 */ + 0x81, /* 10000001 */ + 0xa5, /* 10100101 */ + 0x81, /* 10000001 */ + 0xbd, /* 10111101 */ + 0x99, /* 10011001 */ + 0x81, /* 10000001 */ + 0x7e, /* 01111110 */ + + /* 2 0x02 '^B' */ + 0x7e, /* 01111110 */ + 0xff, /* 11111111 */ + 0xdb, /* 11011011 */ + 0xff, /* 11111111 */ + 0xc3, /* 11000011 */ + 0xe7, /* 11100111 */ + 0xff, /* 11111111 */ + 0x7e, /* 01111110 */ + + /* 3 0x03 '^C' */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + + /* 4 0x04 '^D' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + + /* 5 0x05 '^E' */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + + /* 6 0x06 '^F' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + + /* 7 0x07 '^G' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 8 0x08 '^H' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xe7, /* 11100111 */ + 0xc3, /* 11000011 */ + 0xc3, /* 11000011 */ + 0xe7, /* 11100111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 9 0x09 '^I' */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x42, /* 01000010 */ + 0x42, /* 01000010 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 10 0x0a '^J' */ + 0xff, /* 11111111 */ + 0xc3, /* 11000011 */ + 0x99, /* 10011001 */ + 0xbd, /* 10111101 */ + 0xbd, /* 10111101 */ + 0x99, /* 10011001 */ + 0xc3, /* 11000011 */ + 0xff, /* 11111111 */ + + /* 11 0x0b '^K' */ + 0x0f, /* 00001111 */ + 0x07, /* 00000111 */ + 0x0f, /* 00001111 */ + 0x7d, /* 01111101 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x78, /* 01111000 */ + + /* 12 0x0c '^L' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + + /* 13 0x0d '^M' */ + 0x3f, /* 00111111 */ + 0x33, /* 00110011 */ + 0x3f, /* 00111111 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x70, /* 01110000 */ + 0xf0, /* 11110000 */ + 0xe0, /* 11100000 */ + + /* 14 0x0e '^N' */ + 0x7f, /* 01111111 */ + 0x63, /* 01100011 */ + 0x7f, /* 01111111 */ + 0x63, /* 01100011 */ + 0x63, /* 01100011 */ + 0x67, /* 01100111 */ + 0xe6, /* 11100110 */ + 0xc0, /* 11000000 */ + + /* 15 0x0f '^O' */ + 0x18, /* 00011000 */ + 0xdb, /* 11011011 */ + 0x3c, /* 00111100 */ + 0xe7, /* 11100111 */ + 0xe7, /* 11100111 */ + 0x3c, /* 00111100 */ + 0xdb, /* 11011011 */ + 0x18, /* 00011000 */ + + /* 16 0x10 '^P' */ + 0x80, /* 10000000 */ + 0xe0, /* 11100000 */ + 0xf8, /* 11111000 */ + 0xfe, /* 11111110 */ + 0xf8, /* 11111000 */ + 0xe0, /* 11100000 */ + 0x80, /* 10000000 */ + 0x00, /* 00000000 */ + + /* 17 0x11 '^Q' */ + 0x02, /* 00000010 */ + 0x0e, /* 00001110 */ + 0x3e, /* 00111110 */ + 0xfe, /* 11111110 */ + 0x3e, /* 00111110 */ + 0x0e, /* 00001110 */ + 0x02, /* 00000010 */ + 0x00, /* 00000000 */ + + /* 18 0x12 '^R' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + + /* 19 0x13 '^S' */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* 20 0x14 '^T' */ + 0x7f, /* 01111111 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7b, /* 01111011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x00, /* 00000000 */ + + /* 21 0x15 '^U' */ + 0x3e, /* 00111110 */ + 0x61, /* 01100001 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x86, /* 10000110 */ + 0x7c, /* 01111100 */ + + /* 22 0x16 '^V' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 23 0x17 '^W' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + + /* 24 0x18 '^X' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 25 0x19 '^Y' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 26 0x1a '^Z' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 27 0x1b '^[' */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xfe, /* 11111110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 28 0x1c '^\' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 29 0x1d '^]' */ + 0x00, /* 00000000 */ + 0x24, /* 00100100 */ + 0x66, /* 01100110 */ + 0xff, /* 11111111 */ + 0x66, /* 01100110 */ + 0x24, /* 00100100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 30 0x1e '^^' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 31 0x1f '^_' */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 32 0x20 ' ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 33 0x21 '!' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 34 0x22 '"' */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x24, /* 00100100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 35 0x23 '#' */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 36 0x24 '$' */ + 0x18, /* 00011000 */ + 0x3e, /* 00111110 */ + 0x60, /* 01100000 */ + 0x3c, /* 00111100 */ + 0x06, /* 00000110 */ + 0x7c, /* 01111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 37 0x25 '%' */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xcc, /* 11001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x66, /* 01100110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 38 0x26 '&' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 39 0x27 ''' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 40 0x28 '(' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + + /* 41 0x29 ')' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + + /* 42 0x2a '*' */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0xff, /* 11111111 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 43 0x2b '+' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 44 0x2c ',' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + + /* 45 0x2d '-' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 46 0x2e '.' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 47 0x2f '/' */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0x80, /* 10000000 */ + 0x00, /* 00000000 */ + + /* 48 0x30 '0' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 49 0x31 '1' */ + 0x18, /* 00011000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 50 0x32 '2' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x06, /* 00000110 */ + 0x1c, /* 00011100 */ + 0x30, /* 00110000 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 51 0x33 '3' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x06, /* 00000110 */ + 0x3c, /* 00111100 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 52 0x34 '4' */ + 0x1c, /* 00011100 */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x1e, /* 00011110 */ + 0x00, /* 00000000 */ + + /* 53 0x35 '5' */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 54 0x36 '6' */ + 0x38, /* 00111000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 55 0x37 '7' */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + + /* 56 0x38 '8' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 57 0x39 '9' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* 58 0x3a ':' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 59 0x3b ';' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + + /* 60 0x3c '<' */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + + /* 61 0x3d '=' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 62 0x3e '>' */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x00, /* 00000000 */ + + /* 63 0x3f '?' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 64 0x40 '@' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xde, /* 11011110 */ + 0xde, /* 11011110 */ + 0xde, /* 11011110 */ + 0xc0, /* 11000000 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* 65 0x41 'A' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 66 0x42 'B' */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 67 0x43 'C' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 68 0x44 'D' */ + 0xf8, /* 11111000 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + + /* 69 0x45 'E' */ + 0xfe, /* 11111110 */ + 0x62, /* 01100010 */ + 0x68, /* 01101000 */ + 0x78, /* 01111000 */ + 0x68, /* 01101000 */ + 0x62, /* 01100010 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 70 0x46 'F' */ + 0xfe, /* 11111110 */ + 0x62, /* 01100010 */ + 0x68, /* 01101000 */ + 0x78, /* 01111000 */ + 0x68, /* 01101000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* 71 0x47 'G' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xce, /* 11001110 */ + 0x66, /* 01100110 */ + 0x3a, /* 00111010 */ + 0x00, /* 00000000 */ + + /* 72 0x48 'H' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 73 0x49 'I' */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 74 0x4a 'J' */ + 0x1e, /* 00011110 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* 75 0x4b 'K' */ + 0xe6, /* 11100110 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0x78, /* 01111000 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* 76 0x4c 'L' */ + 0xf0, /* 11110000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x62, /* 01100010 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 77 0x4d 'M' */ + 0xc6, /* 11000110 */ + 0xee, /* 11101110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 78 0x4e 'N' */ + 0xc6, /* 11000110 */ + 0xe6, /* 11100110 */ + 0xf6, /* 11110110 */ + 0xde, /* 11011110 */ + 0xce, /* 11001110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 79 0x4f 'O' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 80 0x50 'P' */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* 81 0x51 'Q' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xce, /* 11001110 */ + 0x7c, /* 01111100 */ + 0x0e, /* 00001110 */ + + /* 82 0x52 'R' */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* 83 0x53 'S' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 84 0x54 'T' */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x5a, /* 01011010 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 85 0x55 'U' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 86 0x56 'V' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 87 0x57 'W' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 88 0x58 'X' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 89 0x59 'Y' */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 90 0x5a 'Z' */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x8c, /* 10001100 */ + 0x18, /* 00011000 */ + 0x32, /* 00110010 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 91 0x5b '[' */ + 0x3c, /* 00111100 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 92 0x5c '\' */ + 0xc0, /* 11000000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x02, /* 00000010 */ + 0x00, /* 00000000 */ + + /* 93 0x5d ']' */ + 0x3c, /* 00111100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 94 0x5e '^' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 95 0x5f '_' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + + /* 96 0x60 '`' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 97 0x61 'a' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 98 0x62 'b' */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x7c, /* 01111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + + /* 99 0x63 'c' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 100 0x64 'd' */ + 0x1c, /* 00011100 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 101 0x65 'e' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 102 0x66 'f' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x60, /* 01100000 */ + 0xf8, /* 11111000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* 103 0x67 'g' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0xf8, /* 11111000 */ + + /* 104 0x68 'h' */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x6c, /* 01101100 */ + 0x76, /* 01110110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* 105 0x69 'i' */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 106 0x6a 'j' */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + + /* 107 0x6b 'k' */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0x78, /* 01111000 */ + 0x6c, /* 01101100 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* 108 0x6c 'l' */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 109 0x6d 'm' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xec, /* 11101100 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0x00, /* 00000000 */ + + /* 110 0x6e 'n' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* 111 0x6f 'o' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 112 0x70 'p' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + + /* 113 0x71 'q' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0x1e, /* 00011110 */ + + /* 114 0x72 'r' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x76, /* 01110110 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* 115 0x73 's' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 116 0x74 't' */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0xfc, /* 11111100 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x36, /* 00110110 */ + 0x1c, /* 00011100 */ + 0x00, /* 00000000 */ + + /* 117 0x75 'u' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 118 0x76 'v' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 119 0x77 'w' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 120 0x78 'x' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 121 0x79 'y' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + + /* 122 0x7a 'z' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x4c, /* 01001100 */ + 0x18, /* 00011000 */ + 0x32, /* 00110010 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 123 0x7b '{' */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0e, /* 00001110 */ + 0x00, /* 00000000 */ + + /* 124 0x7c '|' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 125 0x7d '}' */ + 0x70, /* 01110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* 126 0x7e '~' */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 127 0x7f '' */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 128 0x80 '€' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0x78, /* 01111000 */ + + /* 129 0x81 '' */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 130 0x82 '‚' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 131 0x83 'ƒ' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 132 0x84 '„' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 133 0x85 '…' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 134 0x86 '†' */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 135 0x87 '‡' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x7e, /* 01111110 */ + 0x0c, /* 00001100 */ + 0x38, /* 00111000 */ + + /* 136 0x88 'ˆ' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 137 0x89 '‰' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 138 0x8a 'Š' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 139 0x8b '‹' */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 140 0x8c 'Œ' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 141 0x8d '' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 142 0x8e 'Ž' */ + 0xc6, /* 11000110 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 143 0x8f '' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 144 0x90 '' */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xf8, /* 11111000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 145 0x91 '‘' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0xd8, /* 11011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 146 0x92 '’' */ + 0x3e, /* 00111110 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xfe, /* 11111110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xce, /* 11001110 */ + 0x00, /* 00000000 */ + + /* 147 0x93 '“' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 148 0x94 '”' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 149 0x95 '•' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 150 0x96 '–' */ + 0x78, /* 01111000 */ + 0x84, /* 10000100 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 151 0x97 '—' */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 152 0x98 '˜' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + + /* 153 0x99 '™' */ + 0xc6, /* 11000110 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 154 0x9a 'š' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 155 0x9b '›' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 156 0x9c 'œ' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x64, /* 01100100 */ + 0xf0, /* 11110000 */ + 0x60, /* 01100000 */ + 0x66, /* 01100110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 157 0x9d '' */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 158 0x9e 'ž' */ + 0xf8, /* 11111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xfa, /* 11111010 */ + 0xc6, /* 11000110 */ + 0xcf, /* 11001111 */ + 0xc6, /* 11000110 */ + 0xc7, /* 11000111 */ + + /* 159 0x9f 'Ÿ' */ + 0x0e, /* 00001110 */ + 0x1b, /* 00011011 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* 160 0xa0 ' ' */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 161 0xa1 '¡' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 162 0xa2 '¢' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 163 0xa3 '£' */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 164 0xa4 '€' */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* 165 0xa5 '¥' */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0xe6, /* 11100110 */ + 0xf6, /* 11110110 */ + 0xde, /* 11011110 */ + 0xce, /* 11001110 */ + 0x00, /* 00000000 */ + + /* 166 0xa6 'Š' */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x3e, /* 00111110 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 167 0xa7 '§' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 168 0xa8 'š' */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x63, /* 01100011 */ + 0x3e, /* 00111110 */ + 0x00, /* 00000000 */ + + /* 169 0xa9 '©' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 170 0xaa 'ª' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 171 0xab '«' */ + 0x63, /* 01100011 */ + 0xe6, /* 11100110 */ + 0x6c, /* 01101100 */ + 0x7e, /* 01111110 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x0f, /* 00001111 */ + + /* 172 0xac '¬' */ + 0x63, /* 01100011 */ + 0xe6, /* 11100110 */ + 0x6c, /* 01101100 */ + 0x7a, /* 01111010 */ + 0x36, /* 00110110 */ + 0x6a, /* 01101010 */ + 0xdf, /* 11011111 */ + 0x06, /* 00000110 */ + + /* 173 0xad '­' */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 174 0xae '®' */ + 0x00, /* 00000000 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x66, /* 01100110 */ + 0x33, /* 00110011 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 175 0xaf '¯' */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0x66, /* 01100110 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 176 0xb0 '°' */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + + /* 177 0xb1 '±' */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + + /* 178 0xb2 '²' */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + + /* 179 0xb3 '³' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 180 0xb4 'Ž' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 181 0xb5 'µ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 182 0xb6 '¶' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 183 0xb7 '·' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 184 0xb8 'ž' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 185 0xb9 '¹' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x06, /* 00000110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 186 0xba 'º' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 187 0xbb '»' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 188 0xbc 'Œ' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x06, /* 00000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 189 0xbd 'œ' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 190 0xbe 'Ÿ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 191 0xbf '¿' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 192 0xc0 'À' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 193 0xc1 'Á' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 194 0xc2 'Â' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 195 0xc3 'Ã' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 196 0xc4 'Ä' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 197 0xc5 'Å' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 198 0xc6 'Æ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 199 0xc7 'Ç' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 200 0xc8 'È' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x30, /* 00110000 */ + 0x3f, /* 00111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 201 0xc9 'É' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x30, /* 00110000 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 202 0xca 'Ê' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf7, /* 11110111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 203 0xcb 'Ë' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xf7, /* 11110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 204 0xcc 'Ì' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x30, /* 00110000 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 205 0xcd 'Í' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 206 0xce 'Î' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf7, /* 11110111 */ + 0x00, /* 00000000 */ + 0xf7, /* 11110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 207 0xcf 'Ï' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 208 0xd0 'Ð' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 209 0xd1 'Ñ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 210 0xd2 'Ò' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 211 0xd3 'Ó' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x3f, /* 00111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 212 0xd4 'Ô' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 213 0xd5 'Õ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 214 0xd6 'Ö' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 215 0xd7 '×' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xff, /* 11111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 216 0xd8 'Ø' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 217 0xd9 'Ù' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 218 0xda 'Ú' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 219 0xdb 'Û' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 220 0xdc 'Ü' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 221 0xdd 'Ý' */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + + /* 222 0xde 'Þ' */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + + /* 223 0xdf 'ß' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 224 0xe0 'à' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0xc8, /* 11001000 */ + 0xdc, /* 11011100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 225 0xe1 'á' */ + 0x78, /* 01111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xd8, /* 11011000 */ + 0xcc, /* 11001100 */ + 0xc6, /* 11000110 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + + /* 226 0xe2 'â' */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + + /* 227 0xe3 'ã' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 228 0xe4 'ä' */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 229 0xe5 'å' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* 230 0xe6 'æ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0xc0, /* 11000000 */ + + /* 231 0xe7 'ç' */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 232 0xe8 'è' */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + + /* 233 0xe9 'é' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 234 0xea 'ê' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xee, /* 11101110 */ + 0x00, /* 00000000 */ + + /* 235 0xeb 'ë' */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x3e, /* 00111110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 236 0xec 'ì' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 237 0xed 'í' */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x7e, /* 01111110 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7e, /* 01111110 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + + /* 238 0xee 'î' */ + 0x1e, /* 00011110 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x7e, /* 01111110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x1e, /* 00011110 */ + 0x00, /* 00000000 */ + + /* 239 0xef 'ï' */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 240 0xf0 'ð' */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 241 0xf1 'ñ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 242 0xf2 'ò' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 243 0xf3 'ó' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 244 0xf4 'ô' */ + 0x0e, /* 00001110 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 245 0xf5 'õ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + + /* 246 0xf6 'ö' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 247 0xf7 '÷' */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 248 0xf8 'ø' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 249 0xf9 'ù' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 250 0xfa 'ú' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 251 0xfb 'û' */ + 0x0f, /* 00001111 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0xec, /* 11101100 */ + 0x6c, /* 01101100 */ + 0x3c, /* 00111100 */ + 0x1c, /* 00011100 */ + + /* 252 0xfc 'ü' */ + 0x6c, /* 01101100 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 253 0xfd 'ý' */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 254 0xfe 'þ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 255 0xff 'ÿ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + +}; + + +struct fbcon_font_desc font_vga_8x8 = { + VGA8x8_IDX, + "VGA8x8", + 8, + 8, + fontdata_8x8, + 0 +}; + + +union multiptr { + unsigned char *p8; + unsigned short *p16; + unsigned long *p32; +}; + +static int con_fd, last_vt = -1; +static struct fb_fix_screeninfo fix; +static struct fb_var_screeninfo var; +static unsigned char *fbuffer; +static unsigned char **line_addr; +static int fb_fd=0; +static int bytes_per_pixel; +static unsigned colormap [256]; +__u32 xres, yres; + +static char *defaultfbdevice = "/dev/fb0"; +static char *defaultconsoledevice = "/dev/tty"; +static char *fbdevice = NULL; +static char *consoledevice = NULL; + +int open_framebuffer(void) +{ + struct vt_stat vts; + char vtname[128]; + int fd, nr; + unsigned y, addr; + + if ((fbdevice = getenv ("TSLIB_FBDEVICE")) == NULL) + fbdevice = defaultfbdevice; + + if ((consoledevice = getenv ("TSLIB_CONSOLEDEVICE")) == NULL) + consoledevice = defaultconsoledevice; + + if (strcmp (consoledevice, "none") != 0) { + sprintf (vtname,"%s%d", consoledevice, 1); + fd = open (vtname, O_WRONLY); + if (fd < 0) { + perror("open consoledevice"); + return -1; + } + + if (ioctl(fd, VT_OPENQRY, &nr) < 0) { + perror("ioctl VT_OPENQRY"); + return -1; + } + close(fd); + + sprintf(vtname, "%s%d", consoledevice, nr); + + con_fd = open(vtname, O_RDWR | O_NDELAY); + if (con_fd < 0) { + perror("open tty"); + return -1; + } + + if (ioctl(con_fd, VT_GETSTATE, &vts) == 0) + last_vt = vts.v_active; + + if (ioctl(con_fd, VT_ACTIVATE, nr) < 0) { + perror("VT_ACTIVATE"); + close(con_fd); + return -1; + } + + if (ioctl(con_fd, VT_WAITACTIVE, nr) < 0) { + perror("VT_WAITACTIVE"); + close(con_fd); + return -1; + } + + if (ioctl(con_fd, KDSETMODE, KD_GRAPHICS) < 0) { + perror("KDSETMODE"); + close(con_fd); + return -1; + } + + } + + fb_fd = open(fbdevice, O_RDWR); + if (fb_fd == -1) { + perror("open fbdevice"); + return -1; + } + + if (ioctl(fb_fd, FBIOGET_FSCREENINFO, &fix) < 0) { + perror("ioctl FBIOGET_FSCREENINFO"); + close(fb_fd); + return -1; + } + + if (ioctl(fb_fd, FBIOGET_VSCREENINFO, &var) < 0) { + perror("ioctl FBIOGET_VSCREENINFO"); + close(fb_fd); + return -1; + } + xres = var.xres; + yres = var.yres; + + fbuffer = mmap(NULL, fix.smem_len, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, fb_fd, 0); + if (fbuffer == (unsigned char *)-1) { + perror("mmap framebuffer"); + close(fb_fd); + return -1; + } + memset(fbuffer,0,fix.smem_len); + + bytes_per_pixel = (var.bits_per_pixel + 7) / 8; + line_addr = malloc (sizeof (__u32) * var.yres_virtual); + addr = 0; + for (y = 0; y < var.yres_virtual; y++, addr += fix.line_length) + line_addr [y] = fbuffer + addr; + + return 0; +} + +void close_framebuffer(void) +{ + munmap(fbuffer, fix.smem_len); + close(fb_fd); + + + if(strcmp(consoledevice,"none")!=0) { + + if (ioctl(con_fd, KDSETMODE, KD_TEXT) < 0) + perror("KDSETMODE"); + + if (last_vt >= 0) + if (ioctl(con_fd, VT_ACTIVATE, last_vt)) + perror("VT_ACTIVATE"); + + close(con_fd); + } + + free (line_addr); +} + +void put_cross(int x, int y, unsigned colidx) +{ + line (x - 10, y, x - 2, y, colidx); + line (x + 2, y, x + 10, y, colidx); + line (x, y - 10, x, y - 2, colidx); + line (x, y + 2, x, y + 10, colidx); + +#if 1 + line (x - 6, y - 9, x - 9, y - 9, colidx + 1); + line (x - 9, y - 8, x - 9, y - 6, colidx + 1); + line (x - 9, y + 6, x - 9, y + 9, colidx + 1); + line (x - 8, y + 9, x - 6, y + 9, colidx + 1); + line (x + 6, y + 9, x + 9, y + 9, colidx + 1); + line (x + 9, y + 8, x + 9, y + 6, colidx + 1); + line (x + 9, y - 6, x + 9, y - 9, colidx + 1); + line (x + 8, y - 9, x + 6, y - 9, colidx + 1); +#else + line (x - 7, y - 7, x - 4, y - 4, colidx + 1); + line (x - 7, y + 7, x - 4, y + 4, colidx + 1); + line (x + 4, y - 4, x + 7, y - 7, colidx + 1); + line (x + 4, y + 4, x + 7, y + 7, colidx + 1); +#endif +} + +void put_char(int x, int y, int c, int colidx) +{ + int i,j,bits; + + for (i = 0; i < font_vga_8x8.height; i++) { + bits = font_vga_8x8.data [font_vga_8x8.height * c + i]; + for (j = 0; j < font_vga_8x8.width; j++, bits <<= 1) + if (bits & 0x80) + pixel (x + j, y + i, colidx); + } +} + +void put_string(int x, int y, char *s, unsigned colidx) +{ + int i; + for (i = 0; *s; i++, x += font_vga_8x8.width, s++) + put_char (x, y, *s, colidx); +} + +void put_string_center(int x, int y, char *s, unsigned colidx) +{ + size_t sl = strlen (s); + put_string (x - (sl / 2) * font_vga_8x8.width, + y, s, colidx); +} + +void put_int(int x, int y, int c, int colidx) +{ + int i = 1, tam = 0, num = c; + + for(;;i *= 10) + { + if(num/i) + tam++; + else + break; + } + + fillrect(x,y,x+8*(tam+1),y+8,0); + + char string[tam]; + tam=0; + + while(num) + { + i /= 10; + string[tam] = (char)(num/i + 48); + num %= i; + tam++; + } + string[tam] = '\0'; + + put_string(x, y, &string, colidx); +} + + +void setcolor(unsigned colidx, unsigned value) +{ + unsigned res; + unsigned short red, green, blue; + struct fb_cmap cmap; + +#ifdef DEBUG + if (colidx > 255) { + fprintf (stderr, "WARNING: color index = %u, must be <256\n", + colidx); + return; + } +#endif + + switch (bytes_per_pixel) { + default: + case 1: + res = colidx; + red = (value >> 8) & 0xff00; + green = value & 0xff00; + blue = (value << 8) & 0xff00; + cmap.start = colidx; + cmap.len = 1; + cmap.red = &red; + cmap.green = &green; + cmap.blue = &blue; + cmap.transp = NULL; + + if (ioctl (fb_fd, FBIOPUTCMAP, &cmap) < 0) + perror("ioctl FBIOPUTCMAP"); + break; + case 2: + case 4: + red = (value >> 16) & 0xff; + green = (value >> 8) & 0xff; + blue = value & 0xff; + res = ((red >> (8 - var.red.length)) << var.red.offset) | + ((green >> (8 - var.green.length)) << var.green.offset) | + ((blue >> (8 - var.blue.length)) << var.blue.offset); + } + colormap [colidx] = res; +} + +static inline void __setpixel (union multiptr loc, unsigned xormode, unsigned color) +{ + switch(bytes_per_pixel) { + case 1: + default: + if (xormode) + *loc.p8 ^= color; + else + *loc.p8 = color; + break; + case 2: + if (xormode) + *loc.p16 ^= color; + else + *loc.p16 = color; + break; + case 4: + if (xormode) + *loc.p32 ^= color; + else + *loc.p32 = color; + break; + } +} + +void pixel (int x, int y, unsigned colidx) +{ + unsigned xormode; + union multiptr loc; + + if ((x < 0) || ((__u32)x >= var.xres_virtual) || + (y < 0) || ((__u32)y >= var.yres_virtual)) + return; + + xormode = colidx & XORMODE; + colidx &= ~XORMODE; + +#ifdef DEBUG + if (colidx > 255) { + fprintf (stderr, "WARNING: color value = %u, must be <256\n", + colidx); + return; + } +#endif + + loc.p8 = line_addr [y] + x * bytes_per_pixel; + __setpixel (loc, xormode, colormap [colidx]); +} + +void line (int x1, int y1, int x2, int y2, unsigned colidx) +{ + int tmp; + int dx = x2 - x1; + int dy = y2 - y1; + + if (abs (dx) < abs (dy)) { + if (y1 > y2) { + tmp = x1; x1 = x2; x2 = tmp; + tmp = y1; y1 = y2; y2 = tmp; + dx = -dx; dy = -dy; + } + x1 <<= 16; + /* dy is apriori >0 */ + dx = (dx << 16) / dy; + while (y1 <= y2) { + pixel (x1 >> 16, y1, colidx); + x1 += dx; + y1++; + } + } else { + if (x1 > x2) { + tmp = x1; x1 = x2; x2 = tmp; + tmp = y1; y1 = y2; y2 = tmp; + dx = -dx; dy = -dy; + } + y1 <<= 16; + dy = dx ? (dy << 16) / dx : 0; + while (x1 <= x2) { + pixel (x1, y1 >> 16, colidx); + y1 += dy; + x1++; + } + } +} + +void rect (int x1, int y1, int x2, int y2, unsigned colidx) +{ + line (x1, y1, x2, y1, colidx); + line (x2, y1, x2, y2, colidx); + line (x2, y2, x1, y2, colidx); + line (x1, y2, x1, y1, colidx); +} + +void fillrect (int x1, int y1, int x2, int y2, unsigned colidx) +{ + int tmp; + unsigned xormode; + union multiptr loc; + + /* Clipping and sanity checking */ + if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } + if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } + if (x1 < 0) x1 = 0; if ((__u32)x1 >= xres) x1 = xres - 1; + if (x2 < 0) x2 = 0; if ((__u32)x2 >= xres) x2 = xres - 1; + if (y1 < 0) y1 = 0; if ((__u32)y1 >= yres) y1 = yres - 1; + if (y2 < 0) y2 = 0; if ((__u32)y2 >= yres) y2 = yres - 1; + + if ((x1 > x2) || (y1 > y2)) + return; + + xormode = colidx & XORMODE; + colidx &= ~XORMODE; + +#ifdef DEBUG + if (colidx > 255) { + fprintf (stderr, "WARNING: color value = %u, must be <256\n", + colidx); + return; + } +#endif + + colidx = colormap [colidx]; + + for (; y1 <= y2; y1++) { + loc.p8 = line_addr [y1] + x1 * bytes_per_pixel; + for (tmp = x1; tmp <= x2; tmp++) { + __setpixel (loc, xormode, colidx); + loc.p8 += bytes_per_pixel; + } + } +} + +static int palette [] = \ +{ + 0x000000, 0xffffff, 0xff0000, 0x00ff00, 0x0000ff +}; +#define NR_COLORS (sizeof (palette) / sizeof (palette [0])) + +void setColorsFromDefaultPallet() +{ + int i; + for (i = 0; i < NR_COLORS; i++) + setcolor (i, palette [i]); +} + diff --git a/Software/sie_cg/templates/basic/fbutils.h b/Software/sie_cg/templates/basic/fbutils.h new file mode 100644 index 0000000..7f9227f --- /dev/null +++ b/Software/sie_cg/templates/basic/fbutils.h @@ -0,0 +1,63 @@ +/* + * fbutils.h + * + * Headers for utility routines for framebuffer interaction + * + * Copyright 2002 Russell King and Doug Lowder + * + * This file is placed under the GPL. Please see the + * file COPYING for details. + * + */ + +#ifndef _FBUTILS_H +#define _FBUTILS_H + +#include +#include + +/* This constant, being ORed with the color index tells the library + * to draw in exclusive-or mode (that is, drawing the same second time + * in the same place will remove the element leaving the background intact). + */ +#define XORMODE 0x80000000 + +extern __u32 xres, yres; + +int open_framebuffer(void); +void close_framebuffer(void); +void setcolor(unsigned colidx, unsigned value); +void put_cross(int x, int y, unsigned colidx); +void put_string(int x, int y, char *s, unsigned colidx); +void put_string_center(int x, int y, char *s, unsigned colidx); +void pixel (int x, int y, unsigned colidx); +void line (int x1, int y1, int x2, int y2, unsigned colidx); +void rect (int x1, int y1, int x2, int y2, unsigned colidx); +void fillrect (int x1, int y1, int x2, int y2, unsigned colidx); +void setColorsFromDefaultPallet(); +void put_int(int x, int y, int c, int colidx); + +/* + *FONT + */ + +struct fbcon_font_desc { + int idx; + const char *name; + int width, height; + unsigned char *data; + int pref; +}; + +#define VGA8x8_IDX 0 +#define PEARL8x8_IDX 2 +#define VGA6x11_IDX 3 +#define SUN8x16_IDX 4 +#define SUN12x22_IDX 5 +#define ACORN8x8_IDX 6 + +/* Max. length for the name of a predefined font */ +#define MAX_FONT_NAME 32 +#define FONTDATAMAX 2048 + +#endif /* _FBUTILS_H */ diff --git a/Software/sie_cg/templates/basic/jz47xx_gpio.cpp b/Software/sie_cg/templates/basic/jz47xx_gpio.cpp new file mode 100755 index 0000000..affa85e --- /dev/null +++ b/Software/sie_cg/templates/basic/jz47xx_gpio.cpp @@ -0,0 +1,108 @@ +/* + JZ47xx GPIO at userspace + + Copyright (C) 2010 Andres Calderon andres.calderon@emqbit.com + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include +#include +#include + +#include +#include + + +#define JZ_GPIO_BASE 0x10010000 + +void +jz_gpio_as_output (JZ_PIO * pio, unsigned int o) +{ + pio->PXFUNC = (1 << (o)); + pio->PXSELC = (1 << (o)); + pio->PXDIRS = (1 << (o)); +} + +void +jz_gpio_as_input (JZ_PIO * pio, unsigned int o) +{ + pio->PXFUNC = (1 << (o)); + pio->PXSELC = (1 << (o)); + pio->PXDIRC = (1 << (o)); +} + +void +jz_gpio_set_pin (JZ_PIO * pio, unsigned int o) +{ + pio->PXDATS = (1 << (o)); +} + +void +jz_gpio_clear_pin (JZ_PIO * pio, unsigned int o) +{ + pio->PXDATC = (1 << (o)); +} + +void +jz_gpio_out (JZ_PIO * pio, unsigned int o, unsigned int val) +{ + if (val == 0) + pio->PXDATC = (1 << (o)); + else + pio->PXDATS = (1 << (o)); +} + +unsigned int +jz_gpio_get_pin (JZ_PIO * pio, unsigned int o) +{ + return (pio->PXPIN & (1 << o)) ? 1 : 0; +} + +int +jz_gpio_as_func (JZ_PIO * pio, unsigned int o, int func) +{ + switch (func) + { + case 0: + pio->PXFUNS = (1 << o); + pio->PXTRGC = (1 << o); + pio->PXSELC = (1 << o); + return 1; + + case 1: + pio->PXFUNS = (1 << o); + pio->PXTRGC = (1 << o); + pio->PXSELS = (1 << o); + return 1; + + case 2: + pio->PXFUNS = (1 << o); + pio->PXTRGS = (1 << o); + pio->PXSELC = (1 << o); + return 1; + } + return 0; +} + +JZ_PIO * +jz_gpio_map (int port) +{ + JZ_PIO *pio; + + pio = (JZ_PIO *) jz_mmap (JZ_GPIO_BASE); + pio = (JZ_PIO *) ((unsigned int) pio + port * 0x100); + + return pio; +} diff --git a/Software/sie_cg/templates/basic/jz47xx_gpio.h b/Software/sie_cg/templates/basic/jz47xx_gpio.h new file mode 100755 index 0000000..d8b0113 --- /dev/null +++ b/Software/sie_cg/templates/basic/jz47xx_gpio.h @@ -0,0 +1,84 @@ +/* + JZ47xx GPIO at userspace + + Copyright (C) 2010 Andres Calderon andres.calderon@emqbit.com + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef __jz47xx_gpio_h__ +#define __jz47xx_gpio_h__ + +#define JZ_GPIO_PORT_A 0 +#define JZ_GPIO_PORT_B 1 +#define JZ_GPIO_PORT_C 2 +#define JZ_GPIO_PORT_D 3 + +typedef volatile unsigned int JZ_REG; /* Hardware register definition */ + +typedef struct _JZ_PIO +{ + JZ_REG PXPIN; /* PIN Level Register */ + JZ_REG Reserved0; + JZ_REG Reserved1; + JZ_REG Reserved2; + JZ_REG PXDAT; /* Port Data Register */ + JZ_REG PXDATS; /* Port Data Set Register */ + JZ_REG PXDATC; /* Port Data Clear Register */ + JZ_REG Reserved3; + JZ_REG PXIM; /* Interrupt Mask Register */ + JZ_REG PXIMS; /* Interrupt Mask Set Reg */ + JZ_REG PXIMC; /* Interrupt Mask Clear Reg */ + JZ_REG Reserved4; + JZ_REG PXPE; /* Pull Enable Register */ + JZ_REG PXPES; /* Pull Enable Set Reg. */ + JZ_REG PXPEC; /* Pull Enable Clear Reg. */ + JZ_REG Reserved5; + JZ_REG PXFUN; /* Function Register */ + JZ_REG PXFUNS; /* Function Set Register */ + JZ_REG PXFUNC; /* Function Clear Register */ + JZ_REG Reserved6; + JZ_REG PXSEL; /* Select Register */ + JZ_REG PXSELS; /* Select Set Register */ + JZ_REG PXSELC; /* Select Clear Register */ + JZ_REG Reserved7; + JZ_REG PXDIR; /* Direction Register */ + JZ_REG PXDIRS; /* Direction Set Register */ + JZ_REG PXDIRC; /* Direction Clear Register */ + JZ_REG Reserved8; + JZ_REG PXTRG; /* Trigger Register */ + JZ_REG PXTRGS; /* Trigger Set Register */ + JZ_REG PXTRGC; /* Trigger Set Register */ + JZ_REG Reserved9; + JZ_REG PXFLG; /* Port Flag Register */ + JZ_REG PXFLGC; /* Port Flag clear Register */ +} JZ_PIO, *PJZ_PIO; + +void jz_gpio_as_output (JZ_PIO * pio, unsigned int o); + +void jz_gpio_as_input (JZ_PIO * pio, unsigned int o); + +void jz_gpio_set_pin (JZ_PIO * pio, unsigned int o); + +void jz_gpio_clear_pin (JZ_PIO * pio, unsigned int o); + +void jz_gpio_out (JZ_PIO * pio, unsigned int o, unsigned int val); + +unsigned int jz_gpio_get_pin (JZ_PIO * pio, unsigned int o); + +int jz_gpio_as_func (JZ_PIO * pio, unsigned int o, int func); + +JZ_PIO *jz_gpio_map (int port); + +#endif diff --git a/Software/sie_cg/templates/basic/jz47xx_mmap.cpp b/Software/sie_cg/templates/basic/jz47xx_mmap.cpp new file mode 100755 index 0000000..b94936b --- /dev/null +++ b/Software/sie_cg/templates/basic/jz47xx_mmap.cpp @@ -0,0 +1,32 @@ +/* + * JZ47xx GPIO lines + * + * Written 2010 by Andres Calderon andres.calderon@emqbit.com + */ + +#include "jz47xx_mmap.h" + +unsigned int * +jz_mmap (off_t address) +{ + int fd; + + unsigned int *pio; + + if ((fd = open ("/dev/mem", O_RDWR | O_SYNC)) == -1) + { + fprintf (stderr, "Cannot open /dev/mem.\n"); + return 0; + } + + pio = (unsigned int *) mmap (0, getpagesize (), PROT_READ | PROT_WRITE, MAP_SHARED, fd, address); + + if (pio == (unsigned int *) -1) + { + fprintf (stderr, "Cannot mmap.\n"); + return 0; + } + + return pio; +} + diff --git a/Software/sie_cg/templates/basic/jz47xx_mmap.h b/Software/sie_cg/templates/basic/jz47xx_mmap.h new file mode 100755 index 0000000..05438bd --- /dev/null +++ b/Software/sie_cg/templates/basic/jz47xx_mmap.h @@ -0,0 +1,22 @@ +/* + * JZ47xx GPIO lines + * + * Written 2010 by Andres Calderon andres.calderon@emqbit.com + */ + +#ifndef __jz47xx_mmap_h__ +#define __jz47xx_mmap_h__ + +#include +#include +#include +#include +#include +#include +#include + +#include "jz47xx_gpio.h" + +unsigned int * jz_mmap (off_t address); + +#endif diff --git a/Software/sie_cg/templates/basic/jz_adc_peripheral.cpp b/Software/sie_cg/templates/basic/jz_adc_peripheral.cpp new file mode 100755 index 0000000..568706c --- /dev/null +++ b/Software/sie_cg/templates/basic/jz_adc_peripheral.cpp @@ -0,0 +1,78 @@ +/* ADC Peripheral.c + +Copyright (C) 2010 + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include +#include + +#include "jz_adc_peripheral.h" + +void ADCTest(JZ_REG * ADCBuffer) +{ +if(ADCBuffer!=0) +{ + int aggregate=0; float errorT=0; + /******************************* TEST 1 ***********************************/ + printf("\nINIT TEST1: Autoselft {(Vref+) - (Vref-)}/2 -> Return 0x0200 \n"); + ADCConfig(ADCBuffer,ADC_CMD_SET_AUTOSELFT_1); + ADCConfig(ADCBuffer,ADC_CMD_READ_AUTOSELFT_1); + for(int i=ADC_BUFFER_OFFSET; i< ADC_BUFFER_LEN/2+ADC_BUFFER_OFFSET; i++) + { + aggregate += (ADCBuffer[i]&0xFFFF + ((ADCBuffer[i]>>16)&0x0FFF)); + printf("[%08X]", ADCBuffer[i]); + } + errorT=(aggregate/16)*100/0x200; + if((errorT<95)||(errorT>105)) + printf("\n**WARNING** Test FAILED.\n\n"); + else + printf("\nTest OK\n\n"); + + fflush (stdout); +} +} + +void ADCPowerDown(JZ_REG * ADCBuffer) +{ + ADCConfig(ADCBuffer,ADC_CMD_SET_POWER_DOWN); +} + +JZ_REG * ADCTakeSamples(JZ_REG * ADCBuffer,int CHANNEL) +{ + ADCConfig(ADCBuffer,ADC_CMD_SET_CHANNEL0+CHANNEL); + ADCConfig(ADCBuffer,ADC_CMD_READ_CHANNEL0+CHANNEL); + return (JZ_REG*)(ADCBuffer+ADC_BUFFER_OFFSET); +} + +void ADCConfig(JZ_REG * ADCBuffer,uchar CMD) +{ + if(ADCBuffer!=0) + { + ADCBuffer[0] = (((ADC_MUX_CHANNELS<<6) + CMD)<<24) + \ + ((ADC_BUFFER_LEN+ADC_BUFFER_OFFSET*2) << 8) + \ + (ADC_SPI_CLKDIV); + while(ADCCheckBufferFull(ADCBuffer)) usleep (10); + } +} + +int ADCCheckBufferFull(JZ_REG * ADCBuffer) +{ + if(ADCBuffer!=0) + { + return ADCBuffer[0]&0x20000000; + } + return 0; +} diff --git a/Software/sie_cg/templates/basic/jz_adc_peripheral.h b/Software/sie_cg/templates/basic/jz_adc_peripheral.h new file mode 100755 index 0000000..8544297 --- /dev/null +++ b/Software/sie_cg/templates/basic/jz_adc_peripheral.h @@ -0,0 +1,86 @@ +/* ADC Peripheral.h + +Copyright (C) 2010 Carlos Camargo cicamargoba@unal.edu.co + Andres Calderon andres.calderon@emqbit.com + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef __adc_peripheral_h__ +#define __adc_peripheral_h__ + +#define ADC_CMD_NONE 0x00 /* Nothing to do */ +#define ADC_CMD_SET_SPI_CLKDIV 0x00 /* Set clock divider for ADC sclk */ +#define ADC_CMD_SET_BUFFER_SIZE 0x00 /* Set clock divider for ADC sclk */ + +#define ADC_CMD_SET_CHANNEL0 0x30 /* Set channel 0 */ +#define ADC_CMD_READ_CHANNEL0 0x20 /* Read channel 0 */ + +#define ADC_CMD_SET_CHANNEL1 0x31 /* Set channel 1 */ +#define ADC_CMD_READ_CHANNEL1 0x21 /* Read channel 1 */ + +#define ADC_CMD_SET_CHANNEL2 0x32 /* Set channel 2 */ +#define ADC_CMD_READ_CHANNEL2 0x22 /* Read channel 2 */ + +#define ADC_CMD_SET_CHANNEL3 0x33 /* Set channel 3 */ +#define ADC_CMD_READ_CHANNEL3 0x23 /* Read channel 3 */ + +#define ADC_CMD_SET_CHANNEL4 0x34 /* Set channel 4 */ +#define ADC_CMD_READ_CHANNEL4 0x24 /* Read channel 4 */ + +#define ADC_CMD_SET_CHANNEL5 0x35 /* Set channel 5 */ +#define ADC_CMD_READ_CHANNEL5 0x25 /* Read channel 5 */ + +#define ADC_CMD_SET_CHANNEL6 0x36 /* Set channel 6 */ +#define ADC_CMD_READ_CHANNEL6 0x26 /* Read channel 6 */ + +#define ADC_CMD_SET_CHANNEL7 0x37 /* Set channel 7 */ +#define ADC_CMD_READ_CHANNEL7 0x27 /* Read channel 8 */ + +#define ADC_CMD_SET_POWER_DOWN 0X38 /* Set ADC power down mode (1uA) */ + +#define ADC_CMD_SET_FAST_CONV 0X39 /* Initialize ADC Fast Convertion(<10us)*/ + +#define ADC_CMD_SET_LOW_CONV 0X3A /* Initialize ADC Slow Convertion(<40us)*/ + +#define ADC_CMD_SET_AUTOSELFT_1 0x3B /* Set Autoselft ADC {(Vref+)-(Vref-)}/2*/ +#define ADC_CMD_READ_AUTOSELFT_1 0x2B /* Read Autoselft ADC 1 (0x0200) */ + +#define ADC_CMD_SET_AUTOSELFT_2 0x3C /* Set Autoselft ADC (Vref-) */ +#define ADC_CMD_READ_AUTOSELFT_2 0x2C /* Read Autoselft ADC 2 (0x0000) */ + +#define ADC_CMD_SET_AUTOSELFT_3 0x3D /* Set Autoselft ADC (Vref+) */ +#define ADC_CMD_READ_AUTOSELFT_3 0x2D /* Read Autoselft ADC 3 (0x03FF) */ + +#define ADC_SPI_CLKDIV_MIN 0x08 /* 50/(2*9) -> 2.78MHz (MAX=2.8MHz) */ +#define ADC_SPI_CLKDIV_MAX 0xFF /* 50/(2*256) -> 97.65KHz */ + +#define ADC_MAX_BUFFER 0x3FE/* 1022 reads/commands */ + + +typedef unsigned char uchar; +typedef volatile unsigned int JZ_REG; + +static uchar ADC_SPI_CLKDIV=ADC_SPI_CLKDIV_MAX; //Set clock to minimum speed +static int ADC_BUFFER_LEN=16; +static int ADC_BUFFER_OFFSET= 8; //Ignore first 16 samples +static uchar ADC_MUX_CHANNELS=0; + +void ADCTest(JZ_REG * ADCBuffer); +void ADCPowerDown(JZ_REG * ADCBuffer); +JZ_REG * ADCTakeSamples(JZ_REG * ADCBuffer,int CHANNEL); +void ADCConfig(JZ_REG * ADCBuffer,uchar CMD); +int ADCCheckBufferFull(JZ_REG * ADCBuffer); + +#endif diff --git a/Software/sie_cg/templates/basic/jz_fpga_init.cpp b/Software/sie_cg/templates/basic/jz_fpga_init.cpp new file mode 100755 index 0000000..f260239 --- /dev/null +++ b/Software/sie_cg/templates/basic/jz_fpga_init.cpp @@ -0,0 +1,29 @@ +/* + * SIE FPGA init + * + */ + +#include "jz_fpga_init.h" + +JZ_REG * +jz_cs2_init() +{ + JZ_PIO *pio; + JZ_REG *virt_addr; + + pio = jz_gpio_map (CS2_PORT); + jz_gpio_as_func (pio, CS2_PIN, 0); + + virt_addr = (JZ_REG *) (jz_mmap(0x13010000) + 0x18); + + if (*virt_addr != 0x0FFF7700) + { + *virt_addr = 0x0FFF7700; + printf ("ADC: Configuring CS2 8 bits and 0 WS.\n"); + } + else + printf ("ADC: CS2, already configured.\n"); + + virt_addr = (JZ_REG *) jz_mmap (0x14000000); + return virt_addr; +} diff --git a/Software/sie_cg/templates/basic/jz_fpga_init.h b/Software/sie_cg/templates/basic/jz_fpga_init.h new file mode 100755 index 0000000..ce023fd --- /dev/null +++ b/Software/sie_cg/templates/basic/jz_fpga_init.h @@ -0,0 +1,12 @@ +/* + * SIE FPGA init + * + */ +#include "jz47xx_gpio.h" +#include "jz47xx_mmap.h" + +#define CS2_PORT JZ_GPIO_PORT_B +#define CS2_PIN 26 + +JZ_REG * jz_cs2_init(); + diff --git a/Software/sie_cg/templates/basic/main.cpp b/Software/sie_cg/templates/basic/main.cpp new file mode 100755 index 0000000..7bc39d8 --- /dev/null +++ b/Software/sie_cg/templates/basic/main.cpp @@ -0,0 +1,53 @@ +#include "jz_adc_peripheral.h" +#include "jz_fpga_init.h" +#include +#include + +extern "C" +{ + #include "fbutils.h" +} + + +JZ_REG * FPGA_ADDR; +JZ_REG * ADCBuffer; +bool frameBufferOpened = 0; +bool firstLoop = 1; + +/***![HEADER SECTION]***/ + +/***![BLOCK SECTION]***/ + +/***![EXTRA SECTION]***/ + +int main() +{ + /* OPEN FRAME BUFFER */ + printf("Opening framebuffer...\n\n"); + + if (open_framebuffer()) { + close_framebuffer(); + printf("Could not open framebuffer!!\n\n"); + } + else + { + setColorsFromDefaultPallet(); + rect(0,0,xres,yres,0); //Extern Rect + } + + /* MAPING FPGA MEMORY */ + FPGA_ADDR=jz_cs2_init(); + ADCBuffer = FPGA_ADDR; + ADCTest(ADCBuffer); + + + /***![INIT SECTION]***/ + + /***![IO SECTION]***/ + + /***![MAIN SECTION]***/ + + return 0; +} + + diff --git a/Software/sie_cg/test.sie b/Software/sie_cg/test.sie old mode 100644 new mode 100755 index 8286e58..80951dc --- a/Software/sie_cg/test.sie +++ b/Software/sie_cg/test.sie @@ -13,45 +13,68 @@ Arrows depend of items, and items depend of libraries!!!! + + + - - - - - - + - + + + + + + + + + - - + + + + - + - + - - + - - - + + + + + + + + + + + + + + + + + + + diff --git a/Software/sie_cg/tmp/SIE_APP/Makefile b/Software/sie_cg/tmp/SIE_APP/Makefile new file mode 100755 index 0000000..2380ac5 --- /dev/null +++ b/Software/sie_cg/tmp/SIE_APP/Makefile @@ -0,0 +1,63 @@ +TOOLCHAIN_BASE= /home/juan64bits/ebd/ECB/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.32/usr/bin/mipsel-openwrt-linux +CC = ${TOOLCHAIN_BASE}-gcc +CXX = ${TOOLCHAIN_BASE}-g++ +INCPATH = -I. +CFLAGS = ${INCPATH} -pipe -O2 -mips32 -mtune=mips32 -Wall +CXXFLAGS = ${INCPATH} -pipe -O2 -mips32 -mtune=mips32 -Wall +LINK = ${TOOLCHAIN_BASE}-g++ +LFLAGS = -Wl,-O1 +LIBS = -lstdc++ +AR = ${TOOLCHAIN_BASE}-ar cqs +RANLIB = ${TOOLCHAIN_BASE}-ranlib +DEL_FILE = rm -f +SYMLINK = ln -f -s +DEL_DIR = rmdir +MOVE = mv -f +MKDIR = mkdir -p +TARGET = SIE_APP + + +OBJECTS = main.o \ + jz_adc_peripheral.o \ + jz_fpga_init.o \ + jz47xx_gpio.o \ + jz47xx_mmap.o \ + fbutils.o + +#BUILD RULES +all: $(TARGET) + +$(TARGET): $(OBJECTS) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) + +fbutils.o: fbutils.c fbutils.h + $(CC) $(CFLAGS) $(INCPATH) -c $< -o $@ + +jz47xx_gpio.o: jz47xx_gpio.cpp \ + jz47xx_mmap.h + $(CXX) $(CXXFLAGS) $(INCPATH) -c $< -o $@ + +jz47xx_mmap.o: jz47xx_mmap.cpp \ + jz47xx_gpio.h + $(CXX) $(CXXFLAGS) $(INCPATH) -c $< -o $@ + +jz_adc_peripheral.o: jz_adc_peripheral.cpp \ + jz_fpga_init.h \ + jz47xx_gpio.h \ + jz47xx_mmap.h + $(CXX) $(CXXFLAGS) $(INCPATH) -c $< -o $@ + +jz_fpga_init.o: jz_fpga_init.cpp \ + jz47xx_gpio.h \ + jz47xx_mmap.h + $(CXX) $(CXXFLAGS) $(INCPATH) -c $< -o $@ + +main.o: main.cpp \ + jz_adc_peripheral.h \ + jz_fpga_init.h + $(CXX) $(CXXFLAGS) $(INCPATH) -c $< -o $@ + + +clean: + $(DEL_FILE) *.o $(TARGET) + diff --git a/Software/sie_cg/tmp/SIE_APP/SIE_APP b/Software/sie_cg/tmp/SIE_APP/SIE_APP new file mode 100755 index 0000000000000000000000000000000000000000..e78f75bd4dc91576e185d2fb3d23bc4aa78ae23e GIT binary patch literal 35933 zcmeHw3wT_`mFBtKt%oHcw{2m!!9cg&mW3a3OBO~Uy>RukBnw-yWpD^d>(y|(uoQc=H z|6liB>8jnflgYR9O?D~i_Nnuzs#B*yfUGTE?y+&kpY?uhZ9FL@McX{M*(mi53Br7fDf_rf|dR}hK;~HR!6(qR!2Kl4OAi0UfkbP9FPw*Ic^hE(N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U3yQ-88DIka0cF95O=@bQ!1oov&we;03{~H*fHqnP<4WLsYMxnY3iBs&0zWOH~gqwe@hz$7VR*b(Z5<#zKon z2D;m)+Z&mOHZ@j<_%2|0Jf5(p>N7G~!%QMwxc|PfrzhP2cOCpVv@O;jDV-jpkV%Tl z7%U@wVR%N^a)z}wt-88X+%U8ab01o#pYMn6itP;T2ZEEwurBn1ml9}a|eoW;vlene?-i*bIsF_UJuD!1Z g7nRjzVBFyv?P-nmclAf68*tjbp>|ww#zNu$01)D1Y5)KL literal 0 HcmV?d00001 diff --git a/Software/sie_cg/tmp/SIE_APP/basic.bit b/Software/sie_cg/tmp/SIE_APP/basic.bit new file mode 100755 index 0000000000000000000000000000000000000000..d1ad2ab84557c47c02cd55c00f7e33649c9f2c36 GIT binary patch literal 283852 zcmeHwdyE{(d0%z!>~eN*NDg_tgn`IIi^mv*LP^8BlRyYW(mc}=VaS(_VcLNH(b|#@ zNgyO^*>Dbs02S}fGOb*!4J0LqV*wlaAB7-vgdM;Jq(CE|VbKyJoeh+V{^dXa z*hhZz!=HH9zxc>U#jlCZBfs&UUhiYS_3IaUJ@FB7-^0BNy>|!iefNc)_^4RF@SgWQ z^2qxxJS;vYTE8R*ly3gVYftoq^n?(Hdfpc2TRktJ{KAiWUf=WnEcjec^qDV=+Z~_ti~B9T#UqRp@%ph!bnx)0(|{ zT!^bl@oAR>arXTxu-36>#FcDZsrsMmc-M7+tCTewcN(WP;cGm_adC1hT^CbbpQ3N6 zqlTcPg%CcKTVAUhi!@T|>Nv=^)c&2g+bJvGveV+gHI z`TW^CBB(>buT2fHMjfdgIcPM5T<2;RC>57X>8Ghw)s%_EPMi}|4r|Ksm2g)w$WSB? z2XuuX!V<sUF;%^A;a$Eriw$vN;yA0e%`q|4q&vPE3pPx6=5mrIa@C=U zHFGI-qqJmnM@q^~TI}yQ4mKQm&7o(NbmOiZXIrGZaTHDWMlwFiaWZE;B4=kzn_`t9 zhpH0_R9E?7DQ`^-{46fQt(m`QVsb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wv{FQ<;D6HYeQRJpC$N$kFor{vU)f00e*l5MTt>FZR?kLSn<@D* +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "fbutils.h" + + +static unsigned char fontdata_8x8[FONTDATAMAX] = { + + /* 0 0x00 '^@' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 1 0x01 '^A' */ + 0x7e, /* 01111110 */ + 0x81, /* 10000001 */ + 0xa5, /* 10100101 */ + 0x81, /* 10000001 */ + 0xbd, /* 10111101 */ + 0x99, /* 10011001 */ + 0x81, /* 10000001 */ + 0x7e, /* 01111110 */ + + /* 2 0x02 '^B' */ + 0x7e, /* 01111110 */ + 0xff, /* 11111111 */ + 0xdb, /* 11011011 */ + 0xff, /* 11111111 */ + 0xc3, /* 11000011 */ + 0xe7, /* 11100111 */ + 0xff, /* 11111111 */ + 0x7e, /* 01111110 */ + + /* 3 0x03 '^C' */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + + /* 4 0x04 '^D' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0x10, /* 00010000 */ + 0x00, /* 00000000 */ + + /* 5 0x05 '^E' */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0x38, /* 00111000 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + + /* 6 0x06 '^F' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x7c, /* 01111100 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0x7c, /* 01111100 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + + /* 7 0x07 '^G' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 8 0x08 '^H' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xe7, /* 11100111 */ + 0xc3, /* 11000011 */ + 0xc3, /* 11000011 */ + 0xe7, /* 11100111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 9 0x09 '^I' */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x42, /* 01000010 */ + 0x42, /* 01000010 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 10 0x0a '^J' */ + 0xff, /* 11111111 */ + 0xc3, /* 11000011 */ + 0x99, /* 10011001 */ + 0xbd, /* 10111101 */ + 0xbd, /* 10111101 */ + 0x99, /* 10011001 */ + 0xc3, /* 11000011 */ + 0xff, /* 11111111 */ + + /* 11 0x0b '^K' */ + 0x0f, /* 00001111 */ + 0x07, /* 00000111 */ + 0x0f, /* 00001111 */ + 0x7d, /* 01111101 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x78, /* 01111000 */ + + /* 12 0x0c '^L' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + + /* 13 0x0d '^M' */ + 0x3f, /* 00111111 */ + 0x33, /* 00110011 */ + 0x3f, /* 00111111 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x70, /* 01110000 */ + 0xf0, /* 11110000 */ + 0xe0, /* 11100000 */ + + /* 14 0x0e '^N' */ + 0x7f, /* 01111111 */ + 0x63, /* 01100011 */ + 0x7f, /* 01111111 */ + 0x63, /* 01100011 */ + 0x63, /* 01100011 */ + 0x67, /* 01100111 */ + 0xe6, /* 11100110 */ + 0xc0, /* 11000000 */ + + /* 15 0x0f '^O' */ + 0x18, /* 00011000 */ + 0xdb, /* 11011011 */ + 0x3c, /* 00111100 */ + 0xe7, /* 11100111 */ + 0xe7, /* 11100111 */ + 0x3c, /* 00111100 */ + 0xdb, /* 11011011 */ + 0x18, /* 00011000 */ + + /* 16 0x10 '^P' */ + 0x80, /* 10000000 */ + 0xe0, /* 11100000 */ + 0xf8, /* 11111000 */ + 0xfe, /* 11111110 */ + 0xf8, /* 11111000 */ + 0xe0, /* 11100000 */ + 0x80, /* 10000000 */ + 0x00, /* 00000000 */ + + /* 17 0x11 '^Q' */ + 0x02, /* 00000010 */ + 0x0e, /* 00001110 */ + 0x3e, /* 00111110 */ + 0xfe, /* 11111110 */ + 0x3e, /* 00111110 */ + 0x0e, /* 00001110 */ + 0x02, /* 00000010 */ + 0x00, /* 00000000 */ + + /* 18 0x12 '^R' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + + /* 19 0x13 '^S' */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* 20 0x14 '^T' */ + 0x7f, /* 01111111 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7b, /* 01111011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x00, /* 00000000 */ + + /* 21 0x15 '^U' */ + 0x3e, /* 00111110 */ + 0x61, /* 01100001 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x86, /* 10000110 */ + 0x7c, /* 01111100 */ + + /* 22 0x16 '^V' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 23 0x17 '^W' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + + /* 24 0x18 '^X' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 25 0x19 '^Y' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 26 0x1a '^Z' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 27 0x1b '^[' */ + 0x00, /* 00000000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xfe, /* 11111110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 28 0x1c '^\' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 29 0x1d '^]' */ + 0x00, /* 00000000 */ + 0x24, /* 00100100 */ + 0x66, /* 01100110 */ + 0xff, /* 11111111 */ + 0x66, /* 01100110 */ + 0x24, /* 00100100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 30 0x1e '^^' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 31 0x1f '^_' */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x7e, /* 01111110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 32 0x20 ' ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 33 0x21 '!' */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 34 0x22 '"' */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x24, /* 00100100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 35 0x23 '#' */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 36 0x24 '$' */ + 0x18, /* 00011000 */ + 0x3e, /* 00111110 */ + 0x60, /* 01100000 */ + 0x3c, /* 00111100 */ + 0x06, /* 00000110 */ + 0x7c, /* 01111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 37 0x25 '%' */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xcc, /* 11001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x66, /* 01100110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 38 0x26 '&' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 39 0x27 ''' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 40 0x28 '(' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + + /* 41 0x29 ')' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + + /* 42 0x2a '*' */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0xff, /* 11111111 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 43 0x2b '+' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 44 0x2c ',' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + + /* 45 0x2d '-' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 46 0x2e '.' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 47 0x2f '/' */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0x80, /* 10000000 */ + 0x00, /* 00000000 */ + + /* 48 0x30 '0' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 49 0x31 '1' */ + 0x18, /* 00011000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 50 0x32 '2' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x06, /* 00000110 */ + 0x1c, /* 00011100 */ + 0x30, /* 00110000 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 51 0x33 '3' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x06, /* 00000110 */ + 0x3c, /* 00111100 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 52 0x34 '4' */ + 0x1c, /* 00011100 */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xfe, /* 11111110 */ + 0x0c, /* 00001100 */ + 0x1e, /* 00011110 */ + 0x00, /* 00000000 */ + + /* 53 0x35 '5' */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0x06, /* 00000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 54 0x36 '6' */ + 0x38, /* 00111000 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + 0xfc, /* 11111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 55 0x37 '7' */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + + /* 56 0x38 '8' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 57 0x39 '9' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* 58 0x3a ':' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 59 0x3b ';' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + + /* 60 0x3c '<' */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + + /* 61 0x3d '=' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 62 0x3e '>' */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x00, /* 00000000 */ + + /* 63 0x3f '?' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 64 0x40 '@' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xde, /* 11011110 */ + 0xde, /* 11011110 */ + 0xde, /* 11011110 */ + 0xc0, /* 11000000 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* 65 0x41 'A' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 66 0x42 'B' */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 67 0x43 'C' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 68 0x44 'D' */ + 0xf8, /* 11111000 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + + /* 69 0x45 'E' */ + 0xfe, /* 11111110 */ + 0x62, /* 01100010 */ + 0x68, /* 01101000 */ + 0x78, /* 01111000 */ + 0x68, /* 01101000 */ + 0x62, /* 01100010 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 70 0x46 'F' */ + 0xfe, /* 11111110 */ + 0x62, /* 01100010 */ + 0x68, /* 01101000 */ + 0x78, /* 01111000 */ + 0x68, /* 01101000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* 71 0x47 'G' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xce, /* 11001110 */ + 0x66, /* 01100110 */ + 0x3a, /* 00111010 */ + 0x00, /* 00000000 */ + + /* 72 0x48 'H' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 73 0x49 'I' */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 74 0x4a 'J' */ + 0x1e, /* 00011110 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x78, /* 01111000 */ + 0x00, /* 00000000 */ + + /* 75 0x4b 'K' */ + 0xe6, /* 11100110 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0x78, /* 01111000 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* 76 0x4c 'L' */ + 0xf0, /* 11110000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0x62, /* 01100010 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 77 0x4d 'M' */ + 0xc6, /* 11000110 */ + 0xee, /* 11101110 */ + 0xfe, /* 11111110 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 78 0x4e 'N' */ + 0xc6, /* 11000110 */ + 0xe6, /* 11100110 */ + 0xf6, /* 11110110 */ + 0xde, /* 11011110 */ + 0xce, /* 11001110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 79 0x4f 'O' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 80 0x50 'P' */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* 81 0x51 'Q' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xce, /* 11001110 */ + 0x7c, /* 01111100 */ + 0x0e, /* 00001110 */ + + /* 82 0x52 'R' */ + 0xfc, /* 11111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x6c, /* 01101100 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* 83 0x53 'S' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 84 0x54 'T' */ + 0x7e, /* 01111110 */ + 0x7e, /* 01111110 */ + 0x5a, /* 01011010 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 85 0x55 'U' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 86 0x56 'V' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 87 0x57 'W' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 88 0x58 'X' */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 89 0x59 'Y' */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 90 0x5a 'Z' */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x8c, /* 10001100 */ + 0x18, /* 00011000 */ + 0x32, /* 00110010 */ + 0x66, /* 01100110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 91 0x5b '[' */ + 0x3c, /* 00111100 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 92 0x5c '\' */ + 0xc0, /* 11000000 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x06, /* 00000110 */ + 0x02, /* 00000010 */ + 0x00, /* 00000000 */ + + /* 93 0x5d ']' */ + 0x3c, /* 00111100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 94 0x5e '^' */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 95 0x5f '_' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + + /* 96 0x60 '`' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 97 0x61 'a' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 98 0x62 'b' */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x7c, /* 01111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + + /* 99 0x63 'c' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 100 0x64 'd' */ + 0x1c, /* 00011100 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 101 0x65 'e' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 102 0x66 'f' */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x60, /* 01100000 */ + 0xf8, /* 11111000 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* 103 0x67 'g' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0xf8, /* 11111000 */ + + /* 104 0x68 'h' */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x6c, /* 01101100 */ + 0x76, /* 01110110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* 105 0x69 'i' */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 106 0x6a 'j' */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + + /* 107 0x6b 'k' */ + 0xe0, /* 11100000 */ + 0x60, /* 01100000 */ + 0x66, /* 01100110 */ + 0x6c, /* 01101100 */ + 0x78, /* 01111000 */ + 0x6c, /* 01101100 */ + 0xe6, /* 11100110 */ + 0x00, /* 00000000 */ + + /* 108 0x6c 'l' */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 109 0x6d 'm' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xec, /* 11101100 */ + 0xfe, /* 11111110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0x00, /* 00000000 */ + + /* 110 0x6e 'n' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* 111 0x6f 'o' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 112 0x70 'p' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + + /* 113 0x71 'q' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0x1e, /* 00011110 */ + + /* 114 0x72 'r' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x76, /* 01110110 */ + 0x60, /* 01100000 */ + 0x60, /* 01100000 */ + 0xf0, /* 11110000 */ + 0x00, /* 00000000 */ + + /* 115 0x73 's' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 116 0x74 't' */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0xfc, /* 11111100 */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x36, /* 00110110 */ + 0x1c, /* 00011100 */ + 0x00, /* 00000000 */ + + /* 117 0x75 'u' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 118 0x76 'v' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 119 0x77 'w' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xd6, /* 11010110 */ + 0xd6, /* 11010110 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 120 0x78 'x' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 121 0x79 'y' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + + /* 122 0x7a 'z' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x4c, /* 01001100 */ + 0x18, /* 00011000 */ + 0x32, /* 00110010 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 123 0x7b '{' */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0e, /* 00001110 */ + 0x00, /* 00000000 */ + + /* 124 0x7c '|' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 125 0x7d '}' */ + 0x70, /* 01110000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* 126 0x7e '~' */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 127 0x7f '' */ + 0x00, /* 00000000 */ + 0x10, /* 00010000 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 128 0x80 '€' */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x0c, /* 00001100 */ + 0x78, /* 01111000 */ + + /* 129 0x81 '' */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 130 0x82 '‚' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 131 0x83 'ƒ' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 132 0x84 '„' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 133 0x85 '…' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 134 0x86 '†' */ + 0x30, /* 00110000 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 135 0x87 '‡' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x7e, /* 01111110 */ + 0x0c, /* 00001100 */ + 0x38, /* 00111000 */ + + /* 136 0x88 'ˆ' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 137 0x89 '‰' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 138 0x8a 'Š' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 139 0x8b '‹' */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 140 0x8c 'Œ' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 141 0x8d '' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 142 0x8e 'Ž' */ + 0xc6, /* 11000110 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 143 0x8f '' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 144 0x90 '' */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xf8, /* 11111000 */ + 0xc0, /* 11000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 145 0x91 '‘' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0xd8, /* 11011000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 146 0x92 '’' */ + 0x3e, /* 00111110 */ + 0x6c, /* 01101100 */ + 0xcc, /* 11001100 */ + 0xfe, /* 11111110 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xce, /* 11001110 */ + 0x00, /* 00000000 */ + + /* 147 0x93 '“' */ + 0x7c, /* 01111100 */ + 0x82, /* 10000010 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 148 0x94 '”' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 149 0x95 '•' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 150 0x96 '–' */ + 0x78, /* 01111000 */ + 0x84, /* 10000100 */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 151 0x97 '—' */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 152 0x98 '˜' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7e, /* 01111110 */ + 0x06, /* 00000110 */ + 0xfc, /* 11111100 */ + + /* 153 0x99 '™' */ + 0xc6, /* 11000110 */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 154 0x9a 'š' */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 155 0x9b '›' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 156 0x9c 'œ' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x64, /* 01100100 */ + 0xf0, /* 11110000 */ + 0x60, /* 01100000 */ + 0x66, /* 01100110 */ + 0xfc, /* 11111100 */ + 0x00, /* 00000000 */ + + /* 157 0x9d '' */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 158 0x9e 'ž' */ + 0xf8, /* 11111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xfa, /* 11111010 */ + 0xc6, /* 11000110 */ + 0xcf, /* 11001111 */ + 0xc6, /* 11000110 */ + 0xc7, /* 11000111 */ + + /* 159 0x9f 'Ÿ' */ + 0x0e, /* 00001110 */ + 0x1b, /* 00011011 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* 160 0xa0 ' ' */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x7c, /* 01111100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 161 0xa1 '¡' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x38, /* 00111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 162 0xa2 '¢' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + + /* 163 0xa3 '£' */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 164 0xa4 '€' */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0xdc, /* 11011100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x00, /* 00000000 */ + + /* 165 0xa5 '¥' */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0xe6, /* 11100110 */ + 0xf6, /* 11110110 */ + 0xde, /* 11011110 */ + 0xce, /* 11001110 */ + 0x00, /* 00000000 */ + + /* 166 0xa6 'Š' */ + 0x3c, /* 00111100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x3e, /* 00111110 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 167 0xa7 '§' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 168 0xa8 'š' */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x63, /* 01100011 */ + 0x3e, /* 00111110 */ + 0x00, /* 00000000 */ + + /* 169 0xa9 '©' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 170 0xaa 'ª' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0x06, /* 00000110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 171 0xab '«' */ + 0x63, /* 01100011 */ + 0xe6, /* 11100110 */ + 0x6c, /* 01101100 */ + 0x7e, /* 01111110 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x0f, /* 00001111 */ + + /* 172 0xac '¬' */ + 0x63, /* 01100011 */ + 0xe6, /* 11100110 */ + 0x6c, /* 01101100 */ + 0x7a, /* 01111010 */ + 0x36, /* 00110110 */ + 0x6a, /* 01101010 */ + 0xdf, /* 11011111 */ + 0x06, /* 00000110 */ + + /* 173 0xad '­' */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 174 0xae '®' */ + 0x00, /* 00000000 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x66, /* 01100110 */ + 0x33, /* 00110011 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 175 0xaf '¯' */ + 0x00, /* 00000000 */ + 0xcc, /* 11001100 */ + 0x66, /* 01100110 */ + 0x33, /* 00110011 */ + 0x66, /* 01100110 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 176 0xb0 '°' */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + 0x22, /* 00100010 */ + 0x88, /* 10001000 */ + + /* 177 0xb1 '±' */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + 0x55, /* 01010101 */ + 0xaa, /* 10101010 */ + + /* 178 0xb2 '²' */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + 0x77, /* 01110111 */ + 0xdd, /* 11011101 */ + + /* 179 0xb3 '³' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 180 0xb4 'Ž' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 181 0xb5 'µ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 182 0xb6 '¶' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 183 0xb7 '·' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 184 0xb8 'ž' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 185 0xb9 '¹' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x06, /* 00000110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 186 0xba 'º' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 187 0xbb '»' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x06, /* 00000110 */ + 0xf6, /* 11110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 188 0xbc 'Œ' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf6, /* 11110110 */ + 0x06, /* 00000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 189 0xbd 'œ' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 190 0xbe 'Ÿ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 191 0xbf '¿' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xf8, /* 11111000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 192 0xc0 'À' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 193 0xc1 'Á' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 194 0xc2 'Â' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 195 0xc3 'Ã' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 196 0xc4 'Ä' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 197 0xc5 'Å' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 198 0xc6 'Æ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 199 0xc7 'Ç' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 200 0xc8 'È' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x30, /* 00110000 */ + 0x3f, /* 00111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 201 0xc9 'É' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x30, /* 00110000 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 202 0xca 'Ê' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf7, /* 11110111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 203 0xcb 'Ë' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xf7, /* 11110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 204 0xcc 'Ì' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x37, /* 00110111 */ + 0x30, /* 00110000 */ + 0x37, /* 00110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 205 0xcd 'Í' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 206 0xce 'Î' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xf7, /* 11110111 */ + 0x00, /* 00000000 */ + 0xf7, /* 11110111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 207 0xcf 'Ï' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 208 0xd0 'Ð' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 209 0xd1 'Ñ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 210 0xd2 'Ò' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 211 0xd3 'Ó' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x3f, /* 00111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 212 0xd4 'Ô' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 213 0xd5 'Õ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 214 0xd6 'Ö' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3f, /* 00111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 215 0xd7 '×' */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0xff, /* 11111111 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + + /* 216 0xd8 'Ø' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0xff, /* 11111111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 217 0xd9 'Ù' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xf8, /* 11111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 218 0xda 'Ú' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x1f, /* 00011111 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 219 0xdb 'Û' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 220 0xdc 'Ü' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + + /* 221 0xdd 'Ý' */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + 0xf0, /* 11110000 */ + + /* 222 0xde 'Þ' */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + 0x0f, /* 00001111 */ + + /* 223 0xdf 'ß' */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0xff, /* 11111111 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 224 0xe0 'à' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0xc8, /* 11001000 */ + 0xdc, /* 11011100 */ + 0x76, /* 01110110 */ + 0x00, /* 00000000 */ + + /* 225 0xe1 'á' */ + 0x78, /* 01111000 */ + 0xcc, /* 11001100 */ + 0xcc, /* 11001100 */ + 0xd8, /* 11011000 */ + 0xcc, /* 11001100 */ + 0xc6, /* 11000110 */ + 0xcc, /* 11001100 */ + 0x00, /* 00000000 */ + + /* 226 0xe2 'â' */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0xc0, /* 11000000 */ + 0x00, /* 00000000 */ + + /* 227 0xe3 'ã' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x00, /* 00000000 */ + + /* 228 0xe4 'ä' */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + + /* 229 0xe5 'å' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + 0x00, /* 00000000 */ + + /* 230 0xe6 'æ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x7c, /* 01111100 */ + 0xc0, /* 11000000 */ + + /* 231 0xe7 'ç' */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + + /* 232 0xe8 'è' */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x3c, /* 00111100 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + + /* 233 0xe9 'é' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xfe, /* 11111110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + + /* 234 0xea 'ê' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0xee, /* 11101110 */ + 0x00, /* 00000000 */ + + /* 235 0xeb 'ë' */ + 0x0e, /* 00001110 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x3e, /* 00111110 */ + 0x66, /* 01100110 */ + 0x66, /* 01100110 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + + /* 236 0xec 'ì' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 237 0xed 'í' */ + 0x06, /* 00000110 */ + 0x0c, /* 00001100 */ + 0x7e, /* 01111110 */ + 0xdb, /* 11011011 */ + 0xdb, /* 11011011 */ + 0x7e, /* 01111110 */ + 0x60, /* 01100000 */ + 0xc0, /* 11000000 */ + + /* 238 0xee 'î' */ + 0x1e, /* 00011110 */ + 0x30, /* 00110000 */ + 0x60, /* 01100000 */ + 0x7e, /* 01111110 */ + 0x60, /* 01100000 */ + 0x30, /* 00110000 */ + 0x1e, /* 00011110 */ + 0x00, /* 00000000 */ + + /* 239 0xef 'ï' */ + 0x00, /* 00000000 */ + 0x7c, /* 01111100 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0xc6, /* 11000110 */ + 0x00, /* 00000000 */ + + /* 240 0xf0 'ð' */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0xfe, /* 11111110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 241 0xf1 'ñ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x7e, /* 01111110 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 242 0xf2 'ò' */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 243 0xf3 'ó' */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x18, /* 00011000 */ + 0x0c, /* 00001100 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + + /* 244 0xf4 'ô' */ + 0x0e, /* 00001110 */ + 0x1b, /* 00011011 */ + 0x1b, /* 00011011 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + + /* 245 0xf5 'õ' */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0xd8, /* 11011000 */ + 0xd8, /* 11011000 */ + 0x70, /* 01110000 */ + + /* 246 0xf6 'ö' */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x7e, /* 01111110 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 247 0xf7 '÷' */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x76, /* 01110110 */ + 0xdc, /* 11011100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 248 0xf8 'ø' */ + 0x38, /* 00111000 */ + 0x6c, /* 01101100 */ + 0x6c, /* 01101100 */ + 0x38, /* 00111000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 249 0xf9 'ù' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 250 0xfa 'ú' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x18, /* 00011000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 251 0xfb 'û' */ + 0x0f, /* 00001111 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0x0c, /* 00001100 */ + 0xec, /* 11101100 */ + 0x6c, /* 01101100 */ + 0x3c, /* 00111100 */ + 0x1c, /* 00011100 */ + + /* 252 0xfc 'ü' */ + 0x6c, /* 01101100 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x36, /* 00110110 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 253 0xfd 'ý' */ + 0x78, /* 01111000 */ + 0x0c, /* 00001100 */ + 0x18, /* 00011000 */ + 0x30, /* 00110000 */ + 0x7c, /* 01111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 254 0xfe 'þ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x3c, /* 00111100 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + + /* 255 0xff 'ÿ' */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + 0x00, /* 00000000 */ + +}; + + +struct fbcon_font_desc font_vga_8x8 = { + VGA8x8_IDX, + "VGA8x8", + 8, + 8, + fontdata_8x8, + 0 +}; + + +union multiptr { + unsigned char *p8; + unsigned short *p16; + unsigned long *p32; +}; + +static int con_fd, last_vt = -1; +static struct fb_fix_screeninfo fix; +static struct fb_var_screeninfo var; +static unsigned char *fbuffer; +static unsigned char **line_addr; +static int fb_fd=0; +static int bytes_per_pixel; +static unsigned colormap [256]; +__u32 xres, yres; + +static char *defaultfbdevice = "/dev/fb0"; +static char *defaultconsoledevice = "/dev/tty"; +static char *fbdevice = NULL; +static char *consoledevice = NULL; + +int open_framebuffer(void) +{ + struct vt_stat vts; + char vtname[128]; + int fd, nr; + unsigned y, addr; + + if ((fbdevice = getenv ("TSLIB_FBDEVICE")) == NULL) + fbdevice = defaultfbdevice; + + if ((consoledevice = getenv ("TSLIB_CONSOLEDEVICE")) == NULL) + consoledevice = defaultconsoledevice; + + if (strcmp (consoledevice, "none") != 0) { + sprintf (vtname,"%s%d", consoledevice, 1); + fd = open (vtname, O_WRONLY); + if (fd < 0) { + perror("open consoledevice"); + return -1; + } + + if (ioctl(fd, VT_OPENQRY, &nr) < 0) { + perror("ioctl VT_OPENQRY"); + return -1; + } + close(fd); + + sprintf(vtname, "%s%d", consoledevice, nr); + + con_fd = open(vtname, O_RDWR | O_NDELAY); + if (con_fd < 0) { + perror("open tty"); + return -1; + } + + if (ioctl(con_fd, VT_GETSTATE, &vts) == 0) + last_vt = vts.v_active; + + if (ioctl(con_fd, VT_ACTIVATE, nr) < 0) { + perror("VT_ACTIVATE"); + close(con_fd); + return -1; + } + + if (ioctl(con_fd, VT_WAITACTIVE, nr) < 0) { + perror("VT_WAITACTIVE"); + close(con_fd); + return -1; + } + + if (ioctl(con_fd, KDSETMODE, KD_GRAPHICS) < 0) { + perror("KDSETMODE"); + close(con_fd); + return -1; + } + + } + + fb_fd = open(fbdevice, O_RDWR); + if (fb_fd == -1) { + perror("open fbdevice"); + return -1; + } + + if (ioctl(fb_fd, FBIOGET_FSCREENINFO, &fix) < 0) { + perror("ioctl FBIOGET_FSCREENINFO"); + close(fb_fd); + return -1; + } + + if (ioctl(fb_fd, FBIOGET_VSCREENINFO, &var) < 0) { + perror("ioctl FBIOGET_VSCREENINFO"); + close(fb_fd); + return -1; + } + xres = var.xres; + yres = var.yres; + + fbuffer = mmap(NULL, fix.smem_len, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, fb_fd, 0); + if (fbuffer == (unsigned char *)-1) { + perror("mmap framebuffer"); + close(fb_fd); + return -1; + } + memset(fbuffer,0,fix.smem_len); + + bytes_per_pixel = (var.bits_per_pixel + 7) / 8; + line_addr = malloc (sizeof (__u32) * var.yres_virtual); + addr = 0; + for (y = 0; y < var.yres_virtual; y++, addr += fix.line_length) + line_addr [y] = fbuffer + addr; + + return 0; +} + +void close_framebuffer(void) +{ + munmap(fbuffer, fix.smem_len); + close(fb_fd); + + + if(strcmp(consoledevice,"none")!=0) { + + if (ioctl(con_fd, KDSETMODE, KD_TEXT) < 0) + perror("KDSETMODE"); + + if (last_vt >= 0) + if (ioctl(con_fd, VT_ACTIVATE, last_vt)) + perror("VT_ACTIVATE"); + + close(con_fd); + } + + free (line_addr); +} + +void put_cross(int x, int y, unsigned colidx) +{ + line (x - 10, y, x - 2, y, colidx); + line (x + 2, y, x + 10, y, colidx); + line (x, y - 10, x, y - 2, colidx); + line (x, y + 2, x, y + 10, colidx); + +#if 1 + line (x - 6, y - 9, x - 9, y - 9, colidx + 1); + line (x - 9, y - 8, x - 9, y - 6, colidx + 1); + line (x - 9, y + 6, x - 9, y + 9, colidx + 1); + line (x - 8, y + 9, x - 6, y + 9, colidx + 1); + line (x + 6, y + 9, x + 9, y + 9, colidx + 1); + line (x + 9, y + 8, x + 9, y + 6, colidx + 1); + line (x + 9, y - 6, x + 9, y - 9, colidx + 1); + line (x + 8, y - 9, x + 6, y - 9, colidx + 1); +#else + line (x - 7, y - 7, x - 4, y - 4, colidx + 1); + line (x - 7, y + 7, x - 4, y + 4, colidx + 1); + line (x + 4, y - 4, x + 7, y - 7, colidx + 1); + line (x + 4, y + 4, x + 7, y + 7, colidx + 1); +#endif +} + +void put_char(int x, int y, int c, int colidx) +{ + int i,j,bits; + + for (i = 0; i < font_vga_8x8.height; i++) { + bits = font_vga_8x8.data [font_vga_8x8.height * c + i]; + for (j = 0; j < font_vga_8x8.width; j++, bits <<= 1) + if (bits & 0x80) + pixel (x + j, y + i, colidx); + } +} + +void put_string(int x, int y, char *s, unsigned colidx) +{ + int i; + for (i = 0; *s; i++, x += font_vga_8x8.width, s++) + put_char (x, y, *s, colidx); +} + +void put_string_center(int x, int y, char *s, unsigned colidx) +{ + size_t sl = strlen (s); + put_string (x - (sl / 2) * font_vga_8x8.width, + y, s, colidx); +} + +void put_int(int x, int y, int c, int colidx) +{ + int i = 1, tam = 0, num = c; + + for(;;i *= 10) + { + if(num/i) + tam++; + else + break; + } + + fillrect(x,y,x+8*(tam+1),y+8,0); + + char string[tam]; + tam=0; + + while(num) + { + i /= 10; + string[tam] = (char)(num/i + 48); + num %= i; + tam++; + } + string[tam] = '\0'; + + put_string(x, y, &string, colidx); +} + + +void setcolor(unsigned colidx, unsigned value) +{ + unsigned res; + unsigned short red, green, blue; + struct fb_cmap cmap; + +#ifdef DEBUG + if (colidx > 255) { + fprintf (stderr, "WARNING: color index = %u, must be <256\n", + colidx); + return; + } +#endif + + switch (bytes_per_pixel) { + default: + case 1: + res = colidx; + red = (value >> 8) & 0xff00; + green = value & 0xff00; + blue = (value << 8) & 0xff00; + cmap.start = colidx; + cmap.len = 1; + cmap.red = &red; + cmap.green = &green; + cmap.blue = &blue; + cmap.transp = NULL; + + if (ioctl (fb_fd, FBIOPUTCMAP, &cmap) < 0) + perror("ioctl FBIOPUTCMAP"); + break; + case 2: + case 4: + red = (value >> 16) & 0xff; + green = (value >> 8) & 0xff; + blue = value & 0xff; + res = ((red >> (8 - var.red.length)) << var.red.offset) | + ((green >> (8 - var.green.length)) << var.green.offset) | + ((blue >> (8 - var.blue.length)) << var.blue.offset); + } + colormap [colidx] = res; +} + +static inline void __setpixel (union multiptr loc, unsigned xormode, unsigned color) +{ + switch(bytes_per_pixel) { + case 1: + default: + if (xormode) + *loc.p8 ^= color; + else + *loc.p8 = color; + break; + case 2: + if (xormode) + *loc.p16 ^= color; + else + *loc.p16 = color; + break; + case 4: + if (xormode) + *loc.p32 ^= color; + else + *loc.p32 = color; + break; + } +} + +void pixel (int x, int y, unsigned colidx) +{ + unsigned xormode; + union multiptr loc; + + if ((x < 0) || ((__u32)x >= var.xres_virtual) || + (y < 0) || ((__u32)y >= var.yres_virtual)) + return; + + xormode = colidx & XORMODE; + colidx &= ~XORMODE; + +#ifdef DEBUG + if (colidx > 255) { + fprintf (stderr, "WARNING: color value = %u, must be <256\n", + colidx); + return; + } +#endif + + loc.p8 = line_addr [y] + x * bytes_per_pixel; + __setpixel (loc, xormode, colormap [colidx]); +} + +void line (int x1, int y1, int x2, int y2, unsigned colidx) +{ + int tmp; + int dx = x2 - x1; + int dy = y2 - y1; + + if (abs (dx) < abs (dy)) { + if (y1 > y2) { + tmp = x1; x1 = x2; x2 = tmp; + tmp = y1; y1 = y2; y2 = tmp; + dx = -dx; dy = -dy; + } + x1 <<= 16; + /* dy is apriori >0 */ + dx = (dx << 16) / dy; + while (y1 <= y2) { + pixel (x1 >> 16, y1, colidx); + x1 += dx; + y1++; + } + } else { + if (x1 > x2) { + tmp = x1; x1 = x2; x2 = tmp; + tmp = y1; y1 = y2; y2 = tmp; + dx = -dx; dy = -dy; + } + y1 <<= 16; + dy = dx ? (dy << 16) / dx : 0; + while (x1 <= x2) { + pixel (x1, y1 >> 16, colidx); + y1 += dy; + x1++; + } + } +} + +void rect (int x1, int y1, int x2, int y2, unsigned colidx) +{ + line (x1, y1, x2, y1, colidx); + line (x2, y1, x2, y2, colidx); + line (x2, y2, x1, y2, colidx); + line (x1, y2, x1, y1, colidx); +} + +void fillrect (int x1, int y1, int x2, int y2, unsigned colidx) +{ + int tmp; + unsigned xormode; + union multiptr loc; + + /* Clipping and sanity checking */ + if (x1 > x2) { tmp = x1; x1 = x2; x2 = tmp; } + if (y1 > y2) { tmp = y1; y1 = y2; y2 = tmp; } + if (x1 < 0) x1 = 0; if ((__u32)x1 >= xres) x1 = xres - 1; + if (x2 < 0) x2 = 0; if ((__u32)x2 >= xres) x2 = xres - 1; + if (y1 < 0) y1 = 0; if ((__u32)y1 >= yres) y1 = yres - 1; + if (y2 < 0) y2 = 0; if ((__u32)y2 >= yres) y2 = yres - 1; + + if ((x1 > x2) || (y1 > y2)) + return; + + xormode = colidx & XORMODE; + colidx &= ~XORMODE; + +#ifdef DEBUG + if (colidx > 255) { + fprintf (stderr, "WARNING: color value = %u, must be <256\n", + colidx); + return; + } +#endif + + colidx = colormap [colidx]; + + for (; y1 <= y2; y1++) { + loc.p8 = line_addr [y1] + x1 * bytes_per_pixel; + for (tmp = x1; tmp <= x2; tmp++) { + __setpixel (loc, xormode, colidx); + loc.p8 += bytes_per_pixel; + } + } +} + +static int palette [] = \ +{ + 0x000000, 0xffffff, 0xff0000, 0x00ff00, 0x0000ff +}; +#define NR_COLORS (sizeof (palette) / sizeof (palette [0])) + +void setColorsFromDefaultPallet() +{ + int i; + for (i = 0; i < NR_COLORS; i++) + setcolor (i, palette [i]); +} + diff --git a/Software/sie_cg/tmp/SIE_APP/fbutils.h b/Software/sie_cg/tmp/SIE_APP/fbutils.h new file mode 100644 index 0000000..7f9227f --- /dev/null +++ b/Software/sie_cg/tmp/SIE_APP/fbutils.h @@ -0,0 +1,63 @@ +/* + * fbutils.h + * + * Headers for utility routines for framebuffer interaction + * + * Copyright 2002 Russell King and Doug Lowder + * + * This file is placed under the GPL. Please see the + * file COPYING for details. + * + */ + +#ifndef _FBUTILS_H +#define _FBUTILS_H + +#include +#include + +/* This constant, being ORed with the color index tells the library + * to draw in exclusive-or mode (that is, drawing the same second time + * in the same place will remove the element leaving the background intact). + */ +#define XORMODE 0x80000000 + +extern __u32 xres, yres; + +int open_framebuffer(void); +void close_framebuffer(void); +void setcolor(unsigned colidx, unsigned value); +void put_cross(int x, int y, unsigned colidx); +void put_string(int x, int y, char *s, unsigned colidx); +void put_string_center(int x, int y, char *s, unsigned colidx); +void pixel (int x, int y, unsigned colidx); +void line (int x1, int y1, int x2, int y2, unsigned colidx); +void rect (int x1, int y1, int x2, int y2, unsigned colidx); +void fillrect (int x1, int y1, int x2, int y2, unsigned colidx); +void setColorsFromDefaultPallet(); +void put_int(int x, int y, int c, int colidx); + +/* + *FONT + */ + +struct fbcon_font_desc { + int idx; + const char *name; + int width, height; + unsigned char *data; + int pref; +}; + +#define VGA8x8_IDX 0 +#define PEARL8x8_IDX 2 +#define VGA6x11_IDX 3 +#define SUN8x16_IDX 4 +#define SUN12x22_IDX 5 +#define ACORN8x8_IDX 6 + +/* Max. length for the name of a predefined font */ +#define MAX_FONT_NAME 32 +#define FONTDATAMAX 2048 + +#endif /* _FBUTILS_H */ diff --git a/Software/sie_cg/tmp/SIE_APP/fbutils.o b/Software/sie_cg/tmp/SIE_APP/fbutils.o new file mode 100644 index 0000000000000000000000000000000000000000..b8ef212c4d14809e7aa118875c667907fbbdc67b GIT binary patch literal 11572 zcma)CeQaCTbw7NfC|PFh7gbANV>RK6XjzsOg|=0P%{ZI3K5VaUtR_n86~#n-kd_Ks zQY1xHR*hjDuhlkA(f|W>hWtU;PU96`R4arI*9uo{gW^9Egz+S4gspD-~;ccp; zb^^KI@4icmk{ck`p?>##+;h%7_uLOkd9L+Po6F^rLUT#EtWYAaZ4xOprM*ch)Jdgm zET}59gGqTv7TmTk4Z0-MAwB+b=}v7ke=1ufY*J~nq}@cX;-3~<@r_XaxsuS5w5Ia; z9+)>me(O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^cRV+cMDjGFWF0!1DCbD9N&v6cLPg(s1KkAXp#?m zRit6hA`N?fBJ_R0QXBh&a$p1b&_ATtBS1dJHIa{T_`|9icY%3%5c#DX*rMg_T7C#v zT7&b3a^Mjyk7#)v=Z*c|OF6KQeE40^`HqthzeD81?>G_hhB?lUw5QU)9ZbL ze2kkUALC9EF>VG}x*6+EIq*gDF|JRKOOuarXUWGnbOry@pt`pW>@zl_9)5`15C`!g zoS(!-#6f%*bwmuH4v09v7l=6D#RYr>m&iNB5U#IW<7h< +#include +#include + +#include +#include + + +#define JZ_GPIO_BASE 0x10010000 + +void +jz_gpio_as_output (JZ_PIO * pio, unsigned int o) +{ + pio->PXFUNC = (1 << (o)); + pio->PXSELC = (1 << (o)); + pio->PXDIRS = (1 << (o)); +} + +void +jz_gpio_as_input (JZ_PIO * pio, unsigned int o) +{ + pio->PXFUNC = (1 << (o)); + pio->PXSELC = (1 << (o)); + pio->PXDIRC = (1 << (o)); +} + +void +jz_gpio_set_pin (JZ_PIO * pio, unsigned int o) +{ + pio->PXDATS = (1 << (o)); +} + +void +jz_gpio_clear_pin (JZ_PIO * pio, unsigned int o) +{ + pio->PXDATC = (1 << (o)); +} + +void +jz_gpio_out (JZ_PIO * pio, unsigned int o, unsigned int val) +{ + if (val == 0) + pio->PXDATC = (1 << (o)); + else + pio->PXDATS = (1 << (o)); +} + +unsigned int +jz_gpio_get_pin (JZ_PIO * pio, unsigned int o) +{ + return (pio->PXPIN & (1 << o)) ? 1 : 0; +} + +int +jz_gpio_as_func (JZ_PIO * pio, unsigned int o, int func) +{ + switch (func) + { + case 0: + pio->PXFUNS = (1 << o); + pio->PXTRGC = (1 << o); + pio->PXSELC = (1 << o); + return 1; + + case 1: + pio->PXFUNS = (1 << o); + pio->PXTRGC = (1 << o); + pio->PXSELS = (1 << o); + return 1; + + case 2: + pio->PXFUNS = (1 << o); + pio->PXTRGS = (1 << o); + pio->PXSELC = (1 << o); + return 1; + } + return 0; +} + +JZ_PIO * +jz_gpio_map (int port) +{ + JZ_PIO *pio; + + pio = (JZ_PIO *) jz_mmap (JZ_GPIO_BASE); + pio = (JZ_PIO *) ((unsigned int) pio + port * 0x100); + + return pio; +} diff --git a/Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.h b/Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.h new file mode 100755 index 0000000..d8b0113 --- /dev/null +++ b/Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.h @@ -0,0 +1,84 @@ +/* + JZ47xx GPIO at userspace + + Copyright (C) 2010 Andres Calderon andres.calderon@emqbit.com + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef __jz47xx_gpio_h__ +#define __jz47xx_gpio_h__ + +#define JZ_GPIO_PORT_A 0 +#define JZ_GPIO_PORT_B 1 +#define JZ_GPIO_PORT_C 2 +#define JZ_GPIO_PORT_D 3 + +typedef volatile unsigned int JZ_REG; /* Hardware register definition */ + +typedef struct _JZ_PIO +{ + JZ_REG PXPIN; /* PIN Level Register */ + JZ_REG Reserved0; + JZ_REG Reserved1; + JZ_REG Reserved2; + JZ_REG PXDAT; /* Port Data Register */ + JZ_REG PXDATS; /* Port Data Set Register */ + JZ_REG PXDATC; /* Port Data Clear Register */ + JZ_REG Reserved3; + JZ_REG PXIM; /* Interrupt Mask Register */ + JZ_REG PXIMS; /* Interrupt Mask Set Reg */ + JZ_REG PXIMC; /* Interrupt Mask Clear Reg */ + JZ_REG Reserved4; + JZ_REG PXPE; /* Pull Enable Register */ + JZ_REG PXPES; /* Pull Enable Set Reg. */ + JZ_REG PXPEC; /* Pull Enable Clear Reg. */ + JZ_REG Reserved5; + JZ_REG PXFUN; /* Function Register */ + JZ_REG PXFUNS; /* Function Set Register */ + JZ_REG PXFUNC; /* Function Clear Register */ + JZ_REG Reserved6; + JZ_REG PXSEL; /* Select Register */ + JZ_REG PXSELS; /* Select Set Register */ + JZ_REG PXSELC; /* Select Clear Register */ + JZ_REG Reserved7; + JZ_REG PXDIR; /* Direction Register */ + JZ_REG PXDIRS; /* Direction Set Register */ + JZ_REG PXDIRC; /* Direction Clear Register */ + JZ_REG Reserved8; + JZ_REG PXTRG; /* Trigger Register */ + JZ_REG PXTRGS; /* Trigger Set Register */ + JZ_REG PXTRGC; /* Trigger Set Register */ + JZ_REG Reserved9; + JZ_REG PXFLG; /* Port Flag Register */ + JZ_REG PXFLGC; /* Port Flag clear Register */ +} JZ_PIO, *PJZ_PIO; + +void jz_gpio_as_output (JZ_PIO * pio, unsigned int o); + +void jz_gpio_as_input (JZ_PIO * pio, unsigned int o); + +void jz_gpio_set_pin (JZ_PIO * pio, unsigned int o); + +void jz_gpio_clear_pin (JZ_PIO * pio, unsigned int o); + +void jz_gpio_out (JZ_PIO * pio, unsigned int o, unsigned int val); + +unsigned int jz_gpio_get_pin (JZ_PIO * pio, unsigned int o); + +int jz_gpio_as_func (JZ_PIO * pio, unsigned int o, int func); + +JZ_PIO *jz_gpio_map (int port); + +#endif diff --git a/Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.o b/Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.o new file mode 100644 index 0000000000000000000000000000000000000000..d798588cec060fbbcba8bfe769327e42afd3c61e GIT binary patch literal 2216 zcmdT`OKTHR6h1SPYNfG`nnl1CTc}tm4AxewqEKypBASIl>B8xxohB)H49P^>QZUqw z3$ZS{vnU9HpnpItx^Uxfkgmj);6mI8@%v_SlW8sL)&qz0e%y1TeF4^7>V8ttJV1`wHpfni)F-enpl|=`~ZB-|H3TPRg6Z ztiL4M8tK16HyjWC!TJBPYqg*CdR-kS2}boFTn=PyF(um4!M4CB-io>Fq(`Y7 z?@W$A)-ONd(q0-HJKfWN>H4iBJ;TJW|C=9Yj@~>y3=8t{P86^%<+H$OsZ|OQ1^o!8fYEbIpovlFcn;1$ zo#Q+sy{A%=8PtU4dJWk6a2Et-Ff4oCWJruj<|guX2NxkI1)=OaqiH z1NnQsUQ+r`@Kdv;PWkNxuVzgBSNPo}(*Wg13R4rl;02_h*J!?zSoEYy z0$YTI)Pkr!Cf}NGkRHaCC}UFv+SToa`HWz5TDgr)lcj(7e3ggM+-?=m6ScsQxNuGc zzV&_RXRyI5nfG@R$nOO0MbK*z`4RXjU_X%d7oZP-+)c_KK-YlzhWr^+eN$-v0a*d( zj30$21ij5I4v);w+ZiucvZg&x?8(8Axy3-Xor+zm`d-yfjo4Qw?bMYUbF`m`*mK3- z%*U0v;`+9iD{c;MCZEo`PWgBHpo&K2R%B4OnK-ju;-(c{&sK}mt>7G+ZssjG9u@4P z06s6aoxuP+w_GU|oqWz;u +#include +#include +#include +#include +#include +#include + +#include "jz47xx_gpio.h" + +unsigned int * jz_mmap (off_t address); + +#endif diff --git a/Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.o b/Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.o new file mode 100644 index 0000000000000000000000000000000000000000..ff5984504eb0779e1c08a80aca5cd824b3d3a877 GIT binary patch literal 1884 zcma)7O=}ZT6upy~^ov^C`awa(1R{+n(@(I9LbcT*6se#aDa1+hnx0c1)PKf8s%uA;t=!G};o_o)`@4h>4-aNWKeZw#e(PBuO z>?4usgh;YmW<~=-R(hmMQv?02vD=@L58LUjbztkV$VR4Dl9`k8e!EZJZD-{3HUgcE zMi2bAyVL9AfYQlFIy)}ul!z%U8ADn#-QdIBc@+7&!DT+o-$edRO|O4UzQYpRmce!HXTcU`AOC`U<#7^^d4tes8=27cCFtmq)?!&2T zWPP-`hj_j_Xs&`!i_WL9)^WcjKbqe=<7TtkkZm4VfpOhM9p{_f7xO@8$?w1&8kcrC z4j5dBfxA68_n9Uo{$@Boyf$>BWA|N0^Fz8~OwDTx(&R z=TZytO%0%lXJR7 z0bPMk9uZlCZh>AWMq4+Cq45(D3zzc?Y8 +#include + +#include "jz_adc_peripheral.h" + +void ADCTest(JZ_REG * ADCBuffer) +{ +if(ADCBuffer!=0) +{ + int aggregate=0; float errorT=0; + /******************************* TEST 1 ***********************************/ + printf("\nINIT TEST1: Autoselft {(Vref+) - (Vref-)}/2 -> Return 0x0200 \n"); + ADCConfig(ADCBuffer,ADC_CMD_SET_AUTOSELFT_1); + ADCConfig(ADCBuffer,ADC_CMD_READ_AUTOSELFT_1); + for(int i=ADC_BUFFER_OFFSET; i< ADC_BUFFER_LEN/2+ADC_BUFFER_OFFSET; i++) + { + aggregate += (ADCBuffer[i]&0xFFFF + ((ADCBuffer[i]>>16)&0x0FFF)); + printf("[%08X]", ADCBuffer[i]); + } + errorT=(aggregate/16)*100/0x200; + if((errorT<95)||(errorT>105)) + printf("\n**WARNING** Test FAILED.\n\n"); + else + printf("\nTest OK\n\n"); + + fflush (stdout); +} +} + +void ADCPowerDown(JZ_REG * ADCBuffer) +{ + ADCConfig(ADCBuffer,ADC_CMD_SET_POWER_DOWN); +} + +JZ_REG * ADCTakeSamples(JZ_REG * ADCBuffer,int CHANNEL) +{ + ADCConfig(ADCBuffer,ADC_CMD_SET_CHANNEL0+CHANNEL); + ADCConfig(ADCBuffer,ADC_CMD_READ_CHANNEL0+CHANNEL); + return (JZ_REG*)(ADCBuffer+ADC_BUFFER_OFFSET); +} + +void ADCConfig(JZ_REG * ADCBuffer,uchar CMD) +{ + if(ADCBuffer!=0) + { + ADCBuffer[0] = (((ADC_MUX_CHANNELS<<6) + CMD)<<24) + \ + ((ADC_BUFFER_LEN+ADC_BUFFER_OFFSET*2) << 8) + \ + (ADC_SPI_CLKDIV); + while(ADCCheckBufferFull(ADCBuffer)) usleep (10); + } +} + +int ADCCheckBufferFull(JZ_REG * ADCBuffer) +{ + if(ADCBuffer!=0) + { + return ADCBuffer[0]&0x20000000; + } + return 0; +} diff --git a/Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.h b/Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.h new file mode 100755 index 0000000..8544297 --- /dev/null +++ b/Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.h @@ -0,0 +1,86 @@ +/* ADC Peripheral.h + +Copyright (C) 2010 Carlos Camargo cicamargoba@unal.edu.co + Andres Calderon andres.calderon@emqbit.com + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef __adc_peripheral_h__ +#define __adc_peripheral_h__ + +#define ADC_CMD_NONE 0x00 /* Nothing to do */ +#define ADC_CMD_SET_SPI_CLKDIV 0x00 /* Set clock divider for ADC sclk */ +#define ADC_CMD_SET_BUFFER_SIZE 0x00 /* Set clock divider for ADC sclk */ + +#define ADC_CMD_SET_CHANNEL0 0x30 /* Set channel 0 */ +#define ADC_CMD_READ_CHANNEL0 0x20 /* Read channel 0 */ + +#define ADC_CMD_SET_CHANNEL1 0x31 /* Set channel 1 */ +#define ADC_CMD_READ_CHANNEL1 0x21 /* Read channel 1 */ + +#define ADC_CMD_SET_CHANNEL2 0x32 /* Set channel 2 */ +#define ADC_CMD_READ_CHANNEL2 0x22 /* Read channel 2 */ + +#define ADC_CMD_SET_CHANNEL3 0x33 /* Set channel 3 */ +#define ADC_CMD_READ_CHANNEL3 0x23 /* Read channel 3 */ + +#define ADC_CMD_SET_CHANNEL4 0x34 /* Set channel 4 */ +#define ADC_CMD_READ_CHANNEL4 0x24 /* Read channel 4 */ + +#define ADC_CMD_SET_CHANNEL5 0x35 /* Set channel 5 */ +#define ADC_CMD_READ_CHANNEL5 0x25 /* Read channel 5 */ + +#define ADC_CMD_SET_CHANNEL6 0x36 /* Set channel 6 */ +#define ADC_CMD_READ_CHANNEL6 0x26 /* Read channel 6 */ + +#define ADC_CMD_SET_CHANNEL7 0x37 /* Set channel 7 */ +#define ADC_CMD_READ_CHANNEL7 0x27 /* Read channel 8 */ + +#define ADC_CMD_SET_POWER_DOWN 0X38 /* Set ADC power down mode (1uA) */ + +#define ADC_CMD_SET_FAST_CONV 0X39 /* Initialize ADC Fast Convertion(<10us)*/ + +#define ADC_CMD_SET_LOW_CONV 0X3A /* Initialize ADC Slow Convertion(<40us)*/ + +#define ADC_CMD_SET_AUTOSELFT_1 0x3B /* Set Autoselft ADC {(Vref+)-(Vref-)}/2*/ +#define ADC_CMD_READ_AUTOSELFT_1 0x2B /* Read Autoselft ADC 1 (0x0200) */ + +#define ADC_CMD_SET_AUTOSELFT_2 0x3C /* Set Autoselft ADC (Vref-) */ +#define ADC_CMD_READ_AUTOSELFT_2 0x2C /* Read Autoselft ADC 2 (0x0000) */ + +#define ADC_CMD_SET_AUTOSELFT_3 0x3D /* Set Autoselft ADC (Vref+) */ +#define ADC_CMD_READ_AUTOSELFT_3 0x2D /* Read Autoselft ADC 3 (0x03FF) */ + +#define ADC_SPI_CLKDIV_MIN 0x08 /* 50/(2*9) -> 2.78MHz (MAX=2.8MHz) */ +#define ADC_SPI_CLKDIV_MAX 0xFF /* 50/(2*256) -> 97.65KHz */ + +#define ADC_MAX_BUFFER 0x3FE/* 1022 reads/commands */ + + +typedef unsigned char uchar; +typedef volatile unsigned int JZ_REG; + +static uchar ADC_SPI_CLKDIV=ADC_SPI_CLKDIV_MAX; //Set clock to minimum speed +static int ADC_BUFFER_LEN=16; +static int ADC_BUFFER_OFFSET= 8; //Ignore first 16 samples +static uchar ADC_MUX_CHANNELS=0; + +void ADCTest(JZ_REG * ADCBuffer); +void ADCPowerDown(JZ_REG * ADCBuffer); +JZ_REG * ADCTakeSamples(JZ_REG * ADCBuffer,int CHANNEL); +void ADCConfig(JZ_REG * ADCBuffer,uchar CMD); +int ADCCheckBufferFull(JZ_REG * ADCBuffer); + +#endif diff --git a/Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.o b/Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.o new file mode 100644 index 0000000000000000000000000000000000000000..4fe0e092974829678fe6ebbb57625bd5945409d5 GIT binary patch literal 3144 zcmbVOO>9(E6h1R=rnIG&0u_rExkCmhMaI`3V!^7@KWbxB8YoB*Go7|?+JR|joOvS! zQ76;|3(^+QodIH^aX~B!CN4m6=fXr{h;iY9g$om1VAO;}ljrxnnLC|!q3B7@{m$P# z_nv$2J2P+g^zZR_Jfg`X<+7-WwE9K-H8R-h1~kYTS*1f=^h>TLZoWs|)q=#X_BYyb#FckRey&$a|)&^NOQ7gCeJ|h~(!7>qcaS4A+QS z-HyCfmEwcnm<`swB7Zu=wOk9i=8$U+dFQx}lABxgI*wd5P4RExT8_ML2F~Odzrb8d zYPLAyZ>Ahj%F8@THZgWdF8Isa#2>s}*!vTh-yokZ1m*gIl542t6StOL)WLd0eC}RF z-U|z zfV%AUNYj?Ud>Uz`%7+}kIW6l}Nf&Z;HU?DKyHbsa5%7tu_eoCqFlPokBc2w=GlTr6 z8yLg+U7KLfg&}&e=bp2)1+eEb2_wN$Tb+dK;0G<%myhW_i!+(Snatr#aE90Ba3;k& z!Gv-Xck)j$yf?=D-`wuDFtp2am$m#LxB)>Mi-AV&FUN7Tsv!I~zn-~>OXokgB)?gb zzp`(jZ%7UG>>p~{tva%HGGirTwtB7MVA_gp-==mbSK6`d^(ULvj%U?A%g&~!lsRoS zo2C+ZX|vgO=w*@0#>N*r_6_t6^forCAuD66Jso}hJ>8*7_*{MO3lKq{cZz)5>3%@a zJSPXmb7~{LZcx<*;YHVj6?g(H-PNl9ocEGv-f-=0Fr5MS7ku6G2HgFZJkZ$y4uS80 z%fTc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+Zu?? z(#wTh50wTPU8DU^MDi^2i4Ibz^^Qh^xI0OQlmEwvc8NZ6oqx#QpH{0Suq2!@=s0w~ zkiVnk8+O&KHC@xLDf#8Ba!Vn$IeT5v>#m_!wv}>tlTl%O6v`s) z6iM10PXs~VSdhOQ1VN8Ph5lsW15S1^j|WdJK6!Rk$*I%oG|dlyRZriR4&o%0*Z*2LbR&-w{wd8rEx<<{ks||MQs#9@EwJJubSyT0rIh{qi!DOzM zQFCpUv948J-7-imH!RDrQ4k%dy6?MYsp%VD*!kIp&yx40E2PfB?u9;^;3dOeg7$DC zlmpzb0-uNH`(+wa@yM`3=&*Je4;!zIPIFKV;c@Ko}b2+{Xjqd$d z#0pdh^H^>}qjP*iaqffXfZLg40e-aJZ^Tg%SP@C~vmwa5hoR4gpUZeTv|^4qBzZO= zqCX9ZXn)_)6rUOQ*9&DH_iI5#4{*srFw9OU0^3CVtJP|V{5}A#Cq(dukPz>JvG)Mp z2okK|u@y5ge1wL07Ou&E7VeLIo*`O~5BD{4LPR|g3meVL^t1ErGam1B(Pqa_J^_(9 zMS=549ZUSg$#T8k6KBR-!Htlk8Mti)f6(2p_V0Z?o1!|p~rtgua)wZ@Y$8f!dt=CO|TiZ;x_ff`z z@^>g>D1|MWqU9c-5UJ3Cv*aVJx9kvVB=X@|6b`49#ZfvAoH-_c= E3qrNB-~a#s literal 0 HcmV?d00001 diff --git a/Software/sie_cg/tmp/SIE_APP/main.cpp b/Software/sie_cg/tmp/SIE_APP/main.cpp new file mode 100755 index 0000000..42522c1 --- /dev/null +++ b/Software/sie_cg/tmp/SIE_APP/main.cpp @@ -0,0 +1,616 @@ +#include "jz_adc_peripheral.h" +#include "jz_fpga_init.h" +#include +#include + +extern "C" +{ + #include "fbutils.h" +} + + +JZ_REG * FPGA_ADDR; +JZ_REG * ADCBuffer; +bool frameBufferOpened = 0; +bool firstLoop = 1; + + + + +void FB_Print_Line38 () +{ + + if(1) + { + put_string_center (160,210,"By Juan64Bits", 1); + } + else + { + put_string (160,210,"By Juan64Bits", 1%5); + } + +} + +void FB_Print_Line37 () +{ + + if(1) + { + put_string_center (160,200,"Segundo Semestre de 2010", 1); + } + else + { + put_string (160,200,"Segundo Semestre de 2010", 1%5); + } + +} + +void FB_Print_Line36 () +{ + + if(1) + { + put_string_center (160,190,"Universidad Nacional de Colombia", 1); + } + else + { + put_string (160,190,"Universidad Nacional de Colombia", 1%5); + } + +} + +void FB_Print_Line35 () +{ + + if(0) + { + put_string_center (0,156,"CHA [7]", 4); + } + else + { + put_string (0,156,"CHA [7]", 4%5); + } + +} + +void FB_Print_Line10 () +{ + + if(0) + { + put_string_center (0,16,"CHA [0]", 4); + } + else + { + put_string (0,16,"CHA [0]", 4%5); + } + +} + +void Constant_Bool1 ( bool &out_3) +{ + + out_3=1; + +} + +void FB_Print_Line2 () +{ + + if(1) + { + put_string_center (160,0,"Wellcome to SIE {Executing Code...}", 1); + } + else + { + put_string (160,0,"Wellcome to SIE {Executing Code...}", 1%5); + } + +} + +void ADC_Eight7 ( unsigned short int &out_8, unsigned short int &out_7, unsigned short int &out_6, unsigned short int &out_5, unsigned short int &out_4, unsigned short int &out_3, unsigned short int &out_2, unsigned short int &out_1) +{ + + JZ_REG * ADC_DATA = ADCTakeSamples(ADCBuffer,0); + unsigned int sampleData = ADC_DATA[0]; + out_1 = (sampleData>>16)&0xFFFF; + out_2 = sampleData&0xFFFF; + sampleData = ADC_DATA[1]; + out_3 = (sampleData>>16)&0xFFFF; + out_4 = sampleData&0xFFFF; + sampleData = ADC_DATA[2]; + out_5 = (sampleData>>16)&0xFFFF; + out_6 = sampleData&0xFFFF; + sampleData = ADC_DATA[3]; + out_7 = (sampleData>>16)&0xFFFF; + out_8 = sampleData&0xFFFF; + +} + +void Right_Shift25 ( int in_0, int &out_1) +{ + + out_1 = in_0 >> 2; +} + +void FB_Draw_HLine11 ( unsigned short int in_3) +{ + if(!firstLoop) // do nothing in first loop + { + fillrect(64,96,64+255,96+16,0); //Black Rect + rect(64,96,64+255,96+16,3); //Extern Rect + fillrect(64,96,64+(in_3%(255+1)),96+16,3); + } + +} + +void FB_Put_Int18 ( int in_1) +{ + + put_int(16,104,in_1,2); + +} + +void Right_Shift24 ( int in_0, int &out_1) +{ + + out_1 = in_0 >> 2; +} + +void FB_Draw_HLine6 ( unsigned short int in_3) +{ + if(!firstLoop) // do nothing in first loop + { + fillrect(64,76,64+255,76+16,0); //Black Rect + rect(64,76,64+255,76+16,3); //Extern Rect + fillrect(64,76,64+(in_3%(255+1)),76+16,3); + } + +} + +void FB_Put_Int17 ( int in_1) +{ + + put_int(16,84,in_1,2); + +} + +void Right_Shift23 ( int in_0, int &out_1) +{ + + out_1 = in_0 >> 2; +} + +void FB_Draw_HLine4 ( unsigned short int in_3) +{ + if(!firstLoop) // do nothing in first loop + { + fillrect(64,56,64+255,56+16,0); //Black Rect + rect(64,56,64+255,56+16,3); //Extern Rect + fillrect(64,56,64+(in_3%(255+1)),56+16,3); + } + +} + +void FB_Put_Int16 ( int in_1) +{ + + put_int(16,64,in_1,2); + +} + +void Right_Shift22 ( int in_0, int &out_1) +{ + + out_1 = in_0 >> 2; +} + +void FB_Draw_HLine0 ( unsigned short int in_3) +{ + if(!firstLoop) // do nothing in first loop + { + fillrect(64,36,64+255,36+16,0); //Black Rect + rect(64,36,64+255,36+16,3); //Extern Rect + fillrect(64,36,64+(in_3%(255+1)),36+16,3); + } + +} + +void FB_Put_Int15 ( int in_1) +{ + + put_int(16,44,in_1,2); + +} + +void Right_Shift8 ( int in_0, int &out_1) +{ + + out_1 = in_0 >> 2; +} + +void FB_Draw_HLine3 ( unsigned short int in_3) +{ + if(!firstLoop) // do nothing in first loop + { + fillrect(64,16,64+255,16+16,0); //Black Rect + rect(64,16,64+255,16+16,3); //Extern Rect + fillrect(64,16,64+(in_3%(255+1)),16+16,3); + } + +} + +void FB_Put_Int9 ( int in_1) +{ + + put_int(16,24,in_1,2); + +} + +void FB_Put_Int19 ( int in_1) +{ + + put_int(16,124,in_1,2); + +} + +void Right_Shift26 ( int in_0, int &out_1) +{ + + out_1 = in_0 >> 2; +} + +void FB_Draw_HLine12 ( unsigned short int in_3) +{ + if(!firstLoop) // do nothing in first loop + { + fillrect(64,116,64+255,116+16,0); //Black Rect + rect(64,116,64+255,116+16,3); //Extern Rect + fillrect(64,116,64+(in_3%(255+1)),116+16,3); + } + +} + +void FB_Put_Int20 ( int in_1) +{ + + put_int(16,144,in_1,2); + +} + +void Right_Shift27 ( int in_0, int &out_1) +{ + + out_1 = in_0 >> 2; +} + +void FB_Draw_HLine13 ( unsigned short int in_3) +{ + if(!firstLoop) // do nothing in first loop + { + fillrect(64,136,64+255,136+16,0); //Black Rect + rect(64,136,64+255,136+16,3); //Extern Rect + fillrect(64,136,64+(in_3%(255+1)),136+16,3); + } + +} + +void FB_Put_Int21 ( int in_1) +{ + + put_int(16,164,in_1,2); + +} + +void Right_Shift28 ( int in_0, int &out_1) +{ + + out_1 = in_0 >> 2; +} + +void FB_Draw_HLine14 ( unsigned short int in_3) +{ + if(!firstLoop) // do nothing in first loop + { + fillrect(64,156,64+255,156+16,0); //Black Rect + rect(64,156,64+255,156+16,3); //Extern Rect + fillrect(64,156,64+(in_3%(255+1)),156+16,3); + } + +} + +void FB_Print_Line29 () +{ + + if(0) + { + put_string_center (0,36,"CHA [1]", 4); + } + else + { + put_string (0,36,"CHA [1]", 4%5); + } + +} + +void FB_Print_Line30 () +{ + + if(0) + { + put_string_center (0,56,"CHA [2]", 4); + } + else + { + put_string (0,56,"CHA [2]", 4%5); + } + +} + +void FB_Print_Line31 () +{ + + if(0) + { + put_string_center (0,76,"CHA [3]", 4); + } + else + { + put_string (0,76,"CHA [3]", 4%5); + } + +} + +void FB_Print_Line32 () +{ + + if(0) + { + put_string_center (0,96,"CHA [4]", 4); + } + else + { + put_string (0,96,"CHA [4]", 4%5); + } + +} + +void FB_Print_Line33 () +{ + + if(0) + { + put_string_center (0,116,"CHA [5]", 4); + } + else + { + put_string (0,116,"CHA [5]", 4%5); + } + +} + +void FB_Print_Line34 () +{ + + if(0) + { + put_string_center (0,136,"CHA [6]", 4); + } + else + { + put_string (0,136,"CHA [6]", 4%5); + } + +} + + + + +int main() +{ + /* OPEN FRAME BUFFER */ + printf("Opening framebuffer...\n\n"); + + if (open_framebuffer()) { + close_framebuffer(); + printf("Could not open framebuffer!!\n\n"); + } + else + { + setColorsFromDefaultPallet(); + rect(0,0,xres,yres,0); //Extern Rect + } + + /* MAPING FPGA MEMORY */ + FPGA_ADDR=jz_cs2_init(); + ADCBuffer = FPGA_ADDR; + ADCTest(ADCBuffer); + + + + + + + + + + + + + + + + ADC_SPI_CLKDIV=255; + ADC_BUFFER_LEN=8; + ADC_MUX_CHANNELS=7; + + + + + + + + + + + + + + + //Inputs/Outputs: Block: with ID[38] + //Inputs/Outputs: Block: with ID[37] + //Inputs/Outputs: Block: with ID[36] + //Inputs/Outputs: Block: with ID[35] + //Inputs/Outputs: Block: with ID[10] + //Inputs/Outputs: Block: with ID[1] + bool out_3_1=0; + //Inputs/Outputs: Block: with ID[5] + bool in_6_5=0; + //Inputs/Outputs: Block: with ID[2] + //Inputs/Outputs: Block: with ID[7] + unsigned short int out_8_7=0; + unsigned short int out_7_7=0; + unsigned short int out_6_7=0; + unsigned short int out_5_7=0; + unsigned short int out_4_7=0; + unsigned short int out_3_7=0; + unsigned short int out_2_7=0; + unsigned short int out_1_7=0; + //Inputs/Outputs: Block: with ID[25] + int in_0_25=0; + int out_1_25=0; + //Inputs/Outputs: Block: with ID[11] + unsigned short int in_3_11=0; + //Inputs/Outputs: Block: with ID[18] + int in_1_18=0; + //Inputs/Outputs: Block: with ID[24] + int in_0_24=0; + int out_1_24=0; + //Inputs/Outputs: Block: with ID[6] + unsigned short int in_3_6=0; + //Inputs/Outputs: Block: with ID[17] + int in_1_17=0; + //Inputs/Outputs: Block: with ID[23] + int in_0_23=0; + int out_1_23=0; + //Inputs/Outputs: Block: with ID[4] + unsigned short int in_3_4=0; + //Inputs/Outputs: Block: with ID[16] + int in_1_16=0; + //Inputs/Outputs: Block: with ID[22] + int in_0_22=0; + int out_1_22=0; + //Inputs/Outputs: Block: with ID[0] + unsigned short int in_3_0=0; + //Inputs/Outputs: Block: with ID[15] + int in_1_15=0; + //Inputs/Outputs: Block: with ID[8] + int in_0_8=0; + int out_1_8=0; + //Inputs/Outputs: Block: with ID[3] + unsigned short int in_3_3=0; + //Inputs/Outputs: Block: with ID[9] + int in_1_9=0; + //Inputs/Outputs: Block: with ID[19] + int in_1_19=0; + //Inputs/Outputs: Block: with ID[26] + int in_0_26=0; + int out_1_26=0; + //Inputs/Outputs: Block: with ID[12] + unsigned short int in_3_12=0; + //Inputs/Outputs: Block: with ID[20] + int in_1_20=0; + //Inputs/Outputs: Block: with ID[27] + int in_0_27=0; + int out_1_27=0; + //Inputs/Outputs: Block: with ID[13] + unsigned short int in_3_13=0; + //Inputs/Outputs: Block: with ID[21] + int in_1_21=0; + //Inputs/Outputs: Block: with ID[28] + int in_0_28=0; + int out_1_28=0; + //Inputs/Outputs: Block: with ID[14] + unsigned short int in_3_14=0; + //Inputs/Outputs: Block: with ID[29] + //Inputs/Outputs: Block: with ID[30] + //Inputs/Outputs: Block: with ID[31] + //Inputs/Outputs: Block: with ID[32] + //Inputs/Outputs: Block: with ID[33] + //Inputs/Outputs: Block: with ID[34] + + + +do +{ + FB_Print_Line38 (); + FB_Print_Line37 (); + FB_Print_Line36 (); + FB_Print_Line35 (); + FB_Print_Line10 (); + Constant_Bool1 ( out_3_1); + in_6_5 = out_3_1; + FB_Print_Line2 (); + ADC_Eight7 ( out_8_7, out_7_7, out_6_7, out_5_7, out_4_7, out_3_7, out_2_7, out_1_7); + in_0_25 = out_5_7; + Right_Shift25 ( in_0_25, out_1_25); + in_3_11 = out_1_25; + FB_Draw_HLine11 ( in_3_11); + in_1_18 = out_5_7; + FB_Put_Int18 ( in_1_18); + in_0_24 = out_4_7; + Right_Shift24 ( in_0_24, out_1_24); + in_3_6 = out_1_24; + FB_Draw_HLine6 ( in_3_6); + in_1_17 = out_4_7; + FB_Put_Int17 ( in_1_17); + in_0_23 = out_3_7; + Right_Shift23 ( in_0_23, out_1_23); + in_3_4 = out_1_23; + FB_Draw_HLine4 ( in_3_4); + in_1_16 = out_3_7; + FB_Put_Int16 ( in_1_16); + in_0_22 = out_2_7; + Right_Shift22 ( in_0_22, out_1_22); + in_3_0 = out_1_22; + FB_Draw_HLine0 ( in_3_0); + in_1_15 = out_2_7; + FB_Put_Int15 ( in_1_15); + in_0_8 = out_1_7; + Right_Shift8 ( in_0_8, out_1_8); + in_3_3 = out_1_8; + FB_Draw_HLine3 ( in_3_3); + in_1_9 = out_1_7; + FB_Put_Int9 ( in_1_9); + in_1_19 = out_6_7; + FB_Put_Int19 ( in_1_19); + in_0_26 = out_6_7; + Right_Shift26 ( in_0_26, out_1_26); + in_3_12 = out_1_26; + FB_Draw_HLine12 ( in_3_12); + in_1_20 = out_7_7; + FB_Put_Int20 ( in_1_20); + in_0_27 = out_7_7; + Right_Shift27 ( in_0_27, out_1_27); + in_3_13 = out_1_27; + FB_Draw_HLine13 ( in_3_13); + in_1_21 = out_8_7; + FB_Put_Int21 ( in_1_21); + in_0_28 = out_8_7; + Right_Shift28 ( in_0_28, out_1_28); + in_3_14 = out_1_28; + FB_Draw_HLine14 ( in_3_14); + FB_Print_Line29 (); + FB_Print_Line30 (); + FB_Print_Line31 (); + FB_Print_Line32 (); + FB_Print_Line33 (); + FB_Print_Line34 (); + +firstLoop=0; +}while(in_6_5); + + return 0; +} + + diff --git a/Software/sie_cg/tmp/SIE_APP/main.o b/Software/sie_cg/tmp/SIE_APP/main.o new file mode 100644 index 0000000000000000000000000000000000000000..4f11e39442e97b0224999f63885932c5fd49a29c GIT binary patch literal 9812 zcmeHMU2I&%8U6Opu~QQaH8g4i+)bC*N!{)4dSg4(E$iPnumsmmAfiF*wY|0%*1OjF zI!$O$EwHE`EX4u0L~2wlYC#@cIfd|}3aC{@6%Ua}TO{(pgCC-bN_n7CDy1T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