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
@@ -44,10 +44,15 @@
#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()
+{
+ saveUndo();
+ clearRedo();
+ fflush(stdout);
+}
+void DiagramScene::saveUndo()
{
- QTextCursor cursor = item->textCursor();
- cursor.clearSelection();
- item->setTextCursor(cursor);
+ 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 1afe156..8a202dc
Binary files a/Software/sie_cg/images/background1.png and b/Software/sie_cg/images/background1.png differ
diff --git a/Software/sie_cg/images/background2.png b/Software/sie_cg/images/background2.png
old mode 100644
new mode 100755
index 9991ecf..d7ed315
Binary files a/Software/sie_cg/images/background2.png and b/Software/sie_cg/images/background2.png differ
diff --git a/Software/sie_cg/images/background3.png b/Software/sie_cg/images/background3.png
old mode 100644
new mode 100755
index 396f5f6..33ab08d
Binary files a/Software/sie_cg/images/background3.png and b/Software/sie_cg/images/background3.png differ
diff --git a/Software/sie_cg/images/background4.png b/Software/sie_cg/images/background4.png
old mode 100644
new mode 100755
index 7c368ad..f891146
Binary files a/Software/sie_cg/images/background4.png and b/Software/sie_cg/images/background4.png differ
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 0000000..d34cdcd
Binary files /dev/null and b/Software/sie_cg/images/copy.png differ
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 54c0dae..16d5157
Binary files a/Software/sie_cg/images/floodfill.png and b/Software/sie_cg/images/floodfill.png differ
diff --git a/Software/sie_cg/images/grid.png b/Software/sie_cg/images/grid.png
new file mode 100755
index 0000000..f5360b9
Binary files /dev/null and b/Software/sie_cg/images/grid.png differ
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 98a821f..57cce9e
Binary files a/Software/sie_cg/images/linecolor.png and b/Software/sie_cg/images/linecolor.png differ
diff --git a/Software/sie_cg/images/linepointer.png b/Software/sie_cg/images/linepointer.png
old mode 100644
new mode 100755
index 66933d4..ec12b7c
Binary files a/Software/sie_cg/images/linepointer.png and b/Software/sie_cg/images/linepointer.png differ
diff --git a/Software/sie_cg/images/lower1.png b/Software/sie_cg/images/lower1.png
old mode 100644
new mode 100755
diff --git a/Software/sie_cg/images/new.png b/Software/sie_cg/images/new.png
old mode 100644
new mode 100755
diff --git a/Software/sie_cg/images/no.png b/Software/sie_cg/images/no.png
old mode 100644
new mode 100755
diff --git a/Software/sie_cg/images/open.png b/Software/sie_cg/images/open.png
old mode 100644
new mode 100755
diff --git a/Software/sie_cg/images/paste.png b/Software/sie_cg/images/paste.png
new file mode 100644
index 0000000..df468ce
Binary files /dev/null and b/Software/sie_cg/images/paste.png differ
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 0000000..45f0450
Binary files /dev/null and b/Software/sie_cg/images/redo.png differ
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 b25832c..b204ed1
Binary files a/Software/sie_cg/images/textpointer.png and b/Software/sie_cg/images/textpointer.png differ
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 0000000..57abbe1
Binary files /dev/null and b/Software/sie_cg/images/undo.png differ
diff --git a/Software/sie_cg/images/yes.png b/Software/sie_cg/images/yes.png
old mode 100644
new mode 100755
diff --git a/Software/sie_cg/images/zoom_in.png b/Software/sie_cg/images/zoom_in.png
old mode 100644
new mode 100755
diff --git a/Software/sie_cg/images/zoom_out.png b/Software/sie_cg/images/zoom_out.png
old mode 100644
new mode 100755
diff --git a/Software/sie_cg/librarydialog.ui b/Software/sie_cg/librarydialog.ui
old mode 100644
new mode 100755
index 3bb8a00..a48360d
--- a/Software/sie_cg/librarydialog.ui
+++ b/Software/sie_cg/librarydialog.ui
@@ -6,39 +6,102 @@
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();
- scene->removeItem(item);
+ 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);
}
- //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(lineItem * item, Lines){
+ if(!item->itemIsMovable() && scene->items().contains(item))
+ {
+ item->myOwner()->removeLine(item);
+ 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));
+ }
+ }
+ // 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();
}
- codeForm();
- cgUi->codeTextEdit->setPlainText(Test);
+ 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)
+ {
+ 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();
+ }
+}
+
+void MainWindow::upLibPath()
+{
+ QList selected = libUi->listLib->selectedItems();
+ if(selected.count()>0)
{
- callexternapp("block_editor/blockeditor",selected.at(0)->text());
+ 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);
+ }
}
}
-int MainWindow::updateLibraries()
+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 0000000..d1ad2ab
Binary files /dev/null and b/Software/sie_cg/templates/basic (copy)/basic.bit differ
diff --git a/Software/sie_cg/templates/basic (copy)/jz47xx_gpio.cpp b/Software/sie_cg/templates/basic (copy)/jz47xx_gpio.cpp
new file mode 100755
index 0000000..affa85e
--- /dev/null
+++ b/Software/sie_cg/templates/basic (copy)/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 (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 0000000..d1ad2ab
Binary files /dev/null and b/Software/sie_cg/templates/basic/basic.bit differ
diff --git a/Software/sie_cg/templates/basic/fbutils.c b/Software/sie_cg/templates/basic/fbutils.c
new file mode 100644
index 0000000..106cc26
--- /dev/null
+++ b/Software/sie_cg/templates/basic/fbutils.c
@@ -0,0 +1,3008 @@
+/*
+ * fbutils.c
+ *
+ * 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.
+ *
+ */
+
+#include
+#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 0000000..e78f75b
Binary files /dev/null and b/Software/sie_cg/tmp/SIE_APP/SIE_APP differ
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 0000000..d1ad2ab
Binary files /dev/null and b/Software/sie_cg/tmp/SIE_APP/basic.bit differ
diff --git a/Software/sie_cg/tmp/SIE_APP/fbutils.c b/Software/sie_cg/tmp/SIE_APP/fbutils.c
new file mode 100644
index 0000000..106cc26
--- /dev/null
+++ b/Software/sie_cg/tmp/SIE_APP/fbutils.c
@@ -0,0 +1,3008 @@
+/*
+ * fbutils.c
+ *
+ * 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.
+ *
+ */
+
+#include
+#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 0000000..b8ef212
Binary files /dev/null and b/Software/sie_cg/tmp/SIE_APP/fbutils.o differ
diff --git a/Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.cpp b/Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.cpp
new file mode 100755
index 0000000..affa85e
--- /dev/null
+++ b/Software/sie_cg/tmp/SIE_APP/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/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 0000000..d798588
Binary files /dev/null and b/Software/sie_cg/tmp/SIE_APP/jz47xx_gpio.o differ
diff --git a/Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.cpp b/Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.cpp
new file mode 100755
index 0000000..b94936b
--- /dev/null
+++ b/Software/sie_cg/tmp/SIE_APP/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/tmp/SIE_APP/jz47xx_mmap.h b/Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.h
new file mode 100755
index 0000000..05438bd
--- /dev/null
+++ b/Software/sie_cg/tmp/SIE_APP/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/tmp/SIE_APP/jz47xx_mmap.o b/Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.o
new file mode 100644
index 0000000..ff59845
Binary files /dev/null and b/Software/sie_cg/tmp/SIE_APP/jz47xx_mmap.o differ
diff --git a/Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.cpp b/Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.cpp
new file mode 100755
index 0000000..568706c
--- /dev/null
+++ b/Software/sie_cg/tmp/SIE_APP/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/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 0000000..4fe0e09
Binary files /dev/null and b/Software/sie_cg/tmp/SIE_APP/jz_adc_peripheral.o differ
diff --git a/Software/sie_cg/tmp/SIE_APP/jz_fpga_init.cpp b/Software/sie_cg/tmp/SIE_APP/jz_fpga_init.cpp
new file mode 100755
index 0000000..f260239
--- /dev/null
+++ b/Software/sie_cg/tmp/SIE_APP/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/tmp/SIE_APP/jz_fpga_init.h b/Software/sie_cg/tmp/SIE_APP/jz_fpga_init.h
new file mode 100755
index 0000000..ce023fd
--- /dev/null
+++ b/Software/sie_cg/tmp/SIE_APP/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/tmp/SIE_APP/jz_fpga_init.o b/Software/sie_cg/tmp/SIE_APP/jz_fpga_init.o
new file mode 100644
index 0000000..8e47190
Binary files /dev/null and b/Software/sie_cg/tmp/SIE_APP/jz_fpga_init.o differ
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 0000000..4f11e39
Binary files /dev/null and b/Software/sie_cg/tmp/SIE_APP/main.o differ