text:
.05" y2="-0.375" layer="21"/>
<rectangle x1="-1.4" y1="-1.125" x2="-1.05" y2="-0.875" layer="21"/>
<rectangle x1="-0.675" y1="-1.35" x2="-0.325" y2="-1.1" layer="21" rot="R90"/>
<rectangle x1="-0.175" y1="-1.35" x2="0.175" y2="-1.1" layer="21" rot="R90"/>
<rectangle x1="0.325" y1="-1.35" x2="0.675" y2="-1.1" layer="21" rot="R90"/>
<rectangle x1="1.05" y1="-1.125" x2="1.4" y2="-0.875" layer="21" rot="R180"/>
<rectangle x1="1.05" y1="-0.625" x2="1.4" y2="-0.375" layer="21" rot="R180"/>
<rectangle x1="1.05" y1="-0.125" x2="1.4" y2="0.125" layer="21" rot="R180"/>
<rectangle x1="1.05" y1="0.375" x2="1.4" y2="0.625" layer="21" rot="R180"/>
<rectangle x1="1.05" y1="0.875" x2="1.4" y2="1.125" layer="21" rot="R180"/>
<rectangle x1="0.325" y1="1.1" x2="0.675" y2="1.35" layer="21" rot="R270"/>
<rectangle x1="-0.175" y1="1.1" x2="0.175" y2="1.35" layer="21" rot="R270"/>
<rectangle x1="-0.675" y1="1.1" x2="-0.325" y2="1.35" layer="21" rot="R270"/>
</package>
</packages>
<symbols>
<symbol name="LSM303D">
<wire x1="-12.7" y1="10.16" x2="12.7" y2="10.16" width="0.254" layer="94"/>
<wire x1="12.7" y1="10.16" x2="12.7" y2="-10.16" width="0.254" layer="94"/>
<wire x1="12.7" y1="-10.16" x2="-12.7" y2="-10.16" width="0.254" layer="94"/>
<wire x1="-12.7" y1="-10.16" x2="-12.7" y2="10.16" width="0.254" layer="94"/>
<text x="-12.7" y="11.43" size="1.27" layer="94">>NAME</text>
<text x="-12.7" y="-12.7" size="1.27" layer="94">>VALUE</text>
<pin name="SCL/SPC" x="-17.78" y="7.62" visible="pin" length="middle"/>
<pin name="SDA/SDI" x="-17.78" y="5.08" visible="pin" length="middle"/>
<pin name="INT1" x="-17.78" y="-2.54" visible="pin" length="middle"/>
<pin name="INT2" x="-17.78" y="-5.08" visible="pin" length="middle"/>
<pin name="VDD" x="17.78" y="7.62" visible="pin" length="middle" direction="pwr" rot="R180"/>
<pin name="VDD_IO" x="17.78" y="5.08" visible="pin" length="middle" direction="pwr" rot="R180"/>
<pin name="C1" x="17.78" y="-5.08" visible="pin" length="middle" rot="R180"/>
<pin name="SETP" x="17.78" y="2.54" visible="pin" length="middle" rot="R180"/>
<pin name="SETC" x="17.78" y="-2.54" visible="pin" length="middle" rot="R180"/>
<pin name="RES" x="-17.78" y="-7.62" visible="pin" length="middle"/>
<pin name="GND" x="17.78" y="-7.62" visible="pin" length="middle" direction="pwr" rot="R180"/>
<pin name="SDO" x="-17.78" y="2.54" visible="pin" length="middle"/>
<pin name="CS" x="-17.78" y="0" visible="pin" length="middle"/>
</symbol>
<symbol name="L3G20H">
<wire x1="-12.7" y1="12.7" x2="12.7" y2="12.7" width="0.254" layer="94"/>
<wire x1="12.7" y1="12.7" x2="12.7" y2="-10.16" width="0.254" layer="94"/>
<wire x1="12.7" y1="-10.16" x2="-12.7" y2="-10.16" width="0.254" layer="94"/>
<wire x1="-12.7" y1="-10.16" x2="-12.7" y2="12.7" width="0.254" layer="94"/>
<pin name="VDD" x="17.78" y="10.16" visible="pin" length="middle" direction="pwr" rot="R180"/>
<pin name="RES1" x="17.78" y="2.54" visible="pin" length="middle" rot="R180"/>
<pin name="RES2" x="17.78" y="0" visible="pin" length="middle" rot="R180"/>
<pin name="RES3" x="17.78" y="-2.54" visible="pin" length="middle" rot="R180"/>
<pin name="RES4" x="17.78" y="-5.08" visible="pin" length="middle" rot="R180"/>
<pin name="GND" x="17.78" y="-7.62" visible="pin" length="middle" direction="pwr" rot="R180"/>
<pin name="CS" x="-17.78" y="2.54" visible="pin" length="middle"/>
<pin name="SCL/SPC" x="-17.78" y="10.16" visible="pin" length="middle"/>
<pin name="SDA/SDI" x="-17.78" y="7.62" visible="pin" length="middle"/>
<pin name="SDO" x="-17.78" y="5.08" visible="pin" length="middle"/>
<pin name="INT1" x="-17.78" y="0" visible="pin" length="middle"/>
<pin name="DRDY/INT2" x="-17.78" y="-2.54" visible="pin" length="middle"/>
<pin name="VDD_IO" x="17.78" y="7.62" visible="pin" length="middle" direction="pwr" rot="R180"/>
<pin name="DEN" x="-17.78" y="-5.08" visible="pin" length="middle"/>
<pin name="CAP" x="17.78" y="5.08" visible="pin" length="middle" rot="R180"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="LSM303D">
<gates>
<gate name="G$1" symbol="LSM303D" x="0" y="0"/>
</gates>
<devices>
<device name="" package="LGA16L">
<connects>
<connect gate="G$1" pin="C1" pad="P$15"/>
<connect gate="G$1" pin="CS" pad="P$8"/>
<connect gate="G$1" pin="GND" pad="P$5 P$12 P$13 P$16"/>
<connect gate="G$1" pin="INT1" pad="P$11"/>
<connect gate="G$1" pin="INT2" pad="P$9"/>
<connect gate="G$1" pin="RES" pad="P$10"/>
<connect gate="G$1" pin="SCL/SPC" pad="P$4"/>
<connect gate="G$1" pin="SDA/SDI" pad="P$6"/>
<connect gate="G$1" pin="SDO" pad="P$7"/>
<connect gate="G$1" pin="SETC" pad="P$2"/>
<connect gate="G$1" pin="SETP" pad="P$3"/>
<connect gate="G$1" pin="VDD" pad="P$14"/>
<connect gate="G$1" pin="VDD_IO" pad="P$1"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
<deviceset name="L3GD20H">
<gates>
<gate name="G$1" symbol="L3G20H" x="0" y="0"/>
</gates>
<devices>
<device name="" package="LGA16L">
<connects>
<connect gate="G$1" pin="CAP" pad="P$14"/>
<connect gate="G$1" pin="CS" pad="P$5"/>
<connect gate="G$1" pin="DEN" pad="P$8"/>
<connect gate="G$1" pin="DRDY/INT2" pad="P$6"/>
<connect gate="G$1" pin="GND" pad="P$12 P$13"/>
<connect gate="G$1" pin="INT1" pad="P$7"/>
<connect gate="G$1" pin="RES1" pad="P$9"/>
<connect gate="G$1" pin="RES2" pad="P$10"/>
<connect gate="G$1" pin="RES3" pad="P$11"/>
<connect gate="G$1" pin="RES4" pad="P$15"/>
<connect gate="G$1" pin="SCL/SPC" pad="P$2"/>
<connect gate="G$1" pin="SDA/SDI" pad="P$3"/>
<connect gate="G$1" pin="SDO" pad="P$4"/>
<connect gate="G$1" pin="VDD" pad="P$16"/>
<connect gate="G$1" pin="VDD_IO" pad="P$1"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
<library name="SparkFun-Electromechanical">
<description>
SparkFun Electronics' preferred foot prints

In this library you'll find anything that moves- switches, relays, buttons, potentiometers. Also, anything that goes on a board but isn't electrical in nature- screws, standoffs, etc.

We've spent an enormous amount of time creating and checking these footprints and parts, but it is the end user's responsibility to ensure correctness and suitablity for a given componet or application. If you enjoy using this library, please buy one of our products at www.sparkfun.com.

Licensing: Creative Commons ShareAlike 4.0 International - https://creativecommons.org/licenses/by-sa/4.0/

You are welcome to use this library for commercial purposes. For attribution, we ask that when you begin to sell your device using our footprint, you email us with a link to the product being sold. We want bragging rights that we helped (in a very small part) to create your 8th world wonder. We would like the opportunity to feature your device on our homepage.</description>
<packages>
<package name="SWITCH-SPDT">
<wire x1="2.175" y1="5.815" x2="-2.175" y2="5.815" width="0.2032" layer="21"/>
<wire x1="-2.175" y1="5.815" x2="-2.175" y2="-5.815" width="0.2032" layer="21"/>
<wire x1="-2.175" y1="-5.815" x2="2.175" y2="-5.815" width="0.2032" layer="21"/>
<wire x1="2.175" y1="-5.815" x2="2.175" y2="5.815" width="0.2032" layer="21"/>
<pad name="1" x="0" y="2.54" drill="1.016" diameter="1.8796"/>
<pad name="2" x="0" y="0" drill="1.016" diameter="1.8796"/>
<pad name="3" x="0" y="-2.54" drill="1.016" diameter="1.8796"/>
<text x="-3.81" y="7.62" size="1.778" layer="25" ratio="10">>NAME</text>
<text x="-3.81" y="-9.525" size="1.778" layer="27" ratio="10">>VALUE</text>
</package>
<package name="AYZ0202">
<description>DPDT Slide Switch SMD
www.SparkFun.com SKU : Comp-SMDS</description>
<wire x1="-3.6" y1="1.75" x2="-3.6" y2="-1.75" width="0.2032" layer="21"/>
<wire x1="-3.6" y1="-1.75" x2="3.6" y2="-1.75" width="0.2032" layer="21"/>
<wire x1="3.6" y1="-1.75" x2="3.6" y2="1.75" width="0.2032" layer="21"/>
<wire x1="3.6" y1="1.75" x2="-3.6" y2="1.75" width="0.2032" layer="21"/>
<smd name="3" x="2.5" y="2.825" dx="1" dy="1.15" layer="1"/>
<smd name="2" x="0" y="2.825" dx="1" dy="1.15" layer="1"/>
<smd name="1" x="-2.5" y="2.825" dx="1" dy="1.15" layer="1"/>
<smd name="6" x="2.5" y="-2.825" dx="1" dy="1.15" layer="1"/>
<smd name="5" x="0" y="-2.825" dx="1" dy="1.15" layer="1"/>
<smd name="4" x="-2.5" y="-2.825" dx="1" dy="1.15" layer="1"/>
<text x="-2.54" y="1.143" size="0.4064" layer="25">>Name</text>
<text x="0.508" y="1.143" size="0.4064" layer="27">>Value</text>
<hole x="1.5" y="0" drill="0.85"/>
<hole x="-1.5" y="0" drill="0.85"/>
</package>
<package name="SWITCHE-DPDT">
<wire x1="8" y1="3.25" x2="-8" y2="3.25" width="0.127" layer="51"/>
<wire x1="-8" y1="3.25" x2="-8" y2="-3.25" width="0.127" layer="51"/>
<wire x1="-8" y1="-3.25" x2="8" y2="-3.25" width="0.127" layer="51"/>
<wire x1="8" y1="-3.25" x2="8" y2="3.25" width="0.127" layer="51"/>
<wire x1="-6" y1="3.25" x2="6" y2="3.25" width="0.2032" layer="21"/>
<wire x1="8" y1="1" x2="8" y2="-1" width="0.2032" layer="21"/>
<wire x1="6" y1="-3.25" x2="-6" y2="-3.25" width="0.2032" layer="21"/>
<wire x1="-8" y1="-1" x2="-8" y2="1" width="0.2032" layer="21"/>
<pad name="P$1" x="-7.5" y="3" drill="1.5" diameter="2.54"/>
<pad name="P$2" x="-7.5" y="-3" drill="1.5" diameter="2.54"/>
<pad name="P$3" x="7.5" y="3" drill="1.5" diameter="2.54"/>
<pad name="P$4" x="7.5" y="-3" drill="1.5" diameter="2.54"/>
<pad name="1" x="-4" y="1.25" drill="0.7" diameter="1.6764"/>
<pad name="2" x="0" y="1.25" drill="0.7" diameter="1.6764"/>
<pad name="3" x="4" y="1.25" drill="0.7" diameter="1.6764"/>
<pad name="4" x="-4" y="-1.25" drill="0.7" diameter="1.6764"/>
<pad name="5" x="0" y="-1.25" drill="0.7" diameter="1.6764"/>
<pad name="6" x="4" y="-1.25" drill="0.7" diameter="1.6764"/>
</package>
<package name="R_SW_TH">
<wire x1="-1.651" y1="19.2532" x2="-1.651" y2="-1.3716" width="0.2032" layer="21"/>
<wire x1="-1.651" y1="-1.3716" x2="-1.651" y2="-2.2352" width="0.2032" layer="21"/>
<wire x1="-1.651" y1="19.2532" x2="13.589" y2="19.2532" width="0.2032" layer="21"/>
<wire x1="13.589" y1="19.2532" x2="13.589" y2="-2.2352" width="0.2032" layer="21"/>
<wire x1="13.589" y1="-2.2352" x2="-1.651" y2="-2.2352" width="0.2032" layer="21"/>
<pad name="P$1" x="0" y="0" drill="1.6002"/>
<pad name="P$2" x="0" y="16.9926" drill="1.6002"/>
<pad name="P$3" x="12.0904" y="15.494" drill="1.6002"/>
<pad name="P$4" x="12.0904" y="8.4582" drill="1.6002"/>
</package>
<package name="SWITCH-SPDT-SMD">
<wire x1="-4.5" y1="1.75" x2="-4.5" y2="-1.75" width="0.127" layer="51"/>
<wire x1="-4.5" y1="-1.75" x2="4.5" y2="-1.75" width="0.127" layer="51"/>
<wire x1="4.5" y1="-1.75" x2="4.5" y2="1.75" width="0.127" layer="51"/>
<wire x1="4.5" y1="1.75" x2="2" y2="1.75" width="0.127" layer="51"/>
<wire x1="2" y1="1.75" x2="0.5" y2="1.75" width="0.127" layer="51"/>
<wire x1="0.5" y1="1.75" x2="-4.5" y2="1.75" width="0.127" layer="51"/>
<wire x1="0.5" y1="1.75" x2="0.5" y2="3.75" width="0.127" layer="51"/>
<wire x1="0.5" y1="3.75" x2="2" y2="3.75" width="0.127" layer="51"/>
<wire x1="2" y1="3.75" x2="2" y2="1.75" width="0.127" layer="51"/>
<wire x1="-4" y1="-1.75" x2="-4.5" y2="-1.75" width="0.2032" layer="21"/>
<wire x1="-4.5" y1="-1.75" x2="-4.5" y2="1.75" width="0.2032" layer="21"/>
<wire x1="-4.5" y1="1.75" x2="4.5" y2="1.75" width="0.2032" layer="21"/>
<wire x1="4.5" y1="1.75" x2="4.5" y2="-1.75" width="0.2032" layer="21"/>
<wire x1="4.5" y1="-1.75" x2="4" y2="-1.75" width="0.2032" layer="21"/>
<smd name="1" x="-2.5" y="-2.75" dx="1.2" dy="2.5" layer="1" rot="R180"/>
<smd name="2" x="0" y="-2.75" dx="1.2" dy="2.5" layer="1" rot="R180"/>
<smd name="3" x="2.5" y="-2.75" dx="1.2" dy="2.5" layer="1" rot="R180"/>
<text x="-1.27" y="0.635" size="0.6096" layer="25">>Name</text>
<text x="-1.27" y="-1.27" size="0.6096" layer="27">>Value</text>
<hole x="-3.55" y="0" drill="0.9"/>
<hole x="3.55" y="0" drill="0.9"/>
</package>
<package name="SWITCH-SPDT_LOCK.007S">
<wire x1="2.175" y1="5.815" x2="-2.175" y2="5.815" width="0.2032" layer="21"/>
<wire x1="-2.175" y1="5.815" x2="-2.175" y2="-5.815" width="0.2032" layer="21"/>
<wire x1="-2.175" y1="-5.815" x2="2.175" y2="-5.815" width="0.2032" layer="21"/>
<wire x1="2.175" y1="-5.815" x2="2.175" y2="5.815" width="0.2032" layer="21"/>
<pad name="1" x="0" y="2.7178" drill="1.016" diameter="1.8796"/>
<pad name="2" x="0" y="0" drill="1.016" diameter="1.8796"/>
<pad name="3" x="0" y="-2.7178" drill="1.016" diameter="1.8796"/>
<text x="-3.81" y="7.62" size="1.778" layer="25" ratio="10">>NAME</text>
<text x="-3.81" y="-9.525" size="1.778" layer="27" ratio="10">>VALUE</text>
<rectangle x1="-0.2286" y1="-0.3048" x2="0.2286" y2="0.3048" layer="51"/>
<rectangle x1="-0.2286" y1="2.2352" x2="0.2286" y2="2.8448" layer="51"/>
<rectangle x1="-0.2286" y1="-2.8448" x2="0.2286" y2="-2.2352" layer="51"/>
</package>
<package name="SWITCH-SPDT_KIT">
<description>
SWITCH-SPDT_KIT

