##// END OF EJS Templates
Sync
jeandet -
r1:0db2be5e5c43 default
parent child
Show More
@@ -1,133 +1,154
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the Kicad Tools Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 /*Mainly copied from http://research.engineering.wustl.edu/~beardj/FlexBisonC++.html*/
22 /*Mainly copied from http://research.engineering.wustl.edu/~beardj/FlexBisonC++.html*/
2 #include "lispLike_driver.h"
23 #include "lispLike_driver.h"
3 #include<assert.h>
24 #include<assert.h>
4
25
5 QIlib::lispLike_Driver::lispLike_Driver()
26 QIlib::lispLike_Driver::lispLike_Driver()
6 :parser( NULL ),scanner( NULL )
27 :parser( NULL ),scanner( NULL )
7 {
28 {
8 currentNode = &rootNode;
29 currentNode = &rootNode;
9 }
30 }
10
31
11 QIlib::lispLike_Driver::~lispLike_Driver()
32 QIlib::lispLike_Driver::~lispLike_Driver()
12 {
33 {
13 delete(scanner);
34 delete(scanner);
14 scanner = NULL;
35 scanner = NULL;
15 delete(parser);
36 delete(parser);
16 parser = NULL;
37 parser = NULL;
17 }
38 }
18
39
19 bool QIlib::lispLike_Driver::parse(const char *filename)
40 bool QIlib::lispLike_Driver::parse(const char *filename)
20 {
41 {
21 if(filename!=NULL)
42 if(filename!=NULL)
22 {
43 {
23 std::ifstream in_file( filename );
44 std::ifstream in_file( filename );
24 if( ! in_file.good() ) return false;
45 if( ! in_file.good() ) return false;
25
46
26 delete(scanner);
47 delete(scanner);
27 try
48 try
28 {
49 {
29 scanner = new QIlib::lispLike_Scanner( &in_file );
50 scanner = new QIlib::lispLike_Scanner( &in_file );
30 }
51 }
31 catch( std::bad_alloc &ba )
52 catch( std::bad_alloc &ba )
32 {
53 {
33 std::cerr << "Failed to allocate scanner: (" <<
54 std::cerr << "Failed to allocate scanner: (" <<
34 ba.what() << ")\n";
55 ba.what() << ")\n";
35 return false;
56 return false;
36 }
57 }
37
58
38 delete(parser);
59 delete(parser);
39 try
60 try
40 {
61 {
41 parser = new QIlib::lispLike_Parser( (*scanner) /* scanner */,
62 parser = new QIlib::lispLike_Parser( (*scanner) /* scanner */,
42 (*this) /* driver */ );
63 (*this) /* driver */ );
43 }
64 }
44 catch( std::bad_alloc &ba )
65 catch( std::bad_alloc &ba )
45 {
66 {
46 std::cerr << "Failed to allocate parser: (" <<
67 std::cerr << "Failed to allocate parser: (" <<
47 ba.what() << ")\n";
68 ba.what() << ")\n";
48 return false;
69 return false;
49 }
70 }
50 const int accept( 0 );
71 const int accept( 0 );
51 if( parser->parse() != accept )
72 if( parser->parse() != accept )
52 {
73 {
53 std::cerr << "Parse failed!!\n";
74 std::cerr << "Parse failed!!\n";
54 return false;
75 return false;
55 }
76 }
56 return true;
77 return true;
57 }
78 }
58 return false;
79 return false;
59 }
80 }
60
81
61 void QIlib::lispLike_Driver::add_node(const QString &node)
82 void QIlib::lispLike_Driver::add_node(const QString &node)
62 {
83 {
63 QIlib::AbstractNode* newNode = new QIlib::AbstractNode(node,currentNode);
84 QIlib::AbstractNode* newNode = new QIlib::AbstractNode(node,currentNode);
64 currentNode = newNode;
85 currentNode = newNode;
65 }
86 }
66
87
67 void QIlib::lispLike_Driver::add_node(const QString &node, const QString &value)
88 void QIlib::lispLike_Driver::add_node(const QString &node, const QString &value)
68 {
89 {
69 QIlib::AbstractNode* newNode = new QIlib::AbstractNode(node,value,currentNode);
90 QIlib::AbstractNode* newNode = new QIlib::AbstractNode(node,value,currentNode);
70 currentNode = newNode;
91 currentNode = newNode;
71 }
92 }
72
93
73 void QIlib::lispLike_Driver::add_value(const QString &value)
94 void QIlib::lispLike_Driver::add_value(const QString &value)
74 {
95 {
75 currentNode->Values.append(value);
96 currentNode->Values.append(value);
76 }
97 }
77
98
78 void QIlib::lispLike_Driver::close_node()
99 void QIlib::lispLike_Driver::close_node()
79 {
100 {
80 if(currentNode->parent)
101 if(currentNode->parent)
81 currentNode = currentNode->parent;
102 currentNode = currentNode->parent;
82 }
103 }
83
104
84
105
85
106
86
107
87
108
88
109
89
110
90
111
91
112
92
113
93 QIlib::AbstractNode::AbstractNode(QIlib::AbstractNode *parent)
114 QIlib::AbstractNode::AbstractNode(QIlib::AbstractNode *parent)
94 {
115 {
95 this->parent =parent;
116 this->parent =parent;
96 if(parent)
117 if(parent)
97 parent->nodes.append(this);
118 parent->nodes.append(this);
98 }
119 }
99
120
100
121
101 QIlib::AbstractNode::AbstractNode(const QString &Name, QIlib::AbstractNode *parent)
122 QIlib::AbstractNode::AbstractNode(const QString &Name, QIlib::AbstractNode *parent)
102 :name(Name)
123 :name(Name)
103 {
124 {
104 this->parent = parent;
125 this->parent = parent;
105 if(parent)
126 if(parent)
106 parent->nodes.append(this);
127 parent->nodes.append(this);
107 }
128 }
108
129
109
130
110 QIlib::AbstractNode::AbstractNode(const QString &Name, const QString &Value, QIlib::AbstractNode *parent)
131 QIlib::AbstractNode::AbstractNode(const QString &Name, const QString &Value, QIlib::AbstractNode *parent)
111 :name(Name)
132 :name(Name)
112 {
133 {
113 this->parent = parent;
134 this->parent = parent;
114 if(parent)
135 if(parent)
115 parent->nodes.append(this);
136 parent->nodes.append(this);
116 Values.append(Value);
137 Values.append(Value);
117 }
138 }
118
139
119 QString QIlib::AbstractNode::print()
140 QString QIlib::AbstractNode::print()
120 {
141 {
121 QString result;
142 QString result;
122 result.append(this->name+" ");
143 result.append(this->name+" ");
123 for(int i=0;i<this->nodes.count();i++)
144 for(int i=0;i<this->nodes.count();i++)
124 {
145 {
125 result.append(this->nodes.at(i)->print());
146 result.append(this->nodes.at(i)->print());
126 }
147 }
127 for(int i=0;i<this->Values.count();i++)
148 for(int i=0;i<this->Values.count();i++)
128 {
149 {
129 result.append(Values.at(i)+" ");
150 result.append(Values.at(i)+" ");
130 }
151 }
131 result.append(")");
152 result.append(")");
132 return result;
153 return result;
133 }
154 }
@@ -1,49 +1,70
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the Kicad Tools Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #ifndef LISPLIKE_DRIVER_H
22 #ifndef LISPLIKE_DRIVER_H
2 #define LISPLIKE_DRIVER_H
23 #define LISPLIKE_DRIVER_H
3 #include <string>
24 #include <string>
4 #include "lispLike_scanner.h"
25 #include "lispLike_scanner.h"
5 #include <lispLike/lispLike.hpp>
26 #include <lispLike/lispLike.hpp>
6 #include <QString>
27 #include <QString>
7 #include <QList>
28 #include <QList>
8 #include <QStringList>
29 #include <QStringList>
9 #include <iostream>
30 #include <iostream>
10 #include <cstdlib>
31 #include <cstdlib>
11 #include <fstream>
32 #include <fstream>
12
33
13 namespace QIlib{
34 namespace QIlib{
14
35
15 class AbstractNode
36 class AbstractNode
16 {
37 {
17 public:
38 public:
18 AbstractNode( QIlib::AbstractNode* parent=NULL);
39 AbstractNode( QIlib::AbstractNode* parent=NULL);
19 AbstractNode(const QString& Name, QIlib::AbstractNode* parent=NULL);
40 AbstractNode(const QString& Name, QIlib::AbstractNode* parent=NULL);
20 AbstractNode(const QString& Name,const QString& Value, QIlib::AbstractNode* parent=NULL);
41 AbstractNode(const QString& Name,const QString& Value, QIlib::AbstractNode* parent=NULL);
21 QString print();
42 QString print();
22 QList<QIlib::AbstractNode*> nodes;
43 QList<QIlib::AbstractNode*> nodes;
23 QString name;
44 QString name;
24 QStringList Values;
45 QStringList Values;
25 QIlib::AbstractNode* parent;
46 QIlib::AbstractNode* parent;
26 };
47 };
27
48
28 class lispLike_Driver
49 class lispLike_Driver
29 {
50 {
30 public:
51 public:
31 lispLike_Driver();
52 lispLike_Driver();
32
53
33 virtual ~lispLike_Driver();
54 virtual ~lispLike_Driver();
34 bool parse( const char *filename );
55 bool parse( const char *filename );
35 void add_node( const QString &node );
56 void add_node( const QString &node );
36 void add_node( const QString &node , const QString &value);
57 void add_node( const QString &node , const QString &value);
37 void add_value( const QString &value );
58 void add_value( const QString &value );
38 void close_node();
59 void close_node();
39
60
40
61
41 protected:
62 protected:
42
63
43 QIlib::lispLike_Parser *parser;
64 QIlib::lispLike_Parser *parser;
44 QIlib::lispLike_Scanner *scanner;
65 QIlib::lispLike_Scanner *scanner;
45 QIlib::AbstractNode rootNode;
66 QIlib::AbstractNode rootNode;
46 QIlib::AbstractNode* currentNode;
67 QIlib::AbstractNode* currentNode;
47 };
68 };
48 }
69 }
49 #endif // LISPLIKE_DRIVER_H
70 #endif // LISPLIKE_DRIVER_H
@@ -1,14 +1,35
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the Kicad Tools Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #include "lispLike_scanner.h"
22 #include "lispLike_scanner.h"
2
23
3 QIlib::lispLike_Scanner::lispLike_Scanner(std::istream *in)
24 QIlib::lispLike_Scanner::lispLike_Scanner(std::istream *in)
4 : yyFlexLexer(in), yylval( NULL )
25 : yyFlexLexer(in), yylval( NULL )
5 {
26 {
6
27
7 }
28 }
8
29
9
30
10 int QIlib::lispLike_Scanner::yylex(QIlib::lispLike_Parser::semantic_type *lval)
31 int QIlib::lispLike_Scanner::yylex(QIlib::lispLike_Parser::semantic_type *lval)
11 {
32 {
12 yylval = lval;
33 yylval = lval;
13 return( yylex() );
34 return( yylex() );
14 }
35 }
@@ -1,31 +1,52
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the Kicad Tools Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #ifndef LISPLIKE_SCANNER_H
22 #ifndef LISPLIKE_SCANNER_H
2 #define LISPLIKE_SCANNER_H
23 #define LISPLIKE_SCANNER_H
3 #if ! defined(yyFlexLexerOnce)
24 #if ! defined(yyFlexLexerOnce)
4 #include <FlexLexer.h>
25 #include <FlexLexer.h>
5 #endif
26 #endif
6 #include <iostream>
27 #include <iostream>
7 #include <cstdlib>
28 #include <cstdlib>
8 #include <fstream>
29 #include <fstream>
9
30
10 #undef YY_DECL
31 #undef YY_DECL
11 #define YY_DECL int QIlib::lispLike_Scanner::yylex()
32 #define YY_DECL int QIlib::lispLike_Scanner::yylex()
12
33
13 #include <lispLike/lispLike.hpp>
34 #include <lispLike/lispLike.hpp>
14
35
15 namespace QIlib{
36 namespace QIlib{
16
37
17 class lispLike_Scanner : public yyFlexLexer
38 class lispLike_Scanner : public yyFlexLexer
18 {
39 {
19 public:
40 public:
20 lispLike_Scanner(std::istream *in);
41 lispLike_Scanner(std::istream *in);
21 int yylex(QIlib::lispLike_Parser::semantic_type *lval);
42 int yylex(QIlib::lispLike_Parser::semantic_type *lval);
22
43
23 private:
44 private:
24 /* hide this one from public view */
45 /* hide this one from public view */
25 int yylex();
46 int yylex();
26 /* yyval ptr */
47 /* yyval ptr */
27 QIlib::lispLike_Parser::semantic_type *yylval;
48 QIlib::lispLike_Parser::semantic_type *yylval;
28 };
49 };
29 }
50 }
30
51
31 #endif // LISPLIKE_SCANNER_H
52 #endif // LISPLIKE_SCANNER_H
@@ -1,17 +1,38
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the Kicad Tools Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #include "qicadnet.h"
22 #include "qicadnet.h"
2
23
3 QIlib::QIcadNet::QIcadNet()
24 QIlib::QIcadNet::QIcadNet()
4 {
25 {
5 }
26 }
6
27
7 QIlib::QIcadNet::~QIcadNet()
28 QIlib::QIcadNet::~QIcadNet()
8 {
29 {
9
30
10 }
31 }
11
32
12
33
13 QIlib::QIcadNetNode::QIcadNetNode(QString ref, QString node)
34 QIlib::QIcadNetNode::QIcadNetNode(QString ref, QString node)
14 {
35 {
15 this->p_ref = ref;
36 this->p_ref = ref;
16 this->p_node = node;
37 this->p_node = node;
17 }
38 }
@@ -1,31 +1,52
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the Kicad Tools Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #ifndef QINET_H
22 #ifndef QINET_H
2 #define QINET_H
23 #define QINET_H
3 #include <QString>
24 #include <QString>
4 #include <QList>
25 #include <QList>
5
26
6 namespace QIlib{
27 namespace QIlib{
7 class QIcadNetNode
28 class QIcadNetNode
8 {
29 {
9 public:
30 public:
10 QIcadNetNode(QString ref,QString node);
31 QIcadNetNode(QString ref,QString node);
11 QString ref(){return this->p_ref;}
32 QString ref(){return this->p_ref;}
12 QString node(){return this->p_node;}
33 QString node(){return this->p_node;}
13 private:
34 private:
14 QString p_ref;
35 QString p_ref;
15 QString p_node;
36 QString p_node;
16 };
37 };
17
38
18 class QIcadNet
39 class QIcadNet
19 {
40 {
20 public:
41 public:
21 QIcadNet();
42 QIcadNet();
22 ~QIcadNet();
43 ~QIcadNet();
23 int code();
44 int code();
24 QString name();
45 QString name();
25 private:
46 private:
26 int p_code;
47 int p_code;
27 QString p_name;
48 QString p_name;
28 QList<QIcadNetNode*> p_nodes;
49 QList<QIcadNetNode*> p_nodes;
29 };
50 };
30 }
51 }
31 #endif // QINET_H
52 #endif // QINET_H
@@ -1,132 +1,200
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the Kicad Tools Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #include "qicadnetlist.h"
22 #include "qicadnetlist.h"
2 #include <QRegularExpression>
23 #include <QRegularExpression>
3
24
4
25
5 const char* root_c ="(export";
26 const char* root_c ="(export";
6 const char* version_c ="(version";
27 const char* version_c ="(version";
7 const char* design_c ="(design";
28 const char* design_c ="(design";
8 const char* source_c ="(source";
29 const char* source_c ="(source";
9 const char* date_c ="(date";
30 const char* date_c ="(date";
10 const char* tool_c ="(tool";
31 const char* tool_c ="(tool";
11 const char* components_c ="(components";
32 const char* components_c ="(components";
12 const char* component_c ="(comp";
33 const char* component_c ="(comp";
13 const char* ref_c ="(ref";
34 const char* ref_c ="(ref";
14 const char* value_c ="(value";
35 const char* value_c ="(value";
15 const char* libsource_c ="(libsource";
36 const char* libsource_c ="(libsource";
16 const char* lib_c ="(lib";
37 const char* lib_c ="(lib";
17 const char* part_c ="(part";
38 const char* part_c ="(part";
18 const char* sheetpath_c ="(sheetpath";
39 const char* sheetpath_c ="(sheetpath";
19 const char* names_c ="(names";
40 const char* names_c ="(names";
20 const char* tstamps_c ="(tstamps";
41 const char* tstamps_c ="(tstamps";
21 const char* tstamp_c ="(tstamp";
42 const char* tstamp_c ="(tstamp";
22 const char* libparts_c ="(libparts";
43 const char* libparts_c ="(libparts";
23 const char* libpart_c ="(libpart";
44 const char* libpart_c ="(libpart";
24 const char* fields_c ="(fields";
45 const char* fields_c ="(fields";
25 const char* field_c ="(field";
46 const char* field_c ="(field";
26 const char* name_c ="(name";
47 const char* name_c ="(name";
27 const char* pins_c ="(pins";
48 const char* pins_c ="(pins";
28 const char* pin_c ="(pin";
49 const char* pin_c ="(pin";
29 const char* num_c ="(num";
50 const char* num_c ="(num";
30 const char* type_c ="(type";
51 const char* type_c ="(type";
31 const char* libraries_c ="(libraries";
52 const char* libraries_c ="(libraries";
32 const char* library_c ="(library";
53 const char* library_c ="(library";
33 const char* logical_c ="(logical";
54 const char* logical_c ="(logical";
34 const char* uri_c ="(uri";
55 const char* uri_c ="(uri";
35 const char* nets_c ="(nets";
56 const char* nets_c ="(nets";
36 const char* net_c ="(net";
57 const char* net_c ="(net";
37 const char* code_c ="(code";
58 const char* code_c ="(code";
38 const char* node_c ="(node";
59 const char* node_c ="(node";
39
60
40
61
41 QIlib::QIcadNetList::QIcadNetList()
62 QIlib::QIcadNetList::QIcadNetList()
42 {
63 {
43
64
44 }
65 }
45
66
46
67
47 bool QIlib::QIcadNetList::parseNetList(const QString &netlist)
68 bool QIlib::QIcadNetList::parseNetList(const QString &netlist)
48 {
69 {
49
70
50 parse(netlist.toStdString().c_str());
71 parse(netlist.toStdString().c_str());
51 updateConcreteTree();
72 updateConcreteTree();
52 return false;
73 return false;
53 }
74 }
54
75
55 QString QIlib::QIcadNetList::print()
76 QString QIlib::QIcadNetList::print()
56 {
77 {
57 return rootNode.print();
78 return rootNode.print();
58 }
79 }
59
80
60 QIlib::AbstractNode *QIlib::QIcadNetList::getAbstractNode(const QString &node, int index)
81 QIlib::AbstractNode *QIlib::QIcadNetList::getAbstractNode(const QString &node, int index)
61 {
82 {
62 return getAbstractNode(&rootNode,node,&index);
83 return getAbstractNode(&rootNode,node,&index);
63 }
84 }
64
85
65 QIlib::AbstractNode *QIlib::QIcadNetList::getAbstractNode(QIlib::AbstractNode *rootNode, const QString &node, int* index)
86 QIlib::AbstractNode *QIlib::QIcadNetList::getAbstractNode(QIlib::AbstractNode *rootNode, const QString &node, int* index)
66 {
87 {
67 for(int i=0;i<rootNode->nodes.count();i++)
88 for(int i=0;i<rootNode->nodes.count();i++)
68 {
89 {
69 if(rootNode->nodes.at(i)->name==node)
90 if(rootNode->nodes.at(i)->name==node)
70 {
91 {
71 if((*index)==0)
92 if((*index)==0)
72 {
93 {
73 return rootNode->nodes.at(i);
94 return rootNode->nodes.at(i);
74 }
95 }
75 (*index)-=1;
96 (*index)-=1;
76 }
97 }
77 else
98 else
78 {
99 {
79 if(0<rootNode->nodes.at(i)->nodes.count())
100 if(0<rootNode->nodes.at(i)->nodes.count())
80 {
101 {
81 QIlib::AbstractNode *result=getAbstractNode(rootNode->nodes.at(i),node,index);
102 QIlib::AbstractNode *result=getAbstractNode(rootNode->nodes.at(i),node,index);
82 if(NULL!=result)return result;
103 if(NULL!=result)return result;
83 }
104 }
84 }
105 }
85 }
106 }
86 return NULL;
107 return NULL;
87 }
108 }
88
109
89 /*
110 /*
90 QString version;
111 QString version;
91 QIcadNetListDesign design;
112 QIcadNetListDesign design;
92 QList<QIcadNetListComponent*> components;
113 QList<QIcadNetListComponent*> components;
93 QList<QIcadNetListLibPart*> libparts;
114 QList<QIcadNetListLibPart*> libparts;
94 QIcadNetListLevel rootSheet;
115 QIcadNetListLevel rootSheet;
95 */
116 */
96
117
97 #define setVal(dest,node,name,index) \
118 #define setVal(dest,node,name,index) \
98 (node) = getAbstractNode((name),(index));\
119 (node) = getAbstractNode((name),(index));\
99 if(((node)!=NULL)&&(0<(node)->Values.count())) \
120 if(((node)!=NULL)&&(0<(node)->Values.count())) \
100 {\
121 {\
101 (dest) = (node)->Values.at(0); \
122 (dest) = (node)->Values.at(0); \
102 } \
123 } \
103
124
104
125
105 void QIlib::QIcadNetList::updateConcreteTree()
126 void QIlib::QIcadNetList::updateConcreteTree()
106 {
127 {
107 QIlib::AbstractNode *node;
128 QIlib::AbstractNode *node;
108 setVal(this->version,node,QIlib::Lexique::version_c,0);
129 setVal(this->version,node,QIlib::Lexique::version_c,0);
109 setVal(this->design.date,node,QIlib::Lexique::date_c,0);
130 setVal(this->design.date,node,QIlib::Lexique::date_c,0);
110 setVal(this->design.source,node,QIlib::Lexique::source_c,0);
131 setVal(this->design.source,node,QIlib::Lexique::source_c,0);
111 setVal(this->design.tool,node,QIlib::Lexique::tool_c,0);
132 setVal(this->design.tool,node,QIlib::Lexique::tool_c,0);
112 this->design.date.clear();
133 this->design.date.clear();
113 }
134 }
114
135
115
136
116
137
117
138
118
139
119 QIlib::QIcadAbstractNodeWrapper::QIcadAbstractNodeWrapper()
140 QIlib::QIcadAbstractNodeWrapper::QIcadAbstractNodeWrapper(AbstractNode *node)
120 {
141 {
121
142 this->p_node = node;
122 }
143 }
123
144
124 QIlib::QIcadAbstractNodeWrapper::~QIcadAbstractNodeWrapper()
145 QIlib::QIcadAbstractNodeWrapper::~QIcadAbstractNodeWrapper()
125 {
146 {
126 /*First delete all the childs*/
147 /*First delete all the childs*/
127 for(int i=0;i<this->childs.count();i++)
148 for(int i=0;i<this->childs.count();i++)
128 {
149 {
129 if(this->childs.at(i))
150 if(this->childs.at(i))
130 delete this->childs.at(i);
151 delete this->childs.at(i);
131 }
152 }
132 }
153 }
154
155 QString QIlib::QIcadAbstractNodeWrapper::value()
156 {
157 if((p_node->Values.count()>0) && p_node)
158 return p_node->Values.at(0);
159 return QString("");
160 }
161
162 QString QIlib::QIcadAbstractNodeWrapper::value(int index)
163 {
164 if((p_node->Values.count()>index) && p_node)
165 return p_node->Values.at(index);
166 return QString("");
167 }
168
169 QString QIlib::QIcadAbstractNodeWrapper::catValues()
170 {
171 if(p_node)
172 {
173 QString result("");
174 for(int i=0;i<p_node->Values.count();i++)
175 {
176 result.append(p_node->Values.at(i));
177 }
178 return result;
179 }
180 }
181
182 void QIlib::QIcadAbstractNodeWrapper::setNode(QIlib::AbstractNode *node)
183 {
184 this->p_node = node;
185 }
186
187
188
189 QIlib::QIcadNetListRoot::QIcadNetListRoot(QIlib::AbstractNode *node)
190 :QIcadAbstractNodeWrapper(node)
191 {
192
193 }
194
195
196 QIlib::QIcadNetListComponent::QIcadNetListComponent(QIlib::AbstractNode *node)
197 :QIcadAbstractNodeWrapper(node)
198 {
199
200 }
@@ -1,144 +1,279
1 #ifndef QICADNETLIST_H
1 #ifndef QICADNETLIST_H
2 #define QICADNETLIST_H
2 #define QICADNETLIST_H
3 #include <QString>
3 #include <QString>
4 #include <QStringList>
4 #include <QStringList>
5 /*------------------------------------------------------------------------------
6 -- This file is a part of the Kicad Tools Software
7 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
8 --
9 -- This program is free software; you can redistribute it and/or modify
10 -- it under the terms of the GNU General Public License as published by
11 -- the Free Software Foundation; either version 2 of the License, or
12 -- (at your option) any later version.
13 --
14 -- This program is distributed in the hope that it will be useful,
15 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
16 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 -- GNU General Public License for more details.
18 --
19 -- You should have received a copy of the GNU General Public License
20 -- along with this program; if not, write to the Free Software
21 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 -------------------------------------------------------------------------------*/
23 /*-- Author : Alexis Jeandet
24 -- Mail : alexis.jeandet@member.fsf.org
25 ----------------------------------------------------------------------------*/
5 #include <QList>
26 #include <QList>
6 #include <QFile>
27 #include <QFile>
7 #include <parsers/lispLike_driver.h>
28 #include <parsers/lispLike_driver.h>
8 #include <qicadnet.h>
29 #include <qicadnet.h>
9
30
10 namespace QIlib{
31 namespace QIlib{
11
32
12 namespace Lexique
33 namespace Lexique
13 {
34 {
14 extern "C" const char* root_c ;
35 extern "C" const char* root_c ;
15 extern "C" const char* version_c ;
36 extern "C" const char* version_c ;
16 extern "C" const char* design_c ;
37 extern "C" const char* design_c ;
17 extern "C" const char* source_c ;
38 extern "C" const char* source_c ;
18 extern "C" const char* date_c ;
39 extern "C" const char* date_c ;
19 extern "C" const char* tool_c ;
40 extern "C" const char* tool_c ;
20 extern "C" const char* components_c ;
41 extern "C" const char* components_c ;
21 extern "C" const char* component_c ;
42 extern "C" const char* component_c ;
22 extern "C" const char* ref_c ;
43 extern "C" const char* ref_c ;
23 extern "C" const char* value_c ;
44 extern "C" const char* value_c ;
24 extern "C" const char* libsource_c ;
45 extern "C" const char* libsource_c ;
25 extern "C" const char* lib_c ;
46 extern "C" const char* lib_c ;
26 extern "C" const char* part_c ;
47 extern "C" const char* part_c ;
27 extern "C" const char* sheetpath_c ;
48 extern "C" const char* sheetpath_c ;
28 extern "C" const char* names_c ;
49 extern "C" const char* names_c ;
29 extern "C" const char* tstamps_c ;
50 extern "C" const char* tstamps_c ;
30 extern "C" const char* tstamp_c ;
51 extern "C" const char* tstamp_c ;
31 extern "C" const char* libparts_c ;
52 extern "C" const char* libparts_c ;
32 extern "C" const char* libpart_c ;
53 extern "C" const char* libpart_c ;
33 extern "C" const char* fields_c ;
54 extern "C" const char* fields_c ;
34 extern "C" const char* field_c ;
55 extern "C" const char* field_c ;
35 extern "C" const char* name_c ;
56 extern "C" const char* name_c ;
36 extern "C" const char* pins_c ;
57 extern "C" const char* pins_c ;
37 extern "C" const char* pin_c ;
58 extern "C" const char* pin_c ;
38 extern "C" const char* num_c ;
59 extern "C" const char* num_c ;
39 extern "C" const char* type_c ;
60 extern "C" const char* type_c ;
40 extern "C" const char* libraries_c ;
61 extern "C" const char* libraries_c ;
41 extern "C" const char* library_c ;
62 extern "C" const char* library_c ;
42 extern "C" const char* logical_c ;
63 extern "C" const char* logical_c ;
43 extern "C" const char* uri_c ;
64 extern "C" const char* uri_c ;
44 extern "C" const char* nets_c ;
65 extern "C" const char* nets_c ;
45 extern "C" const char* net_c ;
66 extern "C" const char* net_c ;
46 extern "C" const char* code_c ;
67 extern "C" const char* code_c ;
47 extern "C" const char* node_c ;
68 extern "C" const char* node_c ;
48
69
49 }
70 }
50
71
51 class QIcadNetListLevel
72 class QIcadNetListLevel
52 {
73 {
53 public:
74 public:
54 QIcadNetListLevel() {}
75 QIcadNetListLevel() {}
55 QList<QIcadNetListLevel*> sublevels;
76 QList<QIcadNetListLevel*> sublevels;
56 QList<QIcadNet*> nets;
77 QList<QIcadNet*> nets;
57 };
78 };
58
79
59 class QIcadNetListDesign
80 class QIcadNetListDesign
60 {
81 {
61 public:
82 public:
62 QIcadNetListDesign(){}
83 QIcadNetListDesign(){}
63 QString source;
84 QString source;
64 QString date;
85 QString date;
65 QString tool;
86 QString tool;
66 };
87 };
67
88
68 class QIcadNetListComponent
89 class QIcadNetListComponent
69 {
90 {
70 public:
91 public:
71 typedef struct libsource_t
92 typedef struct libsource_t
72 {
93 {
73 QString lib;
94 QString lib;
74 QString part;
95 QString part;
75 }libsource_t;
96 }libsource_t;
76 typedef struct sheetpath_t
97 typedef struct sheetpath_t
77 {
98 {
78 QString names;
99 QString names;
79 QString tstamp;
100 QString tstamp;
80 }sheetpath_t;
101 }sheetpath_t;
81 QIcadNetListComponent(){}
102 QIcadNetListComponent(){}
82 QString ref;
103 QString ref;
83 QString value;
104 QString value;
84 QString tstamp;
105 QString tstamp;
85 libsource_t libsource;
106 libsource_t libsource;
86 sheetpath_t sheetpath;
107 sheetpath_t sheetpath;
87 };
108 };
88
109
89 class QIcadNetListLibPart
110 class QIcadNetListLibPart
90 {
111 {
91 public:
112 public:
92 typedef struct fields_t
113 typedef struct fields_t
93 {
114 {
94 QString ref;
115 QString ref;
95 QString value;
116 QString value;
96 QString footprint;
117 QString footprint;
97 QString datasheet;
118 QString datasheet;
98 }fields_t;
119 }fields_t;
99 typedef struct pin_t
120 typedef struct pin_t
100 {
121 {
101 int num;
122 int num;
102 QString name;
123 QString name;
103 QString type;
124 QString type;
104 }pin_t;
125 }pin_t;
105 QIcadNetListLibPart();
126 QIcadNetListLibPart();
106 QString lib;
127 QString lib;
107 QString part;
128 QString part;
108 QStringList footprints;
129 QStringList footprints;
109 fields_t fields;
130 fields_t fields;
110 QList<pin_t*> pins;
131 QList<pin_t*> pins;
111 };
132 };
112
133
113 class QIcadAbstractNodeWrapper
134 class QIcadAbstractNodeWrapper
114 {
135 {
115 public:
136 public:
116 QIcadAbstractNodeWrapper();
137 QIcadAbstractNodeWrapper(QIlib::AbstractNode* node);
117 ~QIcadAbstractNodeWrapper();
138 ~QIcadAbstractNodeWrapper();
118 QString value();
139 QString value();
140 QString value(int index);
141 QString catValues();
142 void setNode(QIlib::AbstractNode* node);
119 QList<QIcadAbstractNodeWrapper*> childs;
143 QList<QIcadAbstractNodeWrapper*> childs;
120 QIcadAbstractNodeWrapper* parent;
144 QIcadAbstractNodeWrapper* parent;
145
121 private:
146 private:
122 QIlib::AbstractNode* node;
147 QIlib::AbstractNode* p_node;
148 };
149
150 class QIcadNetListRoot : public AbstractNode
151 {
152 public:
153 QIcadNetListRoot(QIlib::AbstractNode* node);
154 QIcadAbstractNodeWrapper source;
155 QIcadAbstractNodeWrapper date;
156 QIcadAbstractNodeWrapper tool;
157 QList<QIcadNetListComponent*> components;
158 QList<QIcadNetListLibPart*> libparts;
159 QList<QIcadNetListLibrary*> libraries;
160 };
161
162
163 /*
164 * (comp (ref IC1)
165 (value 24L-MOD-8)
166 (libsource (lib guan) (part 24L-MOD-8))
167 (sheetpath (names /) (tstamps /))
168 (tstamp 52533BBE))
169 */
170 class QIcadNetListComponent:public QIcadAbstractNodeWrapper
171 {
172 public:
173 QIcadNetListComponent(AbstractNode* node);
174 QIcadAbstractNodeWrapper ref;
175 QIcadAbstractNodeWrapper value;
176 QIcadAbstractNodeWrapper libsource;
177 QIcadAbstractNodeWrapper sheetpath;
178 QIcadAbstractNodeWrapper tstamp;
179 };
180
181
182 /*
183 (libparts
184 (libpart (lib guan) (part 24L-MOD-8)
185 (fields
186 (field (name Reference) IC)
187 (field (name Value) 24L-MOD-8))
188 (pins
189 (pin (num 1) (name GND) (type power_in))
190 (pin (num 2) (name VCC) (type power_in))
191 */
192 class QIcadNetListField : QIcadAbstractNodeWrapper
193 {
194 public:
195 QIcadNetListField(AbstractNode* node);
196 QIcadAbstractNodeWrapper name;
123 };
197 };
124
198
199
200 class QIcadNetListLibPart : QIcadAbstractNodeWrapper
201 {
202 class QIcadNetListPin : QIcadAbstractNodeWrapper
203 {
204 public:
205 QIcadNetListPin(AbstractNode* node);
206 QIcadAbstractNodeWrapper type;
207 QIcadAbstractNodeWrapper num;
208 QIcadAbstractNodeWrapper name;
209 };
210 public:
211 QIcadNetListLibPart(AbstractNode* node);
212 QList<QIcadNetListField*> fields;
213 QList<QIcadNetListPin*> pins;
214 };
215
216 /*
217 (libraries
218 (library (logical guan)
219 (uri /home/guan/boards/guan.lib))
220 (library (logical device)
221 (uri /usr/share/kicad/library/device.lib))
222 (library (logical conn)
223 (uri /usr/share/kicad/library/conn.lib)))
224 */
225
226 class QIcadNetListLibrary : QIcadAbstractNodeWrapper
227 {
228 public:
229 QIcadNetListLibrary(AbstractNode* node);
230 QIcadAbstractNodeWrapper uri;
231 };
232 /*
233 (nets
234 (net (code 15) (name "")
235 (node (ref C4) (pin 1))
236 (node (ref U2) (pin 4)))
237 (net (code 16) (name GND)
238 (node (ref D1) (pin 2))
239 (node (ref C1) (pin 2))
240 (node (ref IC1) (pin 1))
241 */
242
243 class QIcadNetListNet : QIcadAbstractNodeWrapper
244 {
245 class QIcadNetListNetNode: QIcadAbstractNodeWrapper
246 {
247 public:
248 QIcadNetListNetNode(AbstractNode* node);
249 QIcadAbstractNodeWrapper ref;
250 QIcadAbstractNodeWrapper pin;
251 };
252 public:
253 QIcadNetListNet(AbstractNode* node);
254 QList<QIcadNetListNetNode*> NetNodes;
255 };
256
257
258
125 class QIcadNetList : private lispLike_Driver
259 class QIcadNetList : private lispLike_Driver
126 {
260 {
127 public:
261 public:
128 QIcadNetList();
262 QIcadNetList();
129 bool parseNetList(const QString& netlist);
263 bool parseNetList(const QString& netlist);
130 QString toString();
264 QString toString();
131 QString fileName;
265 QString fileName;
132 QString version;
266 QString version;
133 QIcadNetListDesign design;
267 QIcadNetListDesign design;
134 QList<QIcadNetListComponent*> components;
268 QList<QIcadNetListComponent*> components;
135 QList<QIcadNetListLibPart*> libparts;
269 QList<QIcadNetListLibPart*> libparts;
136 QIcadNetListLevel rootSheet;
270 QIcadNetListLevel rootSheet;
137 QString print();
271 QString print();
272 QIcadAbstractNodeWrapper netlistRoot;
138 private:
273 private:
139 QIlib::AbstractNode* getAbstractNode(const QString& node,int index);
274 QIlib::AbstractNode* getAbstractNode(const QString& node,int index);
140 QIlib::AbstractNode* getAbstractNode(QIlib::AbstractNode* rootNode,const QString& node,int* index);
275 QIlib::AbstractNode* getAbstractNode(QIlib::AbstractNode* rootNode,const QString& node,int* index);
141 void updateConcreteTree();
276 void updateConcreteTree();
142 };
277 };
143 }
278 }
144 #endif // QICADNETLIST_H
279 #endif // QICADNETLIST_H
@@ -1,27 +1,48
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the Kicad Tools Software
3 -- Copyright (C) 2014, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
1 #include <QDir>
22 #include <QDir>
2 #include <QFile>
23 #include <QFile>
3 #include <QApplication>
24 #include <QApplication>
4 #include <qicadnetlist.h>
25 #include <qicadnetlist.h>
5 #include <QDebug>
26 #include <QDebug>
6 #include <QTime>
27 #include <QTime>
7 /*
28 /*
8 #include <lispLike_driver.h>
29 #include <lispLike_driver.h>
9 */
30 */
10
31
11 int main(int argc, char *argv[])
32 int main(int argc, char *argv[])
12 {
33 {
13 QApplication ap(argc,argv);
34 QApplication ap(argc,argv);
14 QIlib::QIcadNetList NetListdriver;
35 QIlib::QIcadNetList NetListdriver;
15 if(argc>1)
36 if(argc>1)
16 {
37 {
17 if(QFile::exists(argv[1]))
38 if(QFile::exists(argv[1]))
18 {
39 {
19 QTime tm;
40 QTime tm;
20 tm.start();
41 tm.start();
21 NetListdriver.parseNetList(argv[1]);
42 NetListdriver.parseNetList(argv[1]);
22 qDebug()<<"File parsed in "<<tm.elapsed()<<"ms";
43 qDebug()<<"File parsed in "<<tm.elapsed()<<"ms";
23 std::cout<<NetListdriver.print().toStdString();
44 std::cout<<NetListdriver.print().toStdString();
24 }
45 }
25 }
46 }
26 return 0;
47 return 0;
27 }
48 }
@@ -1,411 +1,411
1 (export (version D)
1 (export (version D)
2 (design
2 (design
3 (source /home/guan/boards/boiler/boiler.sch)
3 (source /home/guan/boards/boiler/boiler.sch)
4 (date "Sat 12 Oct 2013 10:55:49 PM EDT")
4 (date "Sat 12 Oct 2013 10:55:49 PM EDT")
5 (tool "eeschema (2013-mar-13)-testing"))
5 (tool "eeschema (2013-mar-13)-testing"))
6 (components
6 (components
7 (comp (ref IC1)
7 (comp (ref IC1)
8 (value 24L-MOD-8)
8 (value 24L-MOD-8)
9 (libsource (lib guan) (part 24L-MOD-8))
9 (libsource (lib guan) (part 24L-MOD-8))
10 (sheetpath (names /) (tstamps /))
10 (sheetpath (names /) (tstamps /))
11 (tstamp 52533BBE))
11 (tstamp 52533BBE))
12 (comp (ref IC2)
12 (comp (ref IC2)
13 (value ATXMEGA8E5-A)
13 (value ATXMEGA8E5-A)
14 (libsource (lib guan) (part ATXMEGA8E5-A))
14 (libsource (lib guan) (part ATXMEGA8E5-A))
15 (sheetpath (names /) (tstamps /))
15 (sheetpath (names /) (tstamps /))
16 (tstamp 52545974))
16 (tstamp 52545974))
17 (comp (ref C2)
17 (comp (ref C2)
18 (value 0.1uF)
18 (value 0.1uF)
19 (libsource (lib device) (part C))
19 (libsource (lib device) (part C))
20 (sheetpath (names /) (tstamps /))
20 (sheetpath (names /) (tstamps /))
21 (tstamp 52546804))
21 (tstamp 52546804))
22 (comp (ref C3)
22 (comp (ref C3)
23 (value 0.1uF)
23 (value 0.1uF)
24 (libsource (lib device) (part C))
24 (libsource (lib device) (part C))
25 (sheetpath (names /) (tstamps /))
25 (sheetpath (names /) (tstamps /))
26 (tstamp 5254762B))
26 (tstamp 5254762B))
27 (comp (ref C1)
27 (comp (ref C1)
28 (value 0.1uF)
28 (value 0.1uF)
29 (libsource (lib device) (part C))
29 (libsource (lib device) (part C))
30 (sheetpath (names /) (tstamps /))
30 (sheetpath (names /) (tstamps /))
31 (tstamp 5254849B))
31 (tstamp 5254849B))
32 (comp (ref U1)
32 (comp (ref U1)
33 (value AQV252)
33 (value AQV252)
34 (libsource (lib guan) (part AQV252))
34 (libsource (lib guan) (part AQV252))
35 (sheetpath (names /) (tstamps /))
35 (sheetpath (names /) (tstamps /))
36 (tstamp 52552335))
36 (tstamp 52552335))
37 (comp (ref R3)
37 (comp (ref R3)
38 (value 33R)
38 (value 33R)
39 (libsource (lib device) (part R))
39 (libsource (lib device) (part R))
40 (sheetpath (names /) (tstamps /))
40 (sheetpath (names /) (tstamps /))
41 (tstamp 52553078))
41 (tstamp 52553078))
42 (comp (ref P2)
42 (comp (ref P2)
43 (value CONN_2)
43 (value CONN_2)
44 (libsource (lib conn) (part CONN_2))
44 (libsource (lib conn) (part CONN_2))
45 (sheetpath (names /) (tstamps /))
45 (sheetpath (names /) (tstamps /))
46 (tstamp 52555ACB))
46 (tstamp 52555ACB))
47 (comp (ref P1)
47 (comp (ref P1)
48 (value CONN_3X2)
48 (value CONN_3X2)
49 (libsource (lib conn) (part CONN_3X2))
49 (libsource (lib conn) (part CONN_3X2))
50 (sheetpath (names /) (tstamps /))
50 (sheetpath (names /) (tstamps /))
51 (tstamp 52555B20))
51 (tstamp 52555B20))
52 (comp (ref R1)
52 (comp (ref R1)
53 (value 1K)
53 (value 1K)
54 (libsource (lib device) (part R))
54 (libsource (lib device) (part R))
55 (sheetpath (names /) (tstamps /))
55 (sheetpath (names /) (tstamps /))
56 (tstamp 52555B2F))
56 (tstamp 52555B2F))
57 (comp (ref R2)
57 (comp (ref R2)
58 (value 1K)
58 (value 1K)
59 (libsource (lib device) (part R))
59 (libsource (lib device) (part R))
60 (sheetpath (names /) (tstamps /))
60 (sheetpath (names /) (tstamps /))
61 (tstamp 5255698D))
61 (tstamp 5255698D))
62 (comp (ref D2)
62 (comp (ref D2)
63 (value LED)
63 (value LED)
64 (libsource (lib device) (part LED))
64 (libsource (lib device) (part LED))
65 (sheetpath (names /) (tstamps /))
65 (sheetpath (names /) (tstamps /))
66 (tstamp 5255699C))
66 (tstamp 5255699C))
67 (comp (ref D1)
67 (comp (ref D1)
68 (value LED)
68 (value LED)
69 (libsource (lib device) (part LED))
69 (libsource (lib device) (part LED))
70 (sheetpath (names /) (tstamps /))
70 (sheetpath (names /) (tstamps /))
71 (tstamp 525569BA))
71 (tstamp 525569BA))
72 (comp (ref U2)
72 (comp (ref U2)
73 (value MIC5205)
73 (value MIC5205)
74 (libsource (lib guan) (part MIC5205))
74 (libsource (lib guan) (part MIC5205))
75 (sheetpath (names /) (tstamps /))
75 (sheetpath (names /) (tstamps /))
76 (tstamp 525688C8))
76 (tstamp 525688C8))
77 (comp (ref C4)
77 (comp (ref C4)
78 (value 470pF)
78 (value 470pF)
79 (libsource (lib device) (part C))
79 (libsource (lib device) (part C))
80 (sheetpath (names /) (tstamps /))
80 (sheetpath (names /) (tstamps /))
81 (tstamp 5256954D))
81 (tstamp 5256954D))
82 (comp (ref C5)
82 (comp (ref C5)
83 (value 4.7uF)
83 (value 4.7uF)
84 (libsource (lib device) (part C))
84 (libsource (lib device) (part C))
85 (sheetpath (names /) (tstamps /))
85 (sheetpath (names /) (tstamps /))
86 (tstamp 5256962C))
86 (tstamp 5256962C))
87 (comp (ref P3)
87 (comp (ref P3)
88 (value RASM722X)
88 (value RASM722X)
89 (libsource (lib conn) (part CONN_2))
89 (libsource (lib conn) (part CONN_2))
90 (sheetpath (names /) (tstamps /))
90 (sheetpath (names /) (tstamps /))
91 (tstamp 5256F96D))
91 (tstamp 5256F96D))
92 (comp (ref C6)
92 (comp (ref C6)
93 (value 4.7uF)
93 (value 4.7uF)
94 (libsource (lib device) (part C))
94 (libsource (lib device) (part C))
95 (sheetpath (names /) (tstamps /))
95 (sheetpath (names /) (tstamps /))
96 (tstamp 52574204))
96 (tstamp 52574204))
97 (comp (ref L1)
97 (comp (ref L1)
98 (value INDUCTOR)
98 (value INDUCTOR)
99 (libsource (lib device) (part INDUCTOR))
99 (libsource (lib device) (part INDUCTOR))
100 (sheetpath (names /) (tstamps /))
100 (sheetpath (names /) (tstamps /))
101 (tstamp 52574F79))
101 (tstamp 52574F79))
102 (comp (ref P4)
102 (comp (ref P4)
103 (value CONN_1)
103 (value CONN_1)
104 (libsource (lib conn) (part CONN_1))
104 (libsource (lib conn) (part CONN_1))
105 (sheetpath (names /) (tstamps /))
105 (sheetpath (names /) (tstamps /))
106 (tstamp 52587B8E))
106 (tstamp 52587B8E))
107 (comp (ref P5)
107 (comp (ref P5)
108 (value CONN_1)
108 (value CONN_1)
109 (libsource (lib conn) (part CONN_1))
109 (libsource (lib conn) (part CONN_1))
110 (sheetpath (names /) (tstamps /))
110 (sheetpath (names /) (tstamps /))
111 (tstamp 52587B9D))
111 (tstamp 52587B9D))
112 (comp (ref P6)
112 (comp (ref P6)
113 (value CONN_1)
113 (value CONN_1)
114 (libsource (lib conn) (part CONN_1))
114 (libsource (lib conn) (part CONN_1))
115 (sheetpath (names /) (tstamps /))
115 (sheetpath (names /) (tstamps /))
116 (tstamp 52587BAC))
116 (tstamp 52587BAC))
117 (comp (ref P7)
117 (comp (ref P7)
118 (value CONN_1)
118 (value CONN_1)
119 (libsource (lib conn) (part CONN_1))
119 (libsource (lib conn) (part CONN_1))
120 (sheetpath (names /) (tstamps /))
120 (sheetpath (names /) (tstamps /))
121 (tstamp 52587BBB)))
121 (tstamp 52587BBB)))
122 (libparts
122 (libparts
123 (libpart (lib guan) (part 24L-MOD-8)
123 (libpart (lib guan) (part 24L-MOD-8)
124 (fields
124 (fields
125 (field (name Reference) IC)
125 (field (name Reference) IC)
126 (field (name Value) 24L-MOD-8))
126 (field (name Value) 24L-MOD-8))
127 (pins
127 (pins
128 (pin (num 1) (name GND) (type power_in))
128 (pin (num 1) (name GND) (type power_in))
129 (pin (num 2) (name VCC) (type power_in))
129 (pin (num 2) (name VCC) (type power_in))
130 (pin (num 3) (name CE) (type input))
130 (pin (num 3) (name CE) (type input))
131 (pin (num 4) (name CSN) (type input))
131 (pin (num 4) (name CSN) (type input))
132 (pin (num 5) (name SCK) (type input))
132 (pin (num 5) (name SCK) (type input))
133 (pin (num 6) (name MOSI) (type input))
133 (pin (num 6) (name MOSI) (type input))
134 (pin (num 7) (name MISO) (type output))
134 (pin (num 7) (name MISO) (type output))
135 (pin (num 8) (name IRQ) (type output))))
135 (pin (num 8) (name IRQ) (type output))))
136 (libpart (lib guan) (part AQV252)
136 (libpart (lib guan) (part AQV252)
137 (fields
137 (fields
138 (field (name Reference) U)
138 (field (name Reference) U)
139 (field (name Value) AQV252))
139 (field (name Value) AQV252))
140 (pins
140 (pins
141 (pin (num 1) (name ~) (type power_in))
141 (pin (num 1) (name ~) (type power_in))
142 (pin (num 2) (name ~) (type power_in))
142 (pin (num 2) (name ~) (type power_in))
143 (pin (num 3) (name ~) (type power_in))
143 (pin (num 3) (name ~) (type power_in))
144 (pin (num 4) (name ~) (type power_in))
144 (pin (num 4) (name ~) (type power_in))
145 (pin (num 5) (name ~) (type power_in))
145 (pin (num 5) (name ~) (type power_in))
146 (pin (num 6) (name ~) (type power_in))))
146 (pin (num 6) (name ~) (type power_in))))
147 (libpart (lib guan) (part ATXMEGA8E5-A)
147 (libpart (lib guan) (part ATXMEGA8E5-A)
148 (fields
148 (fields
149 (field (name Reference) IC)
149 (field (name Reference) IC)
150 (field (name Value) ATXMEGA8E5-A))
150 (field (name Value) ATXMEGA8E5-A))
151 (pins
151 (pins
152 (pin (num 1) (name GND) (type power_in))
152 (pin (num 1) (name GND) (type power_in))
153 (pin (num 2) (name PA4/ADC4/AC4) (type 3state))
153 (pin (num 2) (name PA4/ADC4/AC4) (type 3state))
154 (pin (num 3) (name PA3/ADC3/DAC1/AC3) (type 3state))
154 (pin (num 3) (name PA3/ADC3/DAC1/AC3) (type 3state))
155 (pin (num 4) (name PA2/ADC2/DAC0/AC2) (type 3state))
155 (pin (num 4) (name PA2/ADC2/DAC0/AC2) (type 3state))
156 (pin (num 5) (name PA1/ADC1/AC1) (type 3state))
156 (pin (num 5) (name PA1/ADC1/AC1) (type 3state))
157 (pin (num 6) (name PA0/ADC0/AC0/AREF) (type 3state))
157 (pin (num 6) (name PA0/ADC0/AC0/AREF) (type 3state))
158 (pin (num 7) (name PDIDATA) (type power_in))
158 (pin (num 7) (name PDIDATA) (type power_in))
159 (pin (num 8) (name RESET/PDICLK) (type power_in))
159 (pin (num 8) (name RESET/PDICLK) (type power_in))
160 (pin (num 9) (name PC7/OC4D/TXD0/MOSI) (type power_in))
160 (pin (num 9) (name PC7/OC4D/TXD0/MOSI) (type power_in))
161 (pin (num 10) (name PC6/OC4C/RXD0/MISO) (type power_in))
161 (pin (num 10) (name PC6/OC4C/RXD0/MISO) (type power_in))
162 (pin (num 11) (name PC5/OC4B/OC5B/XCK0/SCK) (type power_in))
162 (pin (num 11) (name PC5/OC4B/OC5B/XCK0/SCK) (type power_in))
163 (pin (num 12) (name PC4/OC4A/OC5A/SS) (type power_in))
163 (pin (num 12) (name PC4/OC4A/OC5A/SS) (type power_in))
164 (pin (num 13) (name PC3/OC4D/TXD0) (type power_in))
164 (pin (num 13) (name PC3/OC4D/TXD0) (type power_in))
165 (pin (num 14) (name PC2/OC4C/RXD0) (type power_in))
165 (pin (num 14) (name PC2/OC4C/RXD0) (type power_in))
166 (pin (num 15) (name PC1/OC4B/XCK0/SCL) (type power_in))
166 (pin (num 15) (name PC1/OC4B/XCK0/SCL) (type power_in))
167 (pin (num 16) (name PC0/OC4A/SDA) (type power_in))
167 (pin (num 16) (name PC0/OC4A/SDA) (type power_in))
168 (pin (num 17) (name VCC) (type power_in))
168 (pin (num 17) (name VCC) (type power_in))
169 (pin (num 18) (name GND) (type power_in))
169 (pin (num 18) (name GND) (type power_in))
170 (pin (num 19) (name PR1/XTAL1/TOSC1) (type power_in))
170 (pin (num 19) (name PR1/XTAL1/TOSC1) (type power_in))
171 (pin (num 20) (name PR0/XTAL2/TOSC2) (type power_in))
171 (pin (num 20) (name PR0/XTAL2/TOSC2) (type power_in))
172 (pin (num 21) (name PD7/ADC15/TXD0) (type power_in))
172 (pin (num 21) (name PD7/ADC15/TXD0) (type power_in))
173 (pin (num 22) (name PD6/ADC14/RXD0) (type power_in))
173 (pin (num 22) (name PD6/ADC14/RXD0) (type power_in))
174 (pin (num 23) (name PD5/ADC13/OC5B/XCK0) (type power_in))
174 (pin (num 23) (name PD5/ADC13/OC5B/XCK0) (type power_in))
175 (pin (num 24) (name PD4/ADC12/OC5A) (type power_in))
175 (pin (num 24) (name PD4/ADC12/OC5A) (type power_in))
176 (pin (num 25) (name PD3/ADC11/TXD0) (type power_in))
176 (pin (num 25) (name PD3/ADC11/TXD0) (type power_in))
177 (pin (num 26) (name PD2/ADC10/RXD0) (type power_in))
177 (pin (num 26) (name PD2/ADC10/RXD0) (type power_in))
178 (pin (num 27) (name PD1/ADC9/XCK0/SCL) (type power_in))
178 (pin (num 27) (name PD1/ADC9/XCK0/SCL) (type power_in))
179 (pin (num 28) (name PD0/ADC8/SDA/AREF) (type power_in))
179 (pin (num 28) (name PD0/ADC8/SDA/AREF) (type power_in))
180 (pin (num 29) (name PA7/ADC7/AC7) (type power_in))
180 (pin (num 29) (name PA7/ADC7/AC7) (type power_in))
181 (pin (num 30) (name PA6/ADC6/AC6) (type power_in))
181 (pin (num 30) (name PA6/ADC6/AC6) (type power_in))
182 (pin (num 31) (name PA5/ADC5/AC5) (type 3state))
182 (pin (num 31) (name PA5/ADC5/AC5) (type 3state))
183 (pin (num 32) (name AVCC) (type power_in))))
183 (pin (num 32) (name AVCC) (type power_in))))
184 (libpart (lib guan) (part MIC5205)
184 (libpart (lib guan) (part MIC5205)
185 (fields
185 (fields
186 (field (name Reference) U)
186 (field (name Reference) U)
187 (field (name Value) MIC5205))
187 (field (name Value) MIC5205))
188 (pins
188 (pins
189 (pin (num 1) (name VIN) (type power_in))
189 (pin (num 1) (name VIN) (type power_in))
190 (pin (num 2) (name GND) (type power_in))
190 (pin (num 2) (name GND) (type power_in))
191 (pin (num 3) (name EN) (type input))
191 (pin (num 3) (name EN) (type input))
192 (pin (num 4) (name BYP) (type power_out))
192 (pin (num 4) (name BYP) (type power_out))
193 (pin (num 5) (name VOUT) (type power_out))))
193 (pin (num 5) (name VOUT) (type power_out))))
194 (libpart (lib device) (part C)
194 (libpart (lib device) (part C)
195 (description "Condensateur non polarise")
195 (description "Condensateur non polarise")
196 (footprints
196 (footprints
197 (fp SM*)
197 (fp SM*)
198 (fp C?)
198 (fp C?)
199 (fp C1-1))
199 (fp C1-1))
200 (fields
200 (fields
201 (field (name Reference) C)
201 (field (name Reference) C)
202 (field (name Value) C))
202 (field (name Value) C))
203 (pins
203 (pins
204 (pin (num 1) (name ~) (type passive))
204 (pin (num 1) (name ~) (type passive))
205 (pin (num 2) (name ~) (type passive))))
205 (pin (num 2) (name ~) (type passive))))
206 (libpart (lib device) (part INDUCTOR)
206 (libpart (lib device) (part INDUCTOR)
207 (fields
207 (fields
208 (field (name Reference) L)
208 (field (name Reference) L)
209 (field (name Value) INDUCTOR))
209 (field (name Value) INDUCTOR))
210 (pins
210 (pins
211 (pin (num 1) (name 1) (type passive))
211 (pin (num 1) (name 1) (type passive))
212 (pin (num 2) (name 2) (type passive))))
212 (pin (num 2) (name 2) (type passive))))
213 (libpart (lib device) (part LED)
213 (libpart (lib device) (part LED)
214 (footprints
214 (footprints
215 (fp LED-3MM)
215 (fp LED-3MM)
216 (fp LED-5MM)
216 (fp LED-5MM)
217 (fp LED-10MM)
217 (fp LED-10MM)
218 (fp LED-0603)
218 (fp LED-0603)
219 (fp LED-0805)
219 (fp LED-0805)
220 (fp LED-1206)
220 (fp LED-1206)
221 (fp LEDV))
221 (fp LEDV))
222 (fields
222 (fields
223 (field (name Reference) D)
223 (field (name Reference) D)
224 (field (name Value) LED))
224 (field (name Value) LED))
225 (pins
225 (pins
226 (pin (num 1) (name A) (type passive))
226 (pin (num 1) (name A) (type passive))
227 (pin (num 2) (name K) (type passive))))
227 (pin (num 2) (name K) (type passive))))
228 (libpart (lib device) (part R)
228 (libpart (lib device) (part R)
229 (description Resistance)
229 (description Resistance)
230 (footprints
230 (footprints
231 (fp R?)
231 (fp R?)
232 (fp SM0603)
232 (fp SM0603)
233 (fp SM0805)
233 (fp SM0805)
234 (fp R?-*)
234 (fp R?-*)
235 (fp SM1206))
235 (fp SM1206))
236 (fields
236 (fields
237 (field (name Reference) R)
237 (field (name Reference) R)
238 (field (name Value) R))
238 (field (name Value) R))
239 (pins
239 (pins
240 (pin (num 1) (name ~) (type passive))
240 (pin (num 1) (name ~) (type passive))
241 (pin (num 2) (name ~) (type passive))))
241 (pin (num 2) (name ~) (type passive))))
242 (libpart (lib conn) (part CONN_1)
242 (libpart (lib conn) (part CONN_1)
243 (description "1 pin")
243 (description "1 pin")
244 (fields
244 (fields
245 (field (name Reference) P)
245 (field (name Reference) P)
246 (field (name Value) CONN_1))
246 (field (name Value) CONN_1))
247 (pins
247 (pins
248 (pin (num 1) (name 1) (type passive))))
248 (pin (num 1) (name 1) (type passive))))
249 (libpart (lib conn) (part CONN_2)
249 (libpart (lib conn) (part CONN_2)
250 (description "Symbole general de connecteur")
250 (description "Symbole general de connecteur")
251 (fields
251 (fields
252 (field (name Reference) P)
252 (field (name Reference) P)
253 (field (name Value) CONN_2))
253 (field (name Value) CONN_2))
254 (pins
254 (pins
255 (pin (num 1) (name P1) (type passive))
255 (pin (num 1) (name P1) (type passive))
256 (pin (num 2) (name PM) (type passive))))
256 (pin (num 2) (name PM) (type passive))))
257 (libpart (lib conn) (part CONN_3X2)
257 (libpart (lib conn) (part CONN_3X2)
258 (description "Symbole general de connecteur")
258 (description "Symbole general de connecteur")
259 (fields
259 (fields
260 (field (name Reference) P)
260 (field (name Reference) P)
261 (field (name Value) CONN_3X2))
261 (field (name Value) CONN_3X2))
262 (pins
262 (pins
263 (pin (num 1) (name 1) (type passive))
263 (pin (num 1) (name 1) (type passive))
264 (pin (num 2) (name 2) (type passive))
264 (pin (num 2) (name 2) (type passive))
265 (pin (num 3) (name 3) (type passive))
265 (pin (num 3) (name 3) (type passive))
266 (pin (num 4) (name 4) (type passive))
266 (pin (num 4) (name 4) (type passive))
267 (pin (num 5) (name 5) (type passive))
267 (pin (num 5) (name 5) (type passive))
268 (pin (num 6) (name 6) (type passive)))))
268 (pin (num 6) (name 6) (type passive)))))
269 (libraries
269 (libraries
270 (library (logical guan)
270 (library (logical guan)
271 (uri /home/guan/boards/guan.lib))
271 (uri /home/guan/boards/guan.lib))
272 (library (logical device)
272 (library (logical device)
273 (uri /usr/share/kicad/library/device.lib))
273 (uri /usr/share/kicad/library/device.lib))
274 (library (logical conn)
274 (library (logical conn)
275 (uri /usr/share/kicad/library/conn.lib)))
275 (uri /usr/share/kicad/library/conn.lib)))
276 (nets
276 (nets
277 (net (code 1) (name "")
277 (net (code 1) (name "")
278 (node (ref P4) (pin 1)))
278 (node (ref P4) (pin 1)))
279 (net (code 2) (name "")
279 (net (code 2) (name "")
280 (node (ref P5) (pin 1)))
280 (node (ref P5) (pin 1)))
281 (net (code 3) (name "")
281 (net (code 3) (name "")
282 (node (ref P6) (pin 1)))
282 (node (ref P6) (pin 1)))
283 (net (code 4) (name "")
283 (net (code 4) (name "")
284 (node (ref P7) (pin 1)))
284 (node (ref P7) (pin 1)))
285 (net (code 5) (name /LED2)
285 (net (code 5) (name /LED2)
286 (node (ref R2) (pin 2))
286 (node (ref R2) (pin 2))
287 (node (ref IC2) (pin 3)))
287 (node (ref IC2) (pin 3)))
288 (net (code 6) (name /LED1)
288 (net (code 6) (name /LED1)
289 (node (ref IC2) (pin 6))
289 (node (ref IC2) (pin 6))
290 (node (ref R1) (pin 2)))
290 (node (ref R1) (pin 2)))
291 (net (code 7) (name "")
291 (net (code 7) (name "")
292 (node (ref IC2) (pin 21)))
292 (node (ref IC2) (pin 21)))
293 (net (code 8) (name "")
293 (net (code 8) (name "")
294 (node (ref IC2) (pin 20)))
294 (node (ref IC2) (pin 20)))
295 (net (code 9) (name "")
295 (net (code 9) (name "")
296 (node (ref IC2) (pin 23)))
296 (node (ref IC2) (pin 23)))
297 (net (code 10) (name "")
297 (net (code 10) (name "")
298 (node (ref IC2) (pin 16)))
298 (node (ref IC2) (pin 16)))
299 (net (code 11) (name "")
299 (net (code 11) (name "")
300 (node (ref P1) (pin 4)))
300 (node (ref P1) (pin 4)))
301 (net (code 12) (name "")
301 (net (code 12) (name "")
302 (node (ref P1) (pin 3)))
302 (node (ref P1) (pin 3)))
303 (net (code 13) (name /PDIDATA)
303 (net (code 13) (name /PDIDATA)
304 (node (ref IC2) (pin 7))
304 (node (ref IC2) (pin 7))
305 (node (ref P1) (pin 1)))
305 (node (ref P1) (pin 1)))
306 (net (code 14) (name /PDICLK)
306 (net (code 14) (name /PDICLK)
307 (node (ref IC2) (pin 8))
307 (node (ref IC2) (pin 8))
308 (node (ref P1) (pin 5)))
308 (node (ref P1) (pin 5)))
309 (net (code 15) (name "")
309 (net (code 15) (name "")
310 (node (ref C4) (pin 1))
310 (node (ref C4) (pin 1))
311 (node (ref U2) (pin 4)))
311 (node (ref U2) (pin 4)))
312 (net (code 16) (name GND)
312 (net (code 16) (name GND)
313 (node (ref D1) (pin 2))
313 (node (ref D1) (pin 2))
314 (node (ref C1) (pin 2))
314 (node (ref C1) (pin 2))
315 (node (ref IC1) (pin 1))
315 (node (ref IC1) (pin 1))
316 (node (ref U1) (pin 2))
316 (node (ref U1) (pin 2))
317 (node (ref IC2) (pin 1))
317 (node (ref IC2) (pin 1))
318 (node (ref C3) (pin 2))
318 (node (ref C3) (pin 2))
319 (node (ref P1) (pin 6))
319 (node (ref P1) (pin 6))
320 (node (ref IC2) (pin 18))
320 (node (ref IC2) (pin 18))
321 (node (ref D2) (pin 2))
321 (node (ref D2) (pin 2))
322 (node (ref C2) (pin 1))
322 (node (ref C2) (pin 1))
323 (node (ref C4) (pin 2))
323 (node (ref C4) (pin 2))
324 (node (ref U2) (pin 2))
324 (node (ref U2) (pin 2))
325 (node (ref C5) (pin 2))
325 (node (ref C5) (pin 2))
326 (node (ref P3) (pin 2))
326 (node (ref P3) (pin 2))
327 (node (ref C6) (pin 1)))
327 (node (ref C6) (pin 1)))
328 (net (code 17) (name /VOUT)
328 (net (code 17) (name /VOUT)
329 (node (ref L1) (pin 1))
329 (node (ref L1) (pin 1))
330 (node (ref U2) (pin 5)))
330 (node (ref U2) (pin 5)))
331 (net (code 18) (name VCC)
331 (net (code 18) (name VCC)
332 (node (ref C3) (pin 1))
332 (node (ref C3) (pin 1))
333 (node (ref C2) (pin 2))
333 (node (ref C2) (pin 2))
334 (node (ref L1) (pin 2))
334 (node (ref L1) (pin 2))
335 (node (ref C1) (pin 1))
335 (node (ref C1) (pin 1))
336 (node (ref P1) (pin 2))
336 (node (ref P1) (pin 2))
337 (node (ref IC2) (pin 32))
337 (node (ref IC2) (pin 32))
338 (node (ref C5) (pin 1))
338 (node (ref C5) (pin 1))
339 (node (ref IC1) (pin 2))
339 (node (ref IC1) (pin 2))
340 (node (ref IC2) (pin 17)))
340 (node (ref IC2) (pin 17)))
341 (net (code 19) (name /VIN)
341 (net (code 19) (name /VIN)
342 (node (ref U2) (pin 1))
342 (node (ref U2) (pin 1))
343 (node (ref U2) (pin 3))
343 (node (ref U2) (pin 3))
344 (node (ref C6) (pin 2))
344 (node (ref C6) (pin 2))
345 (node (ref P3) (pin 1)))
345 (node (ref P3) (pin 1)))
346 (net (code 20) (name "")
346 (net (code 20) (name "")
347 (node (ref IC2) (pin 22)))
347 (node (ref IC2) (pin 22)))
348 (net (code 21) (name "")
348 (net (code 21) (name "")
349 (node (ref IC2) (pin 19)))
349 (node (ref IC2) (pin 19)))
350 (net (code 22) (name /RELAY)
350 (net (code 22) (name /RELAY)
351 (node (ref IC2) (pin 24))
351 (node (ref IC2) (pin 24))
352 (node (ref R3) (pin 1)))
352 (node (ref R3) (pin 1)))
353 (net (code 23) (name /OUT1)
353 (net (code 23) (name /OUT1)
354 (node (ref P2) (pin 1))
354 (node (ref P2) (pin 1))
355 (node (ref U1) (pin 6)))
355 (node (ref U1) (pin 6)))
356 (net (code 24) (name /OUT2)
356 (net (code 24) (name /OUT2)
357 (node (ref P2) (pin 2))
357 (node (ref P2) (pin 2))
358 (node (ref U1) (pin 4)))
358 (node (ref U1) (pin 4)))
359 (net (code 25) (name /CSN)
359 (net (code 25) (name /CSN)
360 (node (ref IC2) (pin 12))
360 (node (ref IC2) (pin 12))
361 (node (ref IC1) (pin 4)))
361 (node (ref IC1) (pin 4)))
362 (net (code 26) (name /IRQ)
362 (net (code 26) (name /IRQ)
363 (node (ref IC2) (pin 14))
363 (node (ref IC2) (pin 14))
364 (node (ref IC1) (pin 8)))
364 (node (ref IC1) (pin 8)))
365 (net (code 27) (name /MISO)
365 (net (code 27) (name /MISO)
366 (node (ref IC2) (pin 10))
366 (node (ref IC2) (pin 10))
367 (node (ref IC1) (pin 7)))
367 (node (ref IC1) (pin 7)))
368 (net (code 28) (name /MOSI)
368 (net (code 28) (name /MOSI)
369 (node (ref IC1) (pin 6))
369 (node (ref IC1) (pin 6))
370 (node (ref IC2) (pin 9)))
370 (node (ref IC2) (pin 9)))
371 (net (code 29) (name /SCK)
371 (net (code 29) (name /SCK)
372 (node (ref IC2) (pin 11))
372 (node (ref IC2) (pin 11))
373 (node (ref IC1) (pin 5)))
373 (node (ref IC1) (pin 5)))
374 (net (code 30) (name /CE)
374 (net (code 30) (name /CE)
375 (node (ref IC2) (pin 13))
375 (node (ref IC2) (pin 13))
376 (node (ref IC1) (pin 3)))
376 (node (ref IC1) (pin 3)))
377 (net (code 31) (name "")
377 (net (code 31) (name "")
378 (node (ref R3) (pin 2))
378 (node (ref R3) (pin 2))
379 (node (ref U1) (pin 1)))
379 (node (ref U1) (pin 1)))
380 (net (code 32) (name "")
380 (net (code 32) (name "")
381 (node (ref D1) (pin 1))
381 (node (ref D1) (pin 1))
382 (node (ref R2) (pin 1)))
382 (node (ref R2) (pin 1)))
383 (net (code 33) (name "")
383 (net (code 33) (name "")
384 (node (ref D2) (pin 1))
384 (node (ref D2) (pin 1))
385 (node (ref R1) (pin 1)))
385 (node (ref R1) (pin 1)))
386 (net (code 34) (name "")
386 (net (code 34) (name "")
387 (node (ref IC2) (pin 25)))
387 (node (ref IC2) (pin 25)))
388 (net (code 35) (name "")
388 (net (code 35) (name "")
389 (node (ref IC2) (pin 26)))
389 (node (ref IC2) (pin 26)))
390 (net (code 36) (name "")
390 (net (code 36) (name "")
391 (node (ref IC2) (pin 27)))
391 (node (ref IC2) (pin 27)))
392 (net (code 37) (name "")
392 (net (code 37) (name "")
393 (node (ref IC2) (pin 28)))
393 (node (ref IC2) (pin 28)))
394 (net (code 38) (name "")
394 (net (code 38) (name "")
395 (node (ref IC2) (pin 29)))
395 (node (ref IC2) (pin 29)))
396 (net (code 39) (name "")
396 (net (code 39) (name "")
397 (node (ref IC2) (pin 15)))
397 (node (ref IC2) (pin 15)))
398 (net (code 40) (name "")
398 (net (code 40) (name "")
399 (node (ref IC2) (pin 2)))
399 (node (ref IC2) (pin 2)))
400 (net (code 41) (name "")
400 (net (code 41) (name "")
401 (node (ref IC2) (pin 4)))
401 (node (ref IC2) (pin 4)))
402 (net (code 42) (name "")
402 (net (code 42) (name "")
403 (node (ref IC2) (pin 5)))
403 (node (ref IC2) (pin 5)))
404 (net (code 43) (name "")
404 (net (code 43) (name "")
405 (node (ref IC2) (pin 30)))
405 (node (ref IC2) (pin 30)))
406 (net (code 44) (name "")
406 (net (code 44) (name "")
407 (node (ref IC2) (pin 31)))
407 (node (ref IC2) (pin 31)))
408 (net (code 45) (name "")
408 (net (code 45) (name "")
409 (node (ref U1) (pin 3)))
409 (node (ref U1) (pin 3)))
410 (net (code 46) (name "")
410 (net (code 46) (name "")
411 (node (ref U1) (pin 5))))) No newline at end of file
411 (node (ref U1) (pin 5)))))
General Comments 0
You need to be logged in to leave comments. Login now