Through-hole SPDT Switch

Warning: This is the KIT version of this package. This package has a smaller diameter top stop mask, which doesn't cover the diameter of the pad. This means only the bottom side of the pads' copper will be exposed. You'll only be able to solder to the bottom side.</description>
<wire x1="2.175" y1="5.815" x2="-2.175" y2="5.815" width="0.2032" layer="21"/>
<wire x1="-2.175" y1="5.815" x2="-2.175" y2="-5.815" width="0.2032" layer="21"/>
<wire x1="-2.175" y1="-5.815" x2="2.175" y2="-5.815" width="0.2032" layer="21"/>
<wire x1="2.175" y1="-5.815" x2="2.175" y2="5.815" width="0.2032" layer="21"/>
<pad name="1" x="0" y="2.7178" drill="1.016" diameter="1.8796" stop="no"/>
<pad name="2" x="0" y="0" drill="1.016" diameter="1.8796" stop="no"/>
<pad name="3" x="0" y="-2.7178" drill="1.016" diameter="1.8796" stop="no"/>
<text x="-3.81" y="7.62" size="1.778" layer="25" ratio="10">>NAME</text>
<text x="-3.81" y="-9.525" size="1.778" layer="27" ratio="10">>VALUE</text>
<rectangle x1="-0.2286" y1="-0.3048" x2="0.2286" y2="0.3048" layer="51"/>
<rectangle x1="-0.2286" y1="2.2352" x2="0.2286" y2="2.8448" layer="51"/>
<rectangle x1="-0.2286" y1="-2.8448" x2="0.2286" y2="-2.2352" layer="51"/>
<polygon width="0.127" layer="30">
<vertex x="-0.0178" y="1.8414" curve="-90.039946"/>
<vertex x="-0.8787" y="2.6975" curve="-90"/>
<vertex x="-0.0026" y="3.5916" curve="-90.006409"/>
<vertex x="0.8738" y="2.6975" curve="-90.03214"/>
</polygon>
<polygon width="0.127" layer="30">
<vertex x="-0.0051" y="-3.5967" curve="-90.006558"/>
<vertex x="-0.8788" y="-2.7431" curve="-90.037923"/>
<vertex x="0.0128" y="-1.8363" curve="-90.006318"/>
<vertex x="0.8814" y="-2.7432" curve="-90.038792"/>
</polygon>
<polygon width="0.127" layer="30">
<vertex x="-0.0102" y="-0.8738" curve="-90.019852"/>
<vertex x="-0.8762" y="-0.0203" curve="-90.019119"/>
<vertex x="0.0153" y="0.8789" curve="-90"/>
<vertex x="0.8739" y="-0.0077" curve="-90.038897"/>
</polygon>
<polygon width="0.127" layer="29">
<vertex x="0" y="2.2758" curve="-90.012891"/>
<vertex x="-0.4445" y="2.7" curve="-90"/>
<vertex x="0" y="3.1673" curve="-90"/>
<vertex x="0.4419" y="2.7102" curve="-90.012967"/>
</polygon>
<polygon width="0.127" layer="29">
<vertex x="0.0026" y="-3.1648" curve="-90.012891"/>
<vertex x="-0.4419" y="-2.7406" curve="-90"/>
<vertex x="0.0026" y="-2.2733" curve="-90"/>
<vertex x="0.4445" y="-2.7304" curve="-90.012967"/>
</polygon>
<polygon width="0.127" layer="29">
<vertex x="0.0102" y="-0.4471" curve="-90.012891"/>
<vertex x="-0.4343" y="-0.0229" curve="-90"/>
<vertex x="0.0102" y="0.4444" curve="-90"/>
<vertex x="0.4521" y="-0.0127" curve="-90.012967"/>
</polygon>
</package>
<package name="SWITCH-SPST-SMD-A">
<wire x1="-3.35" y1="1.3" x2="-3.35" y2="-1.3" width="0.127" layer="51"/>
<wire x1="-3.35" y1="-1.3" x2="3.35" y2="-1.3" width="0.127" layer="51"/>
<wire x1="3.35" y1="-1.3" x2="3.35" y2="1.3" width="0.127" layer="51"/>
<wire x1="3.35" y1="1.3" x2="-0.1" y2="1.3" width="0.127" layer="51"/>
<wire x1="-0.1" y1="1.3" x2="-1.4" y2="1.3" width="0.127" layer="51"/>
<wire x1="-1.4" y1="1.3" x2="-3.35" y2="1.3" width="0.127" layer="51"/>
<wire x1="-0.1" y1="1.3" x2="-0.1" y2="2.8" width="0.127" layer="51"/>
<wire x1="-0.1" y1="2.8" x2="-1.4" y2="2.8" width="0.127" layer="51"/>
<wire x1="-1.4" y1="2.8" x2="-1.4" y2="1.3" width="0.127" layer="51"/>
<wire x1="-3.35" y1="0.3" x2="-3.35" y2="-0.3" width="0.2032" layer="21"/>
<wire x1="3.35" y1="0.3" x2="3.35" y2="-0.3" width="0.2032" layer="21"/>
<wire x1="2.7" y1="1.3" x2="-2.7" y2="1.3" width="0.2032" layer="21"/>
<wire x1="1.5" y1="-1.3" x2="0" y2="-1.3" width="0.2032" layer="21"/>
<smd name="1" x="-2.25" y="-1.75" dx="0.7" dy="1.5" layer="1" rot="R180"/>
<smd name="2" x="-0.75" y="-1.75" dx="0.7" dy="1.5" layer="1" rot="R180"/>
<smd name="3" x="2.25" y="-1.75" dx="0.7" dy="1.5" layer="1" rot="R180"/>
<smd name="GND1" x="-3.65" y="1" dx="1" dy="0.6" layer="1"/>
<smd name="GND2" x="-3.65" y="-1.1" dx="1" dy="0.8" layer="1"/>
<smd name="GND3" x="3.65" y="1" dx="1" dy="0.6" layer="1"/>
<smd name="GND4" x="3.65" y="-1.1" dx="1" dy="0.8" layer="1"/>
<text x="-1.27" y="0.635" size="0.6096" layer="25">>Name</text>
<text x="-1.27" y="-1.27" size="0.6096" layer="27">>Value</text>
<hole x="-1.5" y="0" drill="0.9"/>
<hole x="1.5" y="0" drill="0.9"/>
</package>
</packages>
<symbols>
<symbol name="TOGGLE">
<wire x1="0" y1="0" x2="2.54" y2="1.27" width="0.254" layer="94"/>
<wire x1="2.54" y1="-2.54" x2="3.175" y2="-2.54" width="0.127" layer="94"/>
<wire x1="2.54" y1="2.54" x2="3.175" y2="2.54" width="0.1524" layer="94"/>
<circle x="2.54" y="2.54" radius="0.3592" width="0.2032" layer="94"/>
<circle x="2.54" y="-2.54" radius="0.3592" width="0.2032" layer="94"/>
<circle x="0" y="0" radius="0.3592" width="0.2032" layer="94"/>
<text x="-1.905" y="-6.35" size="1.778" layer="95">>NAME</text>
<text x="-2.54" y="3.81" size="1.778" layer="96">>VALUE</text>
<pin name="P" x="-2.54" y="0" visible="off" length="short" direction="pas"/>
<pin name="S" x="5.08" y="-2.54" visible="off" length="short" direction="pas" rot="R180"/>
<pin name="O" x="5.08" y="2.54" visible="off" length="short" direction="pas" rot="R180"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="SWITCH-SPDT" prefix="S" uservalue="yes">
<description>SPDT Switch

Simple slide switch, Spark Fun Electronics SKU : COM-00102

DPDT SMT slide switch, AYZ0202, SWCH-08179</description>
<gates>
<gate name="1" symbol="TOGGLE" x="-2.54" y="0"/>
</gates>
<devices>
<device name="PTH" package="SWITCH-SPDT">
<connects>
<connect gate="1" pin="O" pad="1"/>
<connect gate="1" pin="P" pad="2"/>
<connect gate="1" pin="S" pad="3"/>
</connects>
<technologies>
<technology name="">
<attribute name="PROD_ID" value="SWCH-08261"/>
</technology>
</technologies>
</device>
<device name="SMD" package="AYZ0202">
<connects>
<connect gate="1" pin="O" pad="1"/>
<connect gate="1" pin="P" pad="2"/>
<connect gate="1" pin="S" pad="3"/>
</connects>
<technologies>
<technology name="">
<attribute name="PROD_ID" value="SWCH-08179" constant="no"/>
</technology>
</technologies>
</device>
<device name="PTH2" package="SWITCHE-DPDT">
<connects>
<connect gate="1" pin="O" pad="1"/>
<connect gate="1" pin="P" pad="2"/>
<connect gate="1" pin="S" pad="3"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="PTH3" package="R_SW_TH">
<connects>
<connect gate="1" pin="O" pad="P$1"/>
<connect gate="1" pin="P" pad="P$2"/>
<connect gate="1" pin="S" pad="P$3"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="SMD2" package="SWITCH-SPDT-SMD">
<connects>
<connect gate="1" pin="O" pad="1"/>
<connect gate="1" pin="P" pad="2"/>
<connect gate="1" pin="S" pad="3"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="PTH_LOCK" package="SWITCH-SPDT_LOCK.007S">
<connects>
<connect gate="1" pin="O" pad="1"/>
<connect gate="1" pin="P" pad="2"/>
<connect gate="1" pin="S" pad="3"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="KIT" package="SWITCH-SPDT_KIT">
<connects>
<connect gate="1" pin="O" pad="1"/>
<connect gate="1" pin="P" pad="2"/>
<connect gate="1" pin="S" pad="3"/>
</connects>
<technologies>
<technology name="">
<attribute name="PROD_ID" value="SWCH-08261" constant="no"/>
</technology>
</technologies>
</device>
<device name="-SMD-A" package="SWITCH-SPST-SMD-A">
<connects>
<connect gate="1" pin="O" pad="1"/>
<connect gate="1" pin="P" pad="2"/>
<connect gate="1" pin="S" pad="3"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</libraries>
<attributes>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="0" drill="0">
</class>
</classes>
<parts>
<part name="IC1" library="national-semiconductor" deviceset="LM2936MP?*" device="" technology="-3.3"/>
<part name="WIFI" library="wifi" deviceset="ESP8266EX" device=""/>
<part name="MESH" library="RF" deviceset="NRF24L01" device=""/>
<part name="U$1" library="SparkFun-RF" deviceset="ANTENNA2" device="SMD"/>
<part name="U$5" library="SparkFun-RF" deviceset="ANTENNA2" device="SMD"/>
<part name="L3" library="SparkFun-Passives" deviceset="INDUCTOR" device="0402" value="2.7 nH"/>
<part name="L1" library="SparkFun-Passives" deviceset="INDUCTOR" device="0402" value="8.2 nH"/>
<part name="L2" library="SparkFun-Passives" deviceset="INDUCTOR" device="0402" value="3.9 nH"/>
<part name="JP1" library="SparkFun-Connectors" deviceset="M02" device="LOCK"/>
<part name="JP2" library="SparkFun-Connectors" deviceset="M02" device="LOCK"/>
<part name="JP7" library="SparkFun-Connectors" deviceset="M02" device="LOCK"/>
<part name="JP5" library="SparkFun-Connectors" deviceset="M02" device="LOCK"/>
<part name="JP6" library="SparkFun-Connectors" deviceset="M02" device="LOCK"/>
<part name="R1" library="SparkFun-Resistors" deviceset="RESISTOR" device="0603-RES" value="12k"/>
<part name="R2" library="SparkFun-Resistors" deviceset="RESISTOR" device="0603-RES" value="12k"/>
<part name="R3" library="SparkFun-Resistors" deviceset="RESISTOR" device="0603-RES" value="12k"/>
<part name="R7" library="SparkFun-Resistors" deviceset="RESISTOR" device="0603-RES" value="1M"/>
<part name="R8" library="SparkFun-Resistors" deviceset="RESISTOR" device="0603-RES" value="22k"/>
<part name="R5" library="SparkFun-Resistors" deviceset="RESISTOR" device="0603-RES" value="10k"/>
<part name="R4" library="SparkFun-Resistors" deviceset="RESISTOR" device="0603-RES" value="10k"/>
<part name="R6" library="SparkFun-Resistors" deviceset="RESISTOR" device="0603-RES" value="10k"/>
<part name="C3" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="5.6 pF"/>
<part name="C23" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="15 pF"/>
<part name="C1" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="15 pF"/>
<part name="C19" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="1 uF"/>
<part name="C15" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value=".1 uF"/>
<part name="C6" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="10 uF"/>
<part name="C18" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="33 nF"/>
<part name="C11" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="4.7 uF"/>
<part name="C7" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="1 uF"/>
<part name="C8" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value=".1 uF"/>
<part name="C10" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value=".1 uF"/>
<part name="C20" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value=".1 uF"/>
<part name="C2" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value=".1 uF"/>
<part name="C13" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="1.5 pF"/>
<part name="C12" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="1.0 pF"/>
<part name="C17" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="2.2 nF"/>
<part name="C16" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="4.7 pF"/>
<part name="C9" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="22 pF"/>
<part name="C14" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="22 pF"/>
<part name="JP3" library="SparkFun-Connectors" deviceset="M09" device=""/>
<part name="Y1" library="SparkFun-FreqCtrl" deviceset="CRYSTAL" device="5X3" value="16 Mhz"/>
<part name="Y2" library="SparkFun-FreqCtrl" deviceset="CRYSTAL" device="5X3" value="16 Mhz"/>
<part name="U$3" library="chips" deviceset="LPS25H" device=""/>
<part name="LSM303D" library="st" deviceset="LSM303D" device=""/>
<part name="C5" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value=".22 uF"/>
<part name="C4" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="4.7 uF"/>
<part name="JP4" library="SparkFun-Connectors" deviceset="M12" device="PTH"/>
<part name="S1" library="SparkFun-Electromechanical" deviceset="SWITCH-SPDT" device="-SMD-A"/>
<part name="U$4" library="st" deviceset="L3GD20H" device=""/>
<part name="C21" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="10 nF"/>
<part name="U$2" library="wifi" deviceset="25Q40" device=""/>
<part name="C22" library="SparkFun-Capacitors" deviceset="CAP" device="0603-CAP" value="1 uF"/>
</parts>
<sheets>
<sheet>
<plain>
</plain>
<instances>
<instance part="IC1" gate="G$1" x="114.3" y="114.3"/>
<instance part="WIFI" gate="G$1" x="48.26" y="53.34"/>
<instance part="MESH" gate="G$1" x="129.54" y="53.34"/>
<instance part="U$1" gate="G$1" x="-25.4" y="71.12"/>
<instance part="U$5" gate="G$1" x="195.58" y="71.12"/>
<instance part="L3" gate="G$1" x="170.18" y="48.26" rot="R90"/>
<instance part="L1" gate="G$1" x="160.02" y="58.42"/>
<instance part="L2" gate="G$1" x="170.18" y="66.04" rot="R90"/>
<instance part="JP1" gate="G$1" x="193.04" y="142.24" rot="R180"/>
<instance part="JP2" gate="G$1" x="208.28" y="142.24" rot="R180"/>
<instance part="JP7" gate="G$1" x="193.04" y="129.54" rot="R180"/>
<instance part="JP5" gate="G$1" x="208.28" y="129.54" rot="R180"/>
<instance part="JP6" gate="G$1" x="203.2" y="109.22" rot="R180"/>
<instance part="R1" gate="G$1" x="30.48" y="96.52" rot="R90"/>
<instance part="R2" gate="G$1" x="45.72" y="5.08" rot="R90"/>
<instance part="R3" gate="G$1" x="86.36" y="22.86" rot="R90"/>
<instance part="R7" gate="G$1" x="137.16" y="20.32"/>
<instance part="R8" gate="G$1" x="144.78" y="81.28"/>
<instance part="R5" gate="G$1" x="205.74" y="22.86"/>
<instance part="R4" gate="G$1" x="205.74" y="15.24"/>
<instance part="R6" gate="G$1" x="205.74" y="7.62"/>
<instance part="C3" gate="G$1" x="0" y="66.04" rot="R90"/>
<instance part="C23" gate="G$1" x="76.2" y="109.22" rot="R90"/>
<instance part="C1" gate="G$1" x="76.2" y="99.06" rot="R90"/>
<instance part="C19" gate="G$1" x="93.98" y="111.76"/>
<instance part="C15" gate="G$1" x="101.6" y="111.76"/>
<instance part="C6" gate="G$1" x="129.54" y="111.76"/>
<instance part="C18" gate="G$1" x="124.46" y="86.36"/>
<instance part="C11" gate="G$1" x="137.16" y="111.76"/>
<instance part="C7" gate="G$1" x="144.78" y="111.76"/>
<instance part="C8" gate="G$1" x="149.86" y="111.76"/>
<instance part="C10" gate="G$1" x="154.94" y="111.76"/>
<instance part="C20" gate="G$1" x="160.02" y="111.76"/>
<instance part="C2" gate="G$1" x="165.1" y="111.76"/>
<instance part="C13" gate="G$1" x="185.42" y="66.04" rot="R90"/>
<instance part="C12" gate="G$1" x="190.5" y="58.42"/>
<instance part="C17" gate="G$1" x="160.02" y="38.1"/>
<instance part="C16" gate="G$1" x="170.18" y="38.1"/>
<instance part="C9" gate="G$1" x="132.08" y="2.54"/>
<instance part="C14" gate="G$1" x="142.24" y="2.54"/>
<instance part="JP3" gate="G$1" x="236.22" y="99.06" rot="R180"/>
<instance part="Y1" gate="G$1" x="63.5" y="104.14" rot="R90"/>
<instance part="Y2" gate="G$1" x="137.16" y="12.7"/>
<instance part="U$3" gate="G$1" x="254" y="48.26"/>
<instance part="LSM303D" gate="G$1" x="256.54" y="12.7"/>
<instance part="C5" gate="G$1" x="292.1" y="10.16"/>
<instance part="C4" gate="G$1" x="284.48" y="0"/>
<instance part="JP4" gate="G$1" x="271.78" y="96.52" rot="R180"/>
<instance part="S1" gate="1" x="182.88" y="106.68"/>
<instance part="U$4" gate="G$1" x="256.54" y="-20.32"/>
<instance part="C21" gate="G$1" x="287.02" y="-22.86"/>
<instance part="U$2" gate="G$1" x="43.18" y="134.62"/>
<instance part="C22" gate="G$1" x="60.96" y="149.86"/>
</instances>
<busses>
</busses>
<nets>
<net name="VRAW" class="0">
<segment>
<pinref part="IC1" gate="G$1" pin="VIN"/>
<wire x1="104.14" y1="116.84" x2="101.6" y2="116.84" width="0.1524" layer="91"/>
<pinref part="C19" gate="G$1" pin="1"/>
<wire x1="101.6" y1="116.84" x2="93.98" y2="116.84" width="0.1524" layer="91"/>
<wire x1="93.98" y1="116.84" x2="86.36" y2="116.84" width="0.1524" layer="91"/>
<junction x="93.98" y="116.84"/>
<pinref part="C15" gate="G$1" pin="1"/>
<junction x="101.6" y="116.84"/>
</segment>
<segment>
<pinref part="S1" gate="1" pin="P"/>
<wire x1="180.34" y1="106.68" x2="177.8" y2="106.68" width="0.1524" layer="91"/>
</segment>
</net>
<net name="VDD" class="0">
<segment>
<pinref part="IC1" gate="G$1" pin="VO"/>
<wire x1="124.46" y1="116.84" x2="129.54" y2="116.84" width="0.1524" layer="91"/>
<pinref part="C6" gate="G$1" pin="1"/>
<wire x1="129.54" y1="116.84" x2="137.16" y2="116.84" width="0.1524" layer="91"/>
<junction x="129.54" y="116.84"/>
<pinref part="C11" gate="G$1" pin="1"/>
<wire x1="137.16" y1="116.84" x2="144.78" y2="116.84" width="0.1524" layer="91"/>
<junction x="137.16" y="116.84"/>
<pinref part="C7" gate="G$1" pin="1"/>
<wire x1="144.78" y1="116.84" x2="149.86" y2="116.84" width="0.1524" layer="91"/>
<junction x="144.78" y="116.84"/>
<pinref part="C8" gate="G$1" pin="1"/>
<wire x1="149.86" y1="116.84" x2="154.94" y2="116.84" width="0.1524" layer="91"/>
<junction x="149.86" y="116.84"/>
<pinref part="C10" gate="G$1" pin="1"/>
<wire x1="154.94" y1="116.84" x2="160.02" y2="116.84" width="0.1524" layer="91"/>
<junction x="154.94" y="116.84"/>
<pinref part="C20" gate="G$1" pin="1"/>
<wire x1="160.02" y1="116.84" x2="165.1" y2="116.84" width="0.1524" layer="91"/>
<junction x="160.02" y="116.84"/>
<pinref part="C2" gate="G$1" pin="1"/>
<wire x1="165.1" y1="116.84" x2="175.26" y2="116.84" width="0.1524" layer="91"/>
<junction x="165.1" y="116.84"/>
</segment>
<segment>
<pinref part="WIFI" gate="G$1" pin="VDDA/1"/>
<wire x1="12.7" y1="71.12" x2="10.16" y2="71.12" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="WIFI" gate="G$1" pin="VDD3P3/3"/>
<wire x1="12.7" y1="60.96" x2="10.16" y2="60.96" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="WIFI" gate="G$1" pin="VDD3P3/4"/>
<wire x1="12.7" y1="55.88" x2="10.16" y2="55.88" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="WIFI" gate="G$1" pin="CHIP_EN/7"/>
<wire x1="12.7" y1="40.64" x2="10.16" y2="40.64" width="0.1524" layer="91"/>
</segment>
<segment>
<wire x1="83.82" y1="12.7" x2="83.82" y2="27.94" width="0.1524" layer="91"/>
<pinref part="WIFI" gate="G$1" pin="VDDPST/17"/>
<wire x1="83.82" y1="35.56" x2="86.36" y2="35.56" width="0.1524" layer="91"/>
<junction x="86.36" y="35.56"/>
<wire x1="86.36" y1="27.94" x2="86.36" y2="35.56" width="0.1524" layer="91"/>
<wire x1="83.82" y1="27.94" x2="86.36" y2="27.94" width="0.1524" layer="91"/>
<wire x1="86.36" y1="35.56" x2="91.44" y2="35.56" width="0.1524" layer="91"/>
<pinref part="WIFI" gate="G$1" pin="VDDPST/11"/>
<wire x1="40.64" y1="17.78" x2="40.64" y2="12.7" width="0.1524" layer="91"/>
<wire x1="40.64" y1="12.7" x2="83.82" y2="12.7" width="0.1524" layer="91"/>
<pinref part="R3" gate="G$1" pin="2"/>
<junction x="86.36" y="27.94"/>
</segment>
<segment>
<pinref part="WIFI" gate="G$1" pin="VDDD/29"/>
<wire x1="45.72" y1="88.9" x2="45.72" y2="91.44" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="WIFI" gate="G$1" pin="VDDA/30"/>
<wire x1="40.64" y1="88.9" x2="40.64" y2="91.44" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="MESH" gate="G$1" pin="VDD/15"/>
<wire x1="154.94" y1="63.5" x2="157.48" y2="63.5" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="MESH" gate="G$1" pin="VDD/18"/>
<wire x1="129.54" y1="78.74" x2="129.54" y2="81.28" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="MESH" gate="G$1" pin="VDD/7"/>
<wire x1="124.46" y1="27.94" x2="124.46" y2="25.4" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP1" gate="G$1" pin="1"/>
<wire x1="185.42" y1="142.24" x2="182.88" y2="142.24" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="R5" gate="G$1" pin="1"/>
<wire x1="200.66" y1="22.86" x2="195.58" y2="22.86" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="R4" gate="G$1" pin="1"/>
<wire x1="200.66" y1="15.24" x2="195.58" y2="15.24" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="R6" gate="G$1" pin="1"/>
<wire x1="200.66" y1="7.62" x2="195.58" y2="7.62" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$3" gate="G$1" pin="VDD"/>
<wire x1="238.76" y1="43.18" x2="236.22" y2="43.18" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$3" gate="G$1" pin="VDD_IO"/>
<wire x1="238.76" y1="33.02" x2="236.22" y2="33.02" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$3" gate="G$1" pin="CS"/>
<wire x1="274.32" y1="68.58" x2="276.86" y2="68.58" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="LSM303D" gate="G$1" pin="CS"/>
<wire x1="238.76" y1="12.7" x2="236.22" y2="12.7" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="LSM303D" gate="G$1" pin="VDD"/>
<wire x1="274.32" y1="20.32" x2="276.86" y2="20.32" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="LSM303D" gate="G$1" pin="VDD_IO"/>
<wire x1="274.32" y1="17.78" x2="276.86" y2="17.78" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="7"/>
<wire x1="261.62" y1="96.52" x2="259.08" y2="96.52" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="8"/>
<wire x1="261.62" y1="93.98" x2="259.08" y2="93.98" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="10"/>
<wire x1="261.62" y1="88.9" x2="259.08" y2="88.9" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="11"/>
<wire x1="261.62" y1="86.36" x2="259.08" y2="86.36" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="12"/>
<wire x1="261.62" y1="83.82" x2="259.08" y2="83.82" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="9"/>
<wire x1="261.62" y1="91.44" x2="259.08" y2="91.44" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="CS"/>
<wire x1="238.76" y1="-17.78" x2="236.22" y2="-17.78" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="VDD"/>
<wire x1="274.32" y1="-10.16" x2="276.86" y2="-10.16" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="VDD_IO"/>
<wire x1="274.32" y1="-12.7" x2="276.86" y2="-12.7" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="RES4"/>
<wire x1="274.32" y1="-25.4" x2="276.86" y2="-25.4" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$2" gate="G$1" pin="VCC"/>
<wire x1="58.42" y1="142.24" x2="60.96" y2="142.24" width="0.1524" layer="91"/>
<wire x1="60.96" y1="142.24" x2="60.96" y2="147.32" width="0.1524" layer="91"/>
<junction x="60.96" y="142.24"/>
<wire x1="60.96" y1="142.24" x2="63.5" y2="142.24" width="0.1524" layer="91"/>
<pinref part="C22" gate="G$1" pin="2"/>
</segment>
</net>
<net name="SD-CMD" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="SD_CMD/20"/>
<wire x1="83.82" y1="50.8" x2="86.36" y2="50.8" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$2" gate="G$1" pin="CS#"/>
<wire x1="27.94" y1="142.24" x2="25.4" y2="142.24" width="0.1524" layer="91"/>
</segment>
</net>
<net name="SD-D0" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="SD_DATA_0/22"/>
<wire x1="83.82" y1="60.96" x2="86.36" y2="60.96" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$2" gate="G$1" pin="DO"/>
<wire x1="27.94" y1="137.16" x2="25.4" y2="137.16" width="0.1524" layer="91"/>
</segment>
</net>
<net name="SD-D3" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="SD_DATA_3/19"/>
<wire x1="83.82" y1="45.72" x2="86.36" y2="45.72" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$2" gate="G$1" pin="WP#"/>
<wire x1="27.94" y1="132.08" x2="25.4" y2="132.08" width="0.1524" layer="91"/>
</segment>
</net>
<net name="SD-D2" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="SD_DATA_2/18"/>
<wire x1="83.82" y1="40.64" x2="86.36" y2="40.64" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$2" gate="G$1" pin="HOLD#"/>
<wire x1="58.42" y1="137.16" x2="60.96" y2="137.16" width="0.1524" layer="91"/>
</segment>
</net>
<net name="SD-CLK" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="SD_CLK/21"/>
<wire x1="83.82" y1="55.88" x2="86.36" y2="55.88" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$2" gate="G$1" pin="CLK"/>
<wire x1="58.42" y1="132.08" x2="60.96" y2="132.08" width="0.1524" layer="91"/>
</segment>
</net>
<net name="SD-D1" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="SD_DATA_1/23"/>
<wire x1="83.82" y1="66.04" x2="86.36" y2="66.04" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$2" gate="G$1" pin="DIO"/>
<wire x1="58.42" y1="127" x2="60.96" y2="127" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$13" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="LNA/2"/>
<wire x1="12.7" y1="66.04" x2="2.54" y2="66.04" width="0.1524" layer="91"/>
<pinref part="C3" gate="G$1" pin="2"/>
</segment>
</net>
<net name="RTC" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="VDD_RTC/5"/>
<wire x1="12.7" y1="50.8" x2="10.16" y2="50.8" width="0.1524" layer="91"/>
</segment>
</net>
<net name="TOUT" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="TOUT/6"/>
<wire x1="12.7" y1="45.72" x2="10.16" y2="45.72" width="0.1524" layer="91"/>
</segment>
</net>
<net name="TX_W" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="U0RXD/25"/>
<wire x1="66.04" y1="88.9" x2="66.04" y2="91.44" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP3" gate="G$1" pin="2"/>
<wire x1="226.06" y1="106.68" x2="223.52" y2="106.68" width="0.1524" layer="91"/>
</segment>
</net>
<net name="RX_W" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="U0TXD/26"/>
<wire x1="60.96" y1="88.9" x2="60.96" y2="91.44" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP3" gate="G$1" pin="1"/>
<wire x1="226.06" y1="109.22" x2="223.52" y2="109.22" width="0.1524" layer="91"/>
</segment>
</net>
<net name="XTAL_OUT" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="XTAL_OUT/27"/>
<wire x1="71.12" y1="99.06" x2="63.5" y2="99.06" width="0.1524" layer="91"/>
<wire x1="63.5" y1="99.06" x2="55.88" y2="99.06" width="0.1524" layer="91"/>
<wire x1="55.88" y1="99.06" x2="55.88" y2="88.9" width="0.1524" layer="91"/>
<pinref part="C1" gate="G$1" pin="1"/>
<pinref part="Y1" gate="G$1" pin="1"/>
<wire x1="63.5" y1="99.06" x2="63.5" y2="101.6" width="0.1524" layer="91"/>
<junction x="63.5" y="99.06"/>
</segment>
</net>
<net name="XTAL_IN" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="XTAL_IN/28"/>
<wire x1="50.8" y1="88.9" x2="50.8" y2="109.22" width="0.1524" layer="91"/>
<wire x1="50.8" y1="109.22" x2="63.5" y2="109.22" width="0.1524" layer="91"/>
<pinref part="C23" gate="G$1" pin="1"/>
<pinref part="Y1" gate="G$1" pin="2"/>
<wire x1="63.5" y1="109.22" x2="71.12" y2="109.22" width="0.1524" layer="91"/>
<wire x1="63.5" y1="109.22" x2="63.5" y2="106.68" width="0.1524" layer="91"/>
<junction x="63.5" y="109.22"/>
</segment>
</net>
<net name="N$38" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="RES12K/31"/>
<wire x1="35.56" y1="88.9" x2="35.56" y2="91.44" width="0.1524" layer="91"/>
</segment>
</net>
<net name="RST" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="EXT_RSTB/32"/>
<wire x1="30.48" y1="88.9" x2="30.48" y2="91.44" width="0.1524" layer="91"/>
<pinref part="R1" gate="G$1" pin="1"/>
</segment>
</net>
<net name="N$1" class="0">
<segment>
<wire x1="-5.08" y1="66.04" x2="-25.4" y2="66.04" width="0.1524" layer="91"/>
<pinref part="U$1" gate="G$1" pin="SIGNAL"/>
<pinref part="C3" gate="G$1" pin="1"/>
</segment>
</net>
<net name="CE" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="CE/1"/>
<wire x1="104.14" y1="63.5" x2="101.6" y2="63.5" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP3" gate="G$1" pin="3"/>
<wire x1="226.06" y1="104.14" x2="223.52" y2="104.14" width="0.1524" layer="91"/>
</segment>
</net>
<net name="CSN" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="CSN/2"/>
<wire x1="104.14" y1="58.42" x2="101.6" y2="58.42" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP3" gate="G$1" pin="4"/>
<wire x1="226.06" y1="101.6" x2="223.52" y2="101.6" width="0.1524" layer="91"/>
</segment>
</net>
<net name="SCK" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="SCK/3"/>
<wire x1="104.14" y1="53.34" x2="101.6" y2="53.34" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP3" gate="G$1" pin="7"/>
<wire x1="226.06" y1="93.98" x2="223.52" y2="93.98" width="0.1524" layer="91"/>
</segment>
</net>
<net name="MOSI" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="MOSI/4"/>
<wire x1="104.14" y1="48.26" x2="101.6" y2="48.26" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP3" gate="G$1" pin="5"/>
<wire x1="226.06" y1="99.06" x2="223.52" y2="99.06" width="0.1524" layer="91"/>
</segment>
</net>
<net name="MISO" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="MISO/5"/>
<wire x1="104.14" y1="43.18" x2="101.6" y2="43.18" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP3" gate="G$1" pin="6"/>
<wire x1="226.06" y1="96.52" x2="223.52" y2="96.52" width="0.1524" layer="91"/>
</segment>
</net>
<net name="IQR" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="IRQ/6"/>
<wire x1="119.38" y1="27.94" x2="119.38" y2="25.4" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$16" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="XC2/9"/>
<wire x1="134.62" y1="27.94" x2="134.62" y2="25.4" width="0.1524" layer="91"/>
<wire x1="134.62" y1="25.4" x2="132.08" y2="25.4" width="0.1524" layer="91"/>
<wire x1="132.08" y1="25.4" x2="132.08" y2="20.32" width="0.1524" layer="91"/>
<wire x1="132.08" y1="20.32" x2="132.08" y2="12.7" width="0.1524" layer="91"/>
<pinref part="R7" gate="G$1" pin="1"/>
<junction x="132.08" y="20.32"/>
<pinref part="C9" gate="G$1" pin="1"/>
<pinref part="Y2" gate="G$1" pin="1"/>
<wire x1="132.08" y1="12.7" x2="132.08" y2="7.62" width="0.1524" layer="91"/>
<wire x1="134.62" y1="12.7" x2="132.08" y2="12.7" width="0.1524" layer="91"/>
<junction x="132.08" y="12.7"/>
</segment>
</net>
<net name="N$17" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="XC1/10"/>
<wire x1="139.7" y1="27.94" x2="139.7" y2="25.4" width="0.1524" layer="91"/>
<wire x1="139.7" y1="25.4" x2="142.24" y2="25.4" width="0.1524" layer="91"/>
<wire x1="142.24" y1="25.4" x2="142.24" y2="20.32" width="0.1524" layer="91"/>
<wire x1="142.24" y1="20.32" x2="142.24" y2="12.7" width="0.1524" layer="91"/>
<pinref part="R7" gate="G$1" pin="2"/>
<junction x="142.24" y="20.32"/>
<pinref part="C14" gate="G$1" pin="1"/>
<pinref part="Y2" gate="G$1" pin="2"/>
<wire x1="142.24" y1="12.7" x2="142.24" y2="7.62" width="0.1524" layer="91"/>
<wire x1="139.7" y1="12.7" x2="142.24" y2="12.7" width="0.1524" layer="91"/>
<junction x="142.24" y="12.7"/>
</segment>
</net>
<net name="N$18" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="VDD_PA/11"/>
<pinref part="L3" gate="G$1" pin="2"/>
<wire x1="154.94" y1="43.18" x2="160.02" y2="43.18" width="0.1524" layer="91"/>
<wire x1="160.02" y1="43.18" x2="170.18" y2="43.18" width="0.1524" layer="91"/>
<wire x1="170.18" y1="43.18" x2="177.8" y2="43.18" width="0.1524" layer="91"/>
<wire x1="177.8" y1="48.26" x2="177.8" y2="43.18" width="0.1524" layer="91"/>
<pinref part="C17" gate="G$1" pin="1"/>
<junction x="160.02" y="43.18"/>
<pinref part="C16" gate="G$1" pin="1"/>
<junction x="170.18" y="43.18"/>
</segment>
</net>
<net name="N$19" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="ANT2/13"/>
<wire x1="154.94" y1="53.34" x2="154.94" y2="66.04" width="0.1524" layer="91"/>
<wire x1="154.94" y1="66.04" x2="160.02" y2="66.04" width="0.1524" layer="91"/>
<pinref part="L1" gate="G$1" pin="1"/>
<junction x="160.02" y="66.04"/>
<pinref part="L2" gate="G$1" pin="1"/>
<wire x1="160.02" y1="66.04" x2="162.56" y2="66.04" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$24" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="IREF/16"/>
<wire x1="139.7" y1="78.74" x2="139.7" y2="81.28" width="0.1524" layer="91"/>
<pinref part="R8" gate="G$1" pin="1"/>
</segment>
</net>
<net name="N$28" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="DVDD/19"/>
<wire x1="124.46" y1="78.74" x2="124.46" y2="83.82" width="0.1524" layer="91"/>
<pinref part="C18" gate="G$1" pin="2"/>
</segment>
</net>
<net name="N$30" class="0">
<segment>
<pinref part="MESH" gate="G$1" pin="GND"/>
<wire x1="111.76" y1="78.74" x2="111.76" y2="81.28" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$5" class="0">
<segment>
<pinref part="L3" gate="G$1" pin="1"/>
<pinref part="MESH" gate="G$1" pin="ANT1/12"/>
<wire x1="154.94" y1="48.26" x2="160.02" y2="48.26" width="0.1524" layer="91"/>
<pinref part="L1" gate="G$1" pin="2"/>
<wire x1="160.02" y1="48.26" x2="162.56" y2="48.26" width="0.1524" layer="91"/>
<wire x1="160.02" y1="50.8" x2="160.02" y2="48.26" width="0.1524" layer="91"/>
<junction x="160.02" y="48.26"/>
</segment>
</net>
<net name="N$6" class="0">
<segment>
<pinref part="L2" gate="G$1" pin="2"/>
<wire x1="177.8" y1="66.04" x2="180.34" y2="66.04" width="0.1524" layer="91"/>
<pinref part="C13" gate="G$1" pin="1"/>
</segment>
</net>
<net name="N$10" class="0">
<segment>
<pinref part="U$5" gate="G$1" pin="SIGNAL"/>
<wire x1="187.96" y1="66.04" x2="190.5" y2="66.04" width="0.1524" layer="91"/>
<wire x1="190.5" y1="66.04" x2="195.58" y2="66.04" width="0.1524" layer="91"/>
<wire x1="190.5" y1="63.5" x2="190.5" y2="66.04" width="0.1524" layer="91"/>
<junction x="190.5" y="66.04"/>
<pinref part="C13" gate="G$1" pin="2"/>
<pinref part="C12" gate="G$1" pin="1"/>
</segment>
</net>
<net name="N$2" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="GPIO2/14"/>
<wire x1="55.88" y1="17.78" x2="55.88" y2="15.24" width="0.1524" layer="91"/>
<wire x1="55.88" y1="15.24" x2="86.36" y2="15.24" width="0.1524" layer="91"/>
<wire x1="86.36" y1="15.24" x2="86.36" y2="17.78" width="0.1524" layer="91"/>
<pinref part="R3" gate="G$1" pin="1"/>
</segment>
</net>
<net name="SDA" class="0">
<segment>
<pinref part="JP3" gate="G$1" pin="8"/>
<wire x1="226.06" y1="91.44" x2="223.52" y2="91.44" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="R5" gate="G$1" pin="2"/>
<wire x1="210.82" y1="22.86" x2="213.36" y2="22.86" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$3" gate="G$1" pin="SDA"/>
<wire x1="274.32" y1="50.8" x2="276.86" y2="50.8" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="LSM303D" gate="G$1" pin="SDA/SDI"/>
<wire x1="238.76" y1="17.78" x2="236.22" y2="17.78" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="SDA/SDI"/>
<wire x1="238.76" y1="-12.7" x2="236.22" y2="-12.7" width="0.1524" layer="91"/>
</segment>
</net>
<net name="SCL" class="0">
<segment>
<pinref part="JP3" gate="G$1" pin="9"/>
<wire x1="226.06" y1="88.9" x2="223.52" y2="88.9" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="R4" gate="G$1" pin="2"/>
<wire x1="210.82" y1="15.24" x2="213.36" y2="15.24" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$3" gate="G$1" pin="SCL"/>
<wire x1="274.32" y1="33.02" x2="276.86" y2="33.02" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="LSM303D" gate="G$1" pin="SCL/SPC"/>
<wire x1="238.76" y1="20.32" x2="236.22" y2="20.32" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="SCL/SPC"/>
<wire x1="238.76" y1="-10.16" x2="236.22" y2="-10.16" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$3" class="0">
<segment>
<pinref part="WIFI" gate="G$1" pin="MTCK/12"/>
<wire x1="45.72" y1="17.78" x2="45.72" y2="10.16" width="0.1524" layer="91"/>
<pinref part="R2" gate="G$1" pin="2"/>
</segment>
</net>
<net name="SDO" class="0">
<segment>
<pinref part="R6" gate="G$1" pin="2"/>
<wire x1="210.82" y1="7.62" x2="213.36" y2="7.62" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$3" gate="G$1" pin="SA0"/>
<wire x1="274.32" y1="58.42" x2="276.86" y2="58.42" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="LSM303D" gate="G$1" pin="SDO"/>
<wire x1="238.76" y1="15.24" x2="236.22" y2="15.24" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="SDO"/>
<wire x1="238.76" y1="-15.24" x2="236.22" y2="-15.24" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$14" class="0">
<segment>
<pinref part="U$3" gate="G$1" pin="INT"/>
<wire x1="238.76" y1="68.58" x2="236.22" y2="68.58" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$35" class="0">
<segment>
<pinref part="LSM303D" gate="G$1" pin="INT1"/>
<wire x1="238.76" y1="10.16" x2="236.22" y2="10.16" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$36" class="0">
<segment>
<pinref part="LSM303D" gate="G$1" pin="INT2"/>
<wire x1="238.76" y1="7.62" x2="236.22" y2="7.62" width="0.1524" layer="91"/>
</segment>
</net>
<net name="SETP" class="0">
<segment>
<pinref part="LSM303D" gate="G$1" pin="SETP"/>
<pinref part="C5" gate="G$1" pin="1"/>
<wire x1="274.32" y1="15.24" x2="292.1" y2="15.24" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$42" class="0">
<segment>
<pinref part="LSM303D" gate="G$1" pin="SETC"/>
<wire x1="274.32" y1="10.16" x2="284.48" y2="10.16" width="0.1524" layer="91"/>
<wire x1="284.48" y1="10.16" x2="284.48" y2="7.62" width="0.1524" layer="91"/>
<pinref part="C5" gate="G$1" pin="2"/>
<wire x1="284.48" y1="7.62" x2="292.1" y2="7.62" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$43" class="0">
<segment>
<pinref part="LSM303D" gate="G$1" pin="C1"/>
<wire x1="274.32" y1="7.62" x2="281.94" y2="7.62" width="0.1524" layer="91"/>
<wire x1="281.94" y1="7.62" x2="281.94" y2="5.08" width="0.1524" layer="91"/>
<pinref part="C4" gate="G$1" pin="1"/>
<wire x1="281.94" y1="5.08" x2="284.48" y2="5.08" width="0.1524" layer="91"/>
</segment>
</net>
<net name="GND" class="0">
<segment>
<pinref part="JP4" gate="G$1" pin="1"/>
<wire x1="261.62" y1="111.76" x2="259.08" y2="111.76" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="2"/>
<wire x1="261.62" y1="109.22" x2="259.08" y2="109.22" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP1" gate="G$1" pin="2"/>
<wire x1="185.42" y1="139.7" x2="182.88" y2="139.7" width="0.1524" layer="91"/>
</segment>
<segment>
<wire x1="93.98" y1="109.22" x2="93.98" y2="106.68" width="0.1524" layer="91"/>
<pinref part="C19" gate="G$1" pin="2"/>
</segment>
<segment>
<wire x1="101.6" y1="109.22" x2="101.6" y2="106.68" width="0.1524" layer="91"/>
<pinref part="C15" gate="G$1" pin="2"/>
</segment>
<segment>
<pinref part="IC1" gate="G$1" pin="GND@1"/>
<wire x1="111.76" y1="106.68" x2="111.76" y2="104.14" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="IC1" gate="G$1" pin="GND@2"/>
<wire x1="116.84" y1="106.68" x2="116.84" y2="104.14" width="0.1524" layer="91"/>
</segment>
<segment>
<wire x1="129.54" y1="109.22" x2="129.54" y2="106.68" width="0.1524" layer="91"/>
<pinref part="C6" gate="G$1" pin="2"/>
</segment>
<segment>
<wire x1="137.16" y1="109.22" x2="137.16" y2="106.68" width="0.1524" layer="91"/>
<pinref part="C11" gate="G$1" pin="2"/>
</segment>
<segment>
<wire x1="144.78" y1="109.22" x2="144.78" y2="106.68" width="0.1524" layer="91"/>
<pinref part="C7" gate="G$1" pin="2"/>
</segment>
<segment>
<wire x1="149.86" y1="109.22" x2="149.86" y2="106.68" width="0.1524" layer="91"/>
<pinref part="C8" gate="G$1" pin="2"/>
</segment>
<segment>
<wire x1="160.02" y1="109.22" x2="160.02" y2="106.68" width="0.1524" layer="91"/>
<pinref part="C20" gate="G$1" pin="2"/>
</segment>
<segment>
<wire x1="165.1" y1="109.22" x2="165.1" y2="106.68" width="0.1524" layer="91"/>
<pinref part="C2" gate="G$1" pin="2"/>
</segment>
<segment>
<wire x1="78.74" y1="109.22" x2="78.74" y2="104.14" width="0.1524" layer="91"/>
<junction x="78.74" y="104.14"/>
<wire x1="78.74" y1="104.14" x2="78.74" y2="99.06" width="0.1524" layer="91"/>
<wire x1="78.74" y1="104.14" x2="83.82" y2="104.14" width="0.1524" layer="91"/>
<pinref part="C23" gate="G$1" pin="2"/>
<pinref part="C1" gate="G$1" pin="2"/>
</segment>
<segment>
<pinref part="WIFI" gate="G$1" pin="GND/33"/>
<wire x1="25.4" y1="88.9" x2="25.4" y2="91.44" width="0.1524" layer="91"/>
</segment>
<segment>
<wire x1="190.5" y1="55.88" x2="190.5" y2="50.8" width="0.1524" layer="91"/>
<pinref part="C12" gate="G$1" pin="2"/>
</segment>
<segment>
<wire x1="160.02" y1="35.56" x2="160.02" y2="33.02" width="0.1524" layer="91"/>
<pinref part="C17" gate="G$1" pin="2"/>
</segment>
<segment>
<wire x1="170.18" y1="35.56" x2="170.18" y2="33.02" width="0.1524" layer="91"/>
<pinref part="C16" gate="G$1" pin="2"/>
</segment>
<segment>
<wire x1="132.08" y1="0" x2="137.16" y2="0" width="0.1524" layer="91"/>
<junction x="137.16" y="0"/>
<wire x1="137.16" y1="0" x2="142.24" y2="0" width="0.1524" layer="91"/>
<wire x1="137.16" y1="0" x2="137.16" y2="-2.54" width="0.1524" layer="91"/>
<pinref part="C9" gate="G$1" pin="2"/>
<pinref part="C14" gate="G$1" pin="2"/>
</segment>
<segment>
<pinref part="MESH" gate="G$1" pin="VSS/8"/>
<wire x1="129.54" y1="27.94" x2="129.54" y2="25.4" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="MESH" gate="G$1" pin="VSS/14"/>
<wire x1="154.94" y1="58.42" x2="157.48" y2="58.42" width="0.1524" layer="91"/>
</segment>
<segment>
<wire x1="124.46" y1="91.44" x2="124.46" y2="93.98" width="0.1524" layer="91"/>
<pinref part="C18" gate="G$1" pin="1"/>
</segment>
<segment>
<wire x1="149.86" y1="81.28" x2="152.4" y2="81.28" width="0.1524" layer="91"/>
<pinref part="R8" gate="G$1" pin="2"/>
</segment>
<segment>
<pinref part="MESH" gate="G$1" pin="VSS/20"/>
<wire x1="119.38" y1="78.74" x2="119.38" y2="81.28" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="MESH" gate="G$1" pin="VSS/17"/>
<wire x1="134.62" y1="78.74" x2="134.62" y2="81.28" width="0.1524" layer="91"/>
</segment>
<segment>
<wire x1="45.72" y1="0" x2="45.72" y2="-2.54" width="0.1524" layer="91"/>
<pinref part="R2" gate="G$1" pin="1"/>
</segment>
<segment>
<pinref part="JP6" gate="G$1" pin="2"/>
<wire x1="195.58" y1="106.68" x2="193.04" y2="106.68" width="0.1524" layer="91"/>
</segment>
<segment>
<wire x1="154.94" y1="109.22" x2="154.94" y2="106.68" width="0.1524" layer="91"/>
<pinref part="C10" gate="G$1" pin="2"/>
</segment>
<segment>
<pinref part="U$3" gate="G$1" pin="GND@2"/>
<wire x1="238.76" y1="58.42" x2="236.22" y2="58.42" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$3" gate="G$1" pin="GND@1"/>
<wire x1="238.76" y1="50.8" x2="236.22" y2="50.8" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$3" gate="G$1" pin="RGND"/>
<wire x1="274.32" y1="43.18" x2="276.86" y2="43.18" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="LSM303D" gate="G$1" pin="RES"/>
<wire x1="238.76" y1="5.08" x2="236.22" y2="5.08" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="LSM303D" gate="G$1" pin="GND"/>
<wire x1="274.32" y1="5.08" x2="276.86" y2="5.08" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="C4" gate="G$1" pin="2"/>
<wire x1="284.48" y1="-2.54" x2="284.48" y2="-5.08" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="3"/>
<wire x1="261.62" y1="106.68" x2="259.08" y2="106.68" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="4"/>
<wire x1="261.62" y1="104.14" x2="259.08" y2="104.14" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="5"/>
<wire x1="261.62" y1="101.6" x2="259.08" y2="101.6" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="JP4" gate="G$1" pin="6"/>
<wire x1="261.62" y1="99.06" x2="259.08" y2="99.06" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="DEN"/>
<wire x1="238.76" y1="-25.4" x2="236.22" y2="-25.4" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="RES1"/>
<wire x1="274.32" y1="-17.78" x2="276.86" y2="-17.78" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="RES2"/>
<wire x1="274.32" y1="-20.32" x2="276.86" y2="-20.32" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="RES3"/>
<wire x1="274.32" y1="-22.86" x2="276.86" y2="-22.86" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$4" gate="G$1" pin="GND"/>
<wire x1="274.32" y1="-27.94" x2="276.86" y2="-27.94" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$2" gate="G$1" pin="GND"/>
<wire x1="27.94" y1="127" x2="25.4" y2="127" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="C22" gate="G$1" pin="1"/>
<wire x1="60.96" y1="154.94" x2="60.96" y2="157.48" width="0.1524" layer="91"/>
</segment>
</net>
<net name="VIN" class="0">
<segment>
<pinref part="JP6" gate="G$1" pin="1"/>
<pinref part="S1" gate="1" pin="O"/>
<wire x1="187.96" y1="109.22" x2="195.58" y2="109.22" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$11" class="0">
<segment>
<pinref part="U$4" gate="G$1" pin="INT1"/>
<wire x1="238.76" y1="-20.32" x2="236.22" y2="-20.32" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$12" class="0">
<segment>
<pinref part="U$4" gate="G$1" pin="DRDY/INT2"/>
<wire x1="238.76" y1="-22.86" x2="236.22" y2="-22.86" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$22" class="0">
<segment>
<pinref part="U$4" gate="G$1" pin="CAP"/>
<wire x1="274.32" y1="-15.24" x2="287.02" y2="-15.24" width="0.1524" layer="91"/>
<pinref part="C21" gate="G$1" pin="1"/>
<wire x1="287.02" y1="-15.24" x2="287.02" y2="-17.78" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$31" class="0">
<segment>
<pinref part="C21" gate="G$1" pin="2"/>
<wire x1="287.02" y1="-25.4" x2="287.02" y2="-27.94" width="0.1524" layer="91"/>
</segment>
</net>
</nets>
</sheet>
</sheets>
</schematic>
</drawing>
<compatibility>
<note version="6.3" minversion="6.2.2" severity="warning">
Since Version 6.2.2 text objects can contain more than one line,
which will not be processed correctly with this version.
</note>
</compatibility>
</eagle>

repository: zzrgenius/Clay

repo_name: zzrgenius/Clay

extension: sch


text:
import { Type } from '@nestjs/common';
import { MappedType } from './mapped-type.interface';
import {
  inheritPropertyInitializers,
  inheritTransformationMetadata,
  inheritValidationMetadata,
} from './type-helpers.utils';

export function IntersectionType<A, B>(
  target: Type<A>,
  source: Type<B>,
): MappedType<A & B>;

export function IntersectionType<A, B, C>(
  target: Type<A>,
  sourceB: Type<B>,
  sourceC: Type<C>,
): MappedType<A & B & C>;

export function IntersectionType<A, B, C, D>(
  target: Type<A>,
  sourceB: Type<B>,
  sourceC: Type<C>,
  sourceD: Type<D>,
): MappedType<A & B & C & D>;

export function IntersectionType<A, T extends { new (...arg: any): any }[]>(
  classA: Type<A>,
  ...classRefs: T
): MappedType<A> {
  const allClassRefs = [classA, ...classRefs];

  abstract class IntersectionClassType {
    constructor() {
      allClassRefs.forEach((classRef) => {
        inheritPropertyInitializers(this, classRef);
      });
    }
  }

  allClassRefs.forEach((classRef) => {
    inheritValidationMetadata(classRef, IntersectionClassType);
    inheritTransformationMetadata(classRef, IntersectionClassType);
  });

  const intersectedNames = allClassRefs.reduce(
    (prev, ref) => prev + ref.name,
    '',
  );
  Object.defineProperty(IntersectionClassType, 'name', {
    value: `Intersection${intersectedNames}`,
  });
  return IntersectionClassType as MappedType<A>;
}

license: MIT

repository: mohsensaremi/mapped-types

license_type: permissive

repo_name: mohsensaremi/mapped-types

branch_name: refs/heads/master

extension: ts


text:
package main

/*

ttl 反劫持功能

目前的策略：

发现 http 连接将要建立时立刻：
* 发送一些错误数据
* 重置连接

通过设置 ttl 值使得错误数据及重置连接命令不会达到真正的目标网站，仅仅只传递到可能存在的劫持服务器。

*/

import (
	"fmt"
	"github.com/google/gopacket"
	"github.com/google/gopacket/pcap"
	"github.com/google/gopacket/layers"
	"net"
	"os"
	"sync"
)

func main() {
	devs, err := pcap.FindAllDevs()
	if err != nil {
		panic(err)
	}

	wg := sync.WaitGroup{}
	for _, dev := range devs {
		wg.Add(1)
		dev := dev
		fmt.Println("开始混淆：")
		fmt.Println(dev.Name)
		fmt.Println(dev.Addresses)
		fmt.Println(dev.Description)
		fmt.Println("\r\n")
		go func() {
			defer wg.Done()
			capturePacket(dev.Name)
		}()
	}
	wg.Wait()
}

func capturePacket(deviceName string) {
	if handle, err := pcap.OpenLive(deviceName, 1600, false, pcap.BlockForever); err != nil {
		fmt.Println("监听失败，请确认安装了 pacp 库。详细信息：", err)
		os.Exit(-1)
		// 捕获所有 源端口是 80 的 SYN、ACK 包
	} else if err := handle.SetBPFFilter("tcp and src port 80 and tcp[13] == 0x12"); err != nil {
		//	} else if err := handle.SetBPFFilter("tcp and ((dst port 80 and tcp[13] == 0x02)or (src port 80 and tcp[13] == 0x12))"); err != nil {  // optional
		panic(err)
	} else {
		defer handle.Close()
		packetSource := gopacket.NewPacketSource(handle, handle.LinkType())
		for packet := range packetSource.Packets() {
			handlePacket(handle, packet)
		}
	}
}

func handlePacket(handle *pcap.Handle, packet gopacket.Packet) {
	ethLayer := packet.LinkLayer()
	if ethLayer == nil {
		return
	}
	eth, ok := ethLayer.(*layers.Ethernet)
	if !ok {
		return
	}

	ipLayer := packet.NetworkLayer()
	if ipLayer == nil {
		return
	}

	ip, ok := ipLayer.(*layers.IPv4)
	if !ok {
		return
	}

	tcpLayer := packet.Layer(layers.LayerTypeTCP)
	if tcpLayer == nil {
		return
	}
	tcp, ok := tcpLayer.(*layers.TCP)
	if !ok {
		return
	}

	// 服务器回应 SYN 请求
	if tcp.SYN == true && tcp.ACK == true {
		ttl := uint8(0)

		switch {
		case ip.TTL > 128:
			//Solaris/AIX
			ttl = 254 - ip.TTL
		case ip.TTL > 64:
			// windows
			ttl = 128 - ip.TTL
		default:
			// linux
			ttl = 64 - ip.TTL
		}

		switch  {
		case ttl > 10:
			ttl -= 4
		case ttl > 5:
			ttl -= 2
		case ttl > 2:
			ttl -= 1
		default:
			return
		}

		ack := tcp.Seq + uint32(len(tcp.Payload)) + 1
		data := []byte{1, 2, 3, 4, 5, 6, 7, 8, 9}
		seq := tcp.Ack
		sendPacket(handle, eth.DstMAC, eth.SrcMAC, ip.DstIP, ip.SrcIP, tcp.DstPort, tcp.SrcPort, ip.Id + 123, ttl, seq, ack, 258, data)
		seq += 2048
		sendPacket(handle, eth.DstMAC, eth.SrcMAC, ip.DstIP, ip.SrcIP, tcp.DstPort, tcp.SrcPort, ip.Id + 123, ttl, seq, ack, 258, nil)
		//go fmt.Printf("伪重置 %v:%v 的 tcp 连接。\r\n", ip.SrcIP, tcp.SrcPort)
	}
}

func sendPacket(handle *pcap.Handle, sMac, dMac net.HardwareAddr, sIp, dIp net.IP, sPort, dPort layers.TCPPort, IpId uint16, IpTtl uint8, TcpSeq, ack uint32, WindowsSize uint16, data []byte) error {
	eth := layers.Ethernet{
		SrcMAC:       sMac,
		DstMAC:       dMac,
		EthernetType: layers.EthernetTypeIPv4,
	}
	ip4 := layers.IPv4{
		SrcIP:    sIp,
		DstIP:    dIp,
		Id:       IpId,
		Flags:    layers.IPv4DontFragment,
		Version:  4,
		TTL:      IpTtl,
		Protocol: layers.IPProtocolTCP,
	}
	tcp := layers.TCP{
		SrcPort: sPort,
		DstPort: dPort,
		Seq:TcpSeq,
		ACK:true,
		Ack:ack,
		Window:WindowsSize,
		PSH:true, // 立刻处理
	}

	if len(data) == 0 {
		tcp.RST = true
	}

	tcp.SetNetworkLayerForChecksum(&ip4)

	buf := gopacket.NewSerializeBuffer()
	opts := gopacket.SerializeOptions{
		FixLengths:       true,
		ComputeChecksums: true,
	}

	payload := gopacket.Payload(data)

	if err := gopacket.SerializeLayers(buf, opts, &eth, &ip4, &tcp, payload); err != nil {
		return err
	}

	return handle.WritePacketData(buf.Bytes())
}

repository: jannson/ProxyClient

repo_name: jannson/ProxyClient

extension: go


text:
#
# base recipe: meta/recipes-devtools/pkgconfig/pkgconfig_0.28.bb
# base branch: daisy
#

SUMMARY = "manage compile and link flags for libraries"
DESCRIPTION = "pkg-config is a system for managing library compile and link flags that \
works with automake and autoconf."
HOMEPAGE = "http://pkg-config.freedesktop.org"

PR = "r1"

inherit debian-package

DPN = "pkg-config"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

DEPENDS = "glib-2.0"
DEPENDS_class-native = ""
DEPENDS_class-nativesdk = ""

DEBIAN_PATCH_TYPE = "nopatch"

SRC_URI += " \
	file://pkg-config-native.in \
	file://fix-glib-configure-libtool-usage.patch \
	file://obsolete_automake_macros.patch \
	file://0001-Strip-system-library-directories-reliably.patch \
"

inherit autotools

EXTRA_OECONF = "--without-internal-glib"
EXTRA_OECONF_class-native = "--with-internal-glib"
EXTRA_OECONF_class-nativesdk = "--with-internal-glib"

acpaths = "-I ."

# Set an empty dev package to ensure the base PN package gets
# the pkg.m4 macros, pkgconfig does not deliver any other -dev
# files.
FILES_${PN}-dev = ""
FILES_${PN} += "${datadir}/aclocal/pkg.m4"

# When using the RPM generated automatic package dependencies, some packages
# will end up requiring 'pkgconfig(pkg-config)'.  Allow this behavior by
# specifying an appropriate provide.
RPROVIDES_${PN} += "pkgconfig(pkg-config) (= ${PV})"

# Install a pkg-config-native wrapper that will use the native sysroot instead
# of the MACHINE sysroot, for using pkg-config when building native tools.
do_install_append_class-native () {
	sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
		-e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
		< ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
	install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
}

BBCLASSEXTEND = "native nativesdk"

#
# Debian Native Test
#
inherit debian-test

SRC_URI_DEBIAN_TEST = "\
        file://pkg-config-native-test/run_native_test_pkg-config \
        file://pkg-config-native-test/run_modversion_command \
        file://pkg-config-native-test/run_libs_command \
        file://pkg-config-native-test/run_cflags_command \
        file://pkg-config-native-test/foo.pc \
        file://pkg-config-native-test/bar.pc \
"

DEBIAN_NATIVE_TESTS = "run_native_test_pkg-config"
TEST_DIR = "${B}/native-test"

repository: nghiaht-tsdv/meta-debian

repo_name: nghiaht-tsdv/meta-debian

branch_name: refs/heads/jethro

gha_language: BitBake

extension: bb


text:
/**\file
 * \brief VT100 terminal frontend implementation
 *
 * This file contains code to drive a vt100-like terminal using the data in a
 * terminalxx::terminal instance.
 *
 * \copyright
 * This file is part of the terminalxx project, which is released as open source
 * under the terms of an MIT/X11-style licence, described in the COPYING file.
 *
 * \see Project Documentation: https://ef.gy/documentation/terminalxx
 * \see Project Source Code: https://github.com/ef-gy/terminalxx
 * \see Licence Terms: https://github.com/ef-gy/terminalxx/blob/master/COPYING
 */

#if !defined(TERMINALXX_VT100_H)
#define TERMINALXX_VT100_H

#include <terminalxx/terminal.h>
#include <sstream>
#include <functional>

namespace terminalxx {
/**\brief VT100 terminal frontend
 *
 * A frontend for the terminal::terminal template, this class
 * implements a very simple optimiser to output the screen buffer to a
 * VT100, or any of the many newer terminals that support the basic
 * escape codes the VT100 supported - which is pretty much all of them.
 *
 * \tparam T Data type for an individual cell's contents. The default
 *           is a "long", which should be enough to cover all possible
 *           unicode codepoints, ever. Hopefully, anyway.
 */
template <typename T = long> class vt100 : public terminal<T> {
public:
  /**\brief Base terminal type
   *
   * A convnenient typedef to the base type for this terminal.
   */
  typedef terminal<T> base;

  /**\brief Construct with streams
   *
   * Calls the parent constructor, which will set up the streams
   * connecting the terminal; this constructor will also set the
   * current foreground and background text colours to invalid
   * values, so they're reset the first time they're used.
   *
   * \param[out] pInput  Input stream for the terminal, e.g.
   *                     std::cin
   * \param[out] pOutput Output stream for the terminal, e.g.
   *                     std::cout
   * \param[in]  doSetup Whether to disable echo and canonical
   *                     mode on the terminal connected to stdin
   */
  vt100(std::istream &pInput = std::cin, std::ostream &pOutput = std::cout,
        const bool &doSetup = true)
      : base(pInput, pOutput, doSetup), currentForegroundColour(-1),
        currentBackgroundColour(-1), didSetup(doSetup) {}

  /*\brief Destructor
   *
   * Resets the terminal's colour and text attributes and starts
   * a new line, but only if the "doSetup" was true when the
   * constructor ran.
   */
  ~vt100(void) {
    if (didSetup) {
      std::cout << "\e[39;49;0m\n";
    }
  }

  using base::current;
  using base::target;
  using base::input;
  using base::output;
  using base::queue;
  using base::resize;
  using base::size;
  using base::read;
  using base::cursor;

  class command {
  public:
    command(const T &pCode,
            const std::vector<long> &pParameter = std::vector<long>())
        : code(pCode), parameter(pParameter) {}

    T code;
    std::vector<long> parameter;
  };

  std::vector<command> commandQueue;

  /**\brief Flush current buffer contents
   *
   * Updates the current state of the terminal by writing vt100
   * escape codes and updated character data to the terminal. The
   * function will only write up to targetOps many operations to
   * the terminal - this is to prevent slow terminals from
   * freezing an interactive programme, such as a game. To make
   * sure everything has been updated, call this method in a loop
   * until the return value is 0.
   *
   * The first argument, postProcess, should be a function that
   * returns the actual value to use for each cell. The arguments
   * to this function are the terminal, with associated metadata,
   * the line and the column in question. If you pass in 0 then
   * the function is not used, which is the same as using a
   * lambda like this one:
   *
   * \code{.cpp}
   * [] (const terminal<T> &t,
   *     const std::size_t &l,
   *     const std::size_t &c)
   * {
   *     return t.target[l][c];
   * }
   * \endcode
   *
   * The purpose of this parameter is, as the name suggests, to
   * allow for full-screen special effects, much like pixel
   * shaders do for 3D graphics. For example, the matrix demo
   * uses this to make sure all cells have the right colour, and
   * if you dig around in the code a bit there's a second
   * post-processing function that you can activate in the code
   * to make the matrix streams run along curvy lines.
   *
   * \param[in] postProcess Post-processing function.
   * \param[in] targetOps   Target number of operations; for
   *                        vt100 terminals, each operation tends
   *                        to be longer than one byte. The code
   *                        may also emit slightly more
   *                        operations than specified here.
   *
   * \returns The actual number of operations performed. If this
   *          is more than 0 you might want to call the function
   *          again to make sure everything is updated.
   */
  std::size_t
  flush(std::function<typename base::cell(const base &, const std::size_t &,
                                          const std::size_t &)> postProcess = 0,
        std::size_t targetOps = 1024) {
    std::size_t ops = 0;

    for (unsigned int l = 0; l < target.screen<T>::parent::size(); l++) {
      const std::size_t width = target[l].size();

      for (unsigned int c = 0; c < width; c++) {
        const cell<T> &ccell = current[l][c];
        const cell<T> tcell =
            postProcess ? postProcess(*this, l, c) : target[l][c];

        if (ccell != tcell) {
          if ((c == 0) && (cursor[1] == l)) {
            output << "\r";
            ops++;
            cursor[0] = 0;
          } else if ((c == 0) && (cursor[1] == (l - 1))) {
            output << "\n";
            ops++;
            cursor[0] = 0;
            cursor[1] = l;
          } else if ((cursor[0] != c) &&
                     ((cursor[1] != l) || (cursor[0] >= width))) {
            std::size_t vtl = l + 1;
            std::size_t vtc = c + 1;
            if (vtl == 1) {
              if (vtc == 1) {
                output << "\e[H";
                ops++;
              } else {
                output << "\e["
                       << ";" << vtc << "H";
                ops++;
              }
            } else if (vtc == 1) {
              output << "\e[" << vtl << "H";
              ops++;
            } else {
              output << "\e[" << vtl << ";" << vtc << "H";
              ops++;
            }
            cursor[0] = c;
            cursor[1] = l;
          } else if (cursor[1] != l) {
            signed long sp = (signed long)cursor[1] - (signed long)l;
            if (sp > 0) {
              if (sp == 1) {
                output << "\e[A";
              } else {
                output << "\e[" << sp << "A";
              }
              ops++;
            } else {
              if (sp == -1) {
                output << "\e[B";
              } else {
                output << "\e[" << -sp << "B";
              }
              ops++;
            }
            cursor[1] = l;
          } else if (cursor[0] != c) {
            signed long sp = (signed long)cursor[0] - (signed long)c;
            if (sp > 0) {
              if (sp == 1) {
                output << "\e[D";
              } else {
                output << "\e[" << sp << "D";
              }
              ops++;
            } else {
              if (sp == -1) {
                output << "\e[C";
              } else {
                output << "\e[" << -sp << "C";
              }
              ops++;
            }
            cursor[0] = c;
          }

          if (tcell.foregroundColour != currentForegroundColour) {
            if (tcell.foregroundColour < 8) {
              output << "\e[3" << tcell.foregroundColour << "m";
              ops++;
            } else {
              output << "\e[38;5;" << tcell.foregroundColour << "m";
              ops++;
            }
            currentForegroundColour = tcell.foregroundColour;
          }
          if (tcell.backgroundColour != currentBackgroundColour) {
            if (tcell.backgroundColour < 8) {
              output << "\e[4" << tcell.backgroundColour << "m";
              ops++;
            } else {
              output << "\e[48;5;" << tcell.backgroundColour << "m";
              ops++;
            }
            currentBackgroundColour = tcell.backgroundColour;
          }

          if ((tcell.content < 0x20) || (tcell.content == 0x7f)) {
            output << ".";
            ops++;
            /* don't print control characters */
          } else if (tcell.content < 0x80) {
            output << char(tcell.content);
            ops++;
          } else if (tcell.content < 0x800) {
            output << char(((tcell.content >> 6) & 0x1f) | 0xc0)
                   << char((tcell.content & 0x3f) | 0x80);
            ops++;
          } else if (tcell.content < 0x10000) {
            output << char(((tcell.content >> 12) & 0x0f) | 0xe0)
                   << char(((tcell.content >> 6) & 0x3f) | 0x80)
                   << char((tcell.content & 0x3f) | 0x80);
            ops++;
          } else if (tcell.content < 0x200000) {
            output << char(((tcell.content >> 18) & 0x07) | 0xf0)
                   << char(((tcell.content >> 12) & 0x3f) | 0x80)
                   << char(((tcell.content >> 6) & 0x3f) | 0x80)
                   << char((tcell.content & 0x3f) | 0x80);
            ops++;
          } else if (tcell.content < 0x4000000) {
            output << char(((tcell.content >> 24) & 0x03) | 0xf8)
                   << char(((tcell.content >> 18) & 0x3f) | 0x80)
                   << char(((tcell.content >> 12) & 0x3f) | 0x80)
                   << char(((tcell.content >> 6) & 0x3f) | 0x80)
                   << char((tcell.content & 0x3f) | 0x80);
            ops++;
          } else /* if (tcell.content < 0x80000000) */
          {
            output << char(((tcell.content >> 30) & 0x01) | 0xfc)
                   << char(((tcell.content >> 24) & 0x3f) | 0x80)
                   << char(((tcell.content >> 18) & 0x3f) | 0x80)
                   << char(((tcell.content >> 12) & 0x3f) | 0x80)
                   << char(((tcell.content >> 6) & 0x3f) | 0x80)
                   << char((tcell.content & 0x3f) | 0x80);
            ops++;
          }

          current[l][c] = tcell;
          cursor[0]++;
          if (ops >= targetOps) {
            output.flush();
            return ops;
          }
        }
      }
    }

    output.flush();
    return ops;
  }

  static std::vector<command>
  decode(std::vector<T> &queue,
         std::function<bool(const command &)> emitCommand = 0,
         std::function<bool(const T &)> emitLiteral = 0) {
    std::vector<command> r;

    enum parserState state = text;
    std::vector<T> result;

    std::optional<long> vtparam;
    std::vector<long> vtparams;

    for (T v : queue) {
      switch (state) {
      case text:
        switch (v) {
        case '\e':
          state = escape1;
          break;
        default:
          if (!emitLiteral || emitLiteral(v)) {
            result.push_back(v);
          }
        }
        break;
      case escape1:
        switch (v) {
        case '[':
          state = escape2;
          break;
        default:
          state = text;
          if (!emitLiteral || emitLiteral(T('\e'))) {
            result.push_back(T('\e'));
          }
          if (!emitLiteral || emitLiteral(v)) {
            result.push_back(v);
          }
        }
        break;
      case escape2:
        switch (v) {
        case '0':
        case '1':
        case '2':
        case '3':
        case '4':
        case '5':
        case '6':
        case '7':
        case '8':
        case '9':
          if (vtparam) {
            vtparam = *vtparam * 10 + (v - '0');
          } else {
            vtparam = v - '0';
          }
          break;
        case ';':
          if (vtparam) {
            vtparams.push_back(*vtparam);
            vtparam = std::optional<long>();
          }
          break;
        default:
          if (vtparam) {
            vtparams.push_back(*vtparam);
            vtparam = std::optional<long>();
          }
          command c(v, vtparams);
          if (!emitCommand || emitCommand(c)) {
            r.push_back(c);
          }
          state = text;
          vtparams.clear();
          break;
        }
        break;
      }
    }

    /* incomplete commands: don't emit but feed back into the
       buffer */
    if (state == escape1) {
      result.push_back(T('\e'));
    } else if (state == escape2) {
      result.push_back(T('\e'));
      result.push_back('[');

      bool first = true;
      if (vtparam) {
        vtparams.push_back(*vtparam);
        vtparam = std::optional<long>();
      }
      for (auto p : vtparams) {
        if (first) {
          first = false;
        } else {
          result.push_back(';');
        }

        std::vector<T> pv;

        while (p > 0) {
          pv.push_back('0' + p % 10);
          p /= 10;
        }

        result.insert(result.end(), pv.rbegin(), pv.rend());
      }
    }

    queue = result;

    return r;
  }

  bool read(std::function<bool(const command &)> emitCommand = 0,
            std::function<bool(const T &)> emitLiteral = 0) {
    do {
      base::read();
    } while (input.rdbuf()->in_avail() > 0);

    auto q = decode(queue,
                    [emitCommand, this](const command &c) -> bool {
                      bool keep = true;
                      if (c.code == 'R') {
                        switch (c.parameter.size()) {
                        case 0:
                          cursor[1] = 0;
                          cursor[0] = 0;
                          break;
                        case 1:
                          cursor[1] = c.parameter[0] - 1;
                          cursor[0] = 0;
                          break;
                        default:
                          cursor[1] = c.parameter[0] - 1;
                          cursor[0] = c.parameter[1] - 1;
                          break;
                        }
                        keep = false;
                      }
                      return (bool)emitCommand ? emitCommand(c) : keep;
                    },
                    [emitLiteral](const T &l) -> bool {
                      return (bool)emitLiteral ? emitLiteral(l) : true;
                    });

    commandQueue.insert(commandQueue.end(), q.begin(), q.end());

    return true;
  }

  /**\brief Query current cursor position from terminal
   *
   * This function will ask the terminal where the cursor
   * currently resides, then try to read() from the input stream
   * at least once iff doRead was not set to false.. This may or
   * may not update the input position depending on whether the
   * terminal replies immediately.
   *
   * \param[in] doRead Whether to try reading from the terminal
   *                   at least once.
   *
   * \returns 'true' if the query was sent was updated, 'false'
   *          otherwise. The code will always emit the query, so
   *          'false' should not come up.
   */
  bool updatePosition(bool doRead = true) {
    output << "\e[6n";

    if (doRead) {
      read();
    }

    return true;
  }

private:
  /**\brief Has the constructor set up the terminal?
   *
   * Set to 'true' if the constructor has modified terminal
   * settings which it should reverse in the destructor.
   */
  const bool didSetup;

  /**\brief Terminal's current foreground colour
   *
   * Set as part of running flush; VT100s have 'current' colours
   * and other text attributes, which are used when printing a
   * character at the current position. The flush() function
   * needs to know what this colour is so it can issue commands
   * to change that colour, if necessary.
   */
  std::size_t currentForegroundColour;

  /**\brief Terminal's current background colour
   *
   * Set as part of running flush; VT100s have 'current' colours
   * and other text attributes, which are used when printing a
   * character at the current position. The flush() function
   * needs to know what this colour is so it can issue commands
   * to change that colour, if necessary.
   */
  std::size_t currentBackgroundColour;

  enum parserState { text, escape1, escape2 };
};
}

#endif

repository: ef-gy/terminalxx

repo_name: ef-gy/terminalxx

extension: h


text:
SUMMARY = "Phosphor GPIO monitor application"
DESCRIPTION = "Application to monitor gpio assertions"
HOMEPAGE = "http://github.com/openbmc/phosphor-gpio-monitor"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
DEPENDS += "sdbusplus"
DEPENDS += "phosphor-dbus-interfaces"
DEPENDS += "libevdev"
DEPENDS += "phosphor-logging"
DEPENDS += "systemd"
DEPENDS += "boost"
DEPENDS += "libgpiod"
DEPENDS += "cli11"
DEPENDS += "nlohmann-json"
SRCREV = "d1a35410e9ae0e17d00c16b07410f76565dd1dcc"
PV = "1.0+git${SRCPV}"
PR = "r1"

SRC_URI = "git://github.com/openbmc/phosphor-gpio-monitor;branch=master;protocol=https"

SYSTEMD_PACKAGES = "${GPIO_PACKAGES}"
SYSTEMD_SERVICE:${PN}-monitor += "phosphor-multi-gpio-monitor.service"
SYSTEMD_SERVICE:${PN}-monitor += "phosphor-gpio-monitor@.service"
SYSTEMD_SERVICE:${PN}-presence += "phosphor-gpio-presence@.service"
S = "${WORKDIR}/git"

inherit meson pkgconfig
inherit obmc-phosphor-dbus-service

EXTRA_OEMESON:append = " -Dtests=disabled"

FILES:${PN}-monitor += "${bindir}/phosphor-gpio-monitor"
FILES:${PN}-monitor += "${bindir}/phosphor-multi-gpio-monitor"
FILES:${PN}-monitor += "${bindir}/phosphor-gpio-util"
FILES:${PN}-monitor += "${nonarch_base_libdir}/udev/rules.d/99-gpio-keys.rules"
FILES:${PN}-presence += "${bindir}/phosphor-gpio-presence"

ALLOW_EMPTY:${PN} = "1"

GPIO_PACKAGES = " \
        ${PN}-monitor \
        ${PN}-presence \
"
PACKAGE_BEFORE_PN += "${GPIO_PACKAGES}"

repository: openbmc/openbmc

repo_name: openbmc/openbmc

gha_license_id: NOASSERTION

gha_language: Python


text:
@incollection{menichinelli_research_2021,
	address = {Melbourne (Victoria), Australia},
	edition = {1st},
	title = {A research template for understanding {Research} {Translation} cases},
	isbn = {978-1-922016-75-1},
	url = {https://doi.org/10.5281/zenodo.5536932},
	abstract = {The importance of innovation through university-industry cooperation has rarely been more acute than it is today. Over the last 18 months of COVID-19 pandemic, we have experienced unprecedented circumstances in our lifetime that have demonstrated the critical role of knowledge creation and transmission across industries and disciplines. Identifying, developing and scaling-up breakthrough technologies, and converting them into incremental, radical or disruptive innovations that are widely accepted by, and available to beneficiaries, users, customers and communities is of paramount importance. However, turning research outputs into novelties for the benefits of wider society seldom occurs spontaneously. Numerous mechanisms – such as stakeholder engagement and co-creation processes – can assist in creating framework conditions to foster the development and adoption of novelties that address current and future societal needs. The European funded OpenInnoTrain project precisely aims to explore those mechanisms, across four specific contemporary settings, so to as equip researchers and practitioners with actionable knowledge to support their research and innovation journeys. As we cross the 2-year mark of the project, the intent of this book is to provide glimpses on OpenInnoTrain's current reflections and achievements with a variety of illustrations featuring activities across the consortium and beyond.},
	language = {English},
	booktitle = {From {Research} to {Innovation}: {Exploring} the {Translation} {Journey} with {OpenInnoTrain}},
	publisher = {RMIT University Press},
	author = {Menichinelli, Massimo and Casprini, Elena},
	editor = {Mention, Anne-Laure and Menichinelli, Massimo},
	year = {2021},
	doi = {10.5281/zenodo.5536932},
	pages = {121--139},
}

extension: bib


text:
DESCRIPTION = "matchbox-panel-2 is a lightweight dock (system tray) application based on Gtk+"
LICENSE = "GPLv2"
SECTION = "x11/panels"
DEPENDS = "gtk+ startup-notification dbus dbus-glib matchbox-panel-2-icon-themes"
DEPENDS += " ${@base_contains("MACHINE_FEATURES", "acpi", "libacpi", "",d)}"
DEPENDS += " ${@base_contains("MACHINE_FEATURES", "apm", "apmd", "",d)}"
RDEPENDS_${PN} = "matchbox-panel-2-icon-theme"
PACKAGE_ARCH = "${MACHINE_ARCH}"
SRCREV = "2098"
PV = "2.0+svnr${SRCPV}"
PR = "r2"

inherit autotools pkgconfig

SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=${PN};proto=http \
	   file://scaling-image-double-free.patch;striplevel=0 \
	   file://startup-invalid-access.patch;striplevel=0 \
	   file://startup-shown-uninitialized.patch;striplevel=0 \
	   file://themeable-icons.patch;striplevel=0 \
	   file://rename.sync.to.sync_applet.patch \
"
S = "${WORKDIR}/${PN}"

TARGET_CFLAGS += "-Wno-error"

EXTRA_OECONF = "--disable-static --program-transform-name='s/$/-2/'"
EXTRA_OECONF += " ${@base_contains("MACHINE_FEATURES", "acpi", "--with-battery=acpi", "",d)}"
EXTRA_OECONF += " ${@base_contains("MACHINE_FEATURES", "apm", "--with-battery=apm", "",d)}"

do_install_append() {
	rm ${D}${libdir}/matchbox-panel/lib*.*a
}

FILES_${PN} += "${libdir}/matchbox-panel/*.so"
FILES_${PN}-dbg += "${libdir}/matchbox-panel/.debug"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD


text:
// actions types
const POKEBALL_GO = "POKEBALL_GO" as "POKEBALL_GO";
const SAVE_POKEMON = "SAVE_POKEMON" as "SAVE_POKEMON";
// on ne jete pas les pokemons
const FREE_POKEMON = "FREE_POKEMON" as "FREE_POKEMON";

// state type
type BackpackState = {
  pokeballs: number;
  pokemons: any[];
};

// action creators
export const actionCreators = {
  pokeballGo: () => ({ type: POKEBALL_GO }),
  freePokemon: (id: number) => ({ type: FREE_POKEMON, id })
};

// reducer
export const reducer = function(
  state: BackpackState = {
    pokeballs: 200,
    pokemons: []
  },
  action:
    | { type: "POKEBALL_GO" }
    | { type: "SAVE_POKEMON"; data: any }
    | { type: "FREE_POKEMON"; id: number }
) {
  switch (action.type) {
    case POKEBALL_GO:
      return state.pokeballs > 0
        ? { ...state, pokeballs: state.pokeballs - 1 }
        : state;
    case SAVE_POKEMON:
      return { ...state, pokemons: [...state.pokemons, action.data] };
    case FREE_POKEMON:
      return {
        ...state,
        pokemons: state.pokemons.filter(pokemon => pokemon.id !== action.id)
      };
    default:
      return state;
  }
};

repository: didierdemoniere/pokeboule

repo_name: didierdemoniere/pokeboule

gha_license_id: MIT

gha_language: TypeScript


text:
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

// Package ocmetrics is the logic for receiving OpenCensus metrics proto from
// already instrumented applications and then passing them onto a metricsink instance.
package ocmetrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver/internal/ocmetrics"

branch_name: refs/heads/main

gha_language: Go


text:
DESCRIPTION = "Tools for managing memory technology devices."
SECTION = "base"
DEPENDS = "zlib lzo"
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
LICENSE = "GPLv2"
PR = "r3"

SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.bz2 \
           file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \
	   file://fix-ignoreerrors-git.patch;patch=1 \
	   file://lzo_1x.patch;patch=1"

S = "${WORKDIR}/mtd-utils-${PV}/"

EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR'"

do_stage () {
	install -d ${STAGING_INCDIR}/mtd
	for f in ${S}/include/mtd/*.h; do
		install -m 0644 $f ${STAGING_INCDIR}/mtd/
	done
	for binary in ${mtd_utils}; do
		install -m 0755 $binary ${STAGING_BINDIR}
	done
}

mtd_utils = "ftl_format flash_erase flash_eraseall nanddump doc_loadbios \
             mkfs.jffs ftl_check mkfs.jffs2 flash_lock flash_unlock flash_info mtd_debug \
             flashcp nandwrite jffs2dump sumtool"

do_install () {
	install -d ${D}${bindir}
	install -d ${D}${includedir}/mtd
	for binary in ${mtd_utils}; do
		install -m 0755 $binary ${D}${bindir}
	done
	for f in ${S}/include/mtd/*.h; do
		install -m 0644 $f ${D}${includedir}/mtd
	done
}

PACKAGES =+ "mkfs-jffs mkfs-jffs2"
FILES_mkfs-jffs = "${bindir}/mkfs.jffs"
FILES_mkfs-jffs2 = "${bindir}/mkfs.jffs2"