text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="7.1.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" altunitdist="inch" altunit="inch"/>
<layers>
<layer number="1" name="Top" color="4" fill="1" visible="yes" active="no"/>
<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="no"/>
<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="no"/>
<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="no"/>
<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="no"/>
<layer number="20" name="Dimension" color="15" fill="1" visible="yes" active="no"/>
<layer number="21" name="tPlace" color="7" fill="1" visible="yes" active="no"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="yes" active="no"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="no"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="yes" active="no"/>
<layer number="25" name="tNames" color="7" fill="1" visible="yes" active="no"/>
<layer number="26" name="bNames" color="7" fill="1" visible="yes" active="no"/>
<layer number="27" name="tValues" color="7" fill="1" visible="yes" active="no"/>
<layer number="28" name="bValues" color="7" fill="1" visible="yes" active="no"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" active="no"/>
<layer number="30" name="bStop" color="7" fill="6" visible="no" active="no"/>
<layer number="31" name="tCream" color="7" fill="4" visible="no" active="no"/>
<layer number="32" name="bCream" color="7" fill="5" visible="no" active="no"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="no"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="no"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="no"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="no"/>
<layer number="37" name="tTest" color="7" fill="1" visible="yes" active="no"/>
<layer number="38" name="bTest" color="7" fill="1" visible="yes" active="no"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="no" active="no"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="no" active="no"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="no" active="no"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="no" active="no"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="no" active="no"/>
<layer number="44" name="Drills" color="7" fill="1" visible="no" active="no"/>
<layer number="45" name="Holes" color="7" fill="1" visible="no" active="no"/>
<layer number="46" name="Milling" color="3" fill="1" visible="yes" active="no"/>
<layer number="47" name="Measures" color="7" fill="1" visible="yes" active="no"/>
<layer number="48" name="Document" color="7" fill="1" visible="yes" active="no"/>
<layer number="49" name="Reference" color="7" fill="1" visible="yes" active="no"/>
<layer number="50" name="dxf" color="7" fill="1" visible="yes" active="no"/>
<layer number="51" name="tDocu" color="7" fill="1" visible="yes" active="no"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="yes" active="no"/>
<layer number="53" name="tGND_GNDA" color="7" fill="9" visible="yes" active="no"/>
<layer number="54" name="bGND_GNDA" color="1" fill="9" visible="yes" active="no"/>
<layer number="56" name="wert" color="7" fill="1" visible="yes" active="no"/>
<layer number="57" name="tCAD" color="7" fill="1" visible="yes" active="no"/>
<layer number="59" name="tCarbon" color="7" fill="1" visible="yes" active="no"/>
<layer number="60" name="bCarbon" color="7" fill="1" visible="yes" active="no"/>
<layer number="90" name="Modules" color="5" fill="1" visible="yes" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
<layer number="99" name="SpiceOrder" color="7" fill="1" visible="no" active="no"/>
<layer number="100" name="Muster" color="7" fill="1" visible="no" active="no"/>
<layer number="101" name="Patch_Top" color="12" fill="4" visible="no" active="yes"/>
<layer number="102" name="Mittellin" color="7" fill="1" visible="yes" active="yes"/>
<layer number="103" name="Stiffner" color="7" fill="1" visible="yes" active="yes"/>
<layer number="104" name="Name" color="7" fill="1" visible="yes" active="yes"/>
<layer number="105" name="Beschreib" color="7" fill="1" visible="yes" active="yes"/>
<layer number="106" name="BGA-Top" color="7" fill="1" visible="yes" active="yes"/>
<layer number="107" name="BD-Top" color="7" fill="1" visible="yes" active="yes"/>
<layer number="108" name="tBridges" color="7" fill="1" visible="yes" active="yes"/>
<layer number="109" name="tBPL" color="7" fill="1" visible="yes" active="yes"/>
<layer number="110" name="bBPL" color="7" fill="1" visible="yes" active="yes"/>
<layer number="111" name="MPL" color="7" fill="1" visible="yes" active="yes"/>
<layer number="112" name="tSilk" color="7" fill="1" visible="yes" active="yes"/>
<layer number="113" name="IDFDebug" color="4" fill="1" visible="no" active="yes"/>
<layer number="114" name="Badge_Outline" color="7" fill="1" visible="yes" active="yes"/>
<layer number="115" name="ReferenceISLANDS" color="7" fill="1" visible="yes" active="yes"/>
<layer number="116" name="Patch_BOT" color="9" fill="4" visible="no" active="yes"/>
<layer number="118" name="Rect_Pads" color="7" fill="1" visible="yes" active="yes"/>
<layer number="121" name="sName" color="7" fill="1" visible="yes" active="yes"/>
<layer number="122" name="_bPlace" color="7" fill="1" visible="yes" active="yes"/>
<layer number="123" name="tTestmark" color="7" fill="1" visible="no" active="yes"/>
<layer number="124" name="bTestmark" color="7" fill="1" visible="no" active="yes"/>
<layer number="125" name="_tNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="126" name="_bNames" color="7" fill="1" visible="yes" active="yes"/>
<layer number="127" name="_tValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="128" name="_bValues" color="7" fill="1" visible="yes" active="yes"/>
<layer number="129" name="Mask" color="7" fill="1" visible="no" active="yes"/>
<layer number="131" name="tAdjust" color="7" fill="1" visible="no" active="yes"/>
<layer number="132" name="bAdjust" color="7" fill="1" visible="no" active="yes"/>
<layer number="144" name="Drill_legend" color="7" fill="1" visible="yes" active="yes"/>
<layer number="150" name="Notes" color="7" fill="1" visible="no" active="yes"/>
<layer number="151" name="HeatSink" color="7" fill="1" visible="yes" active="yes"/>
<layer number="152" name="_bDocu" color="7" fill="1" visible="yes" active="yes"/>
<layer number="153" name="FabDoc1" color="7" fill="1" visible="no" active="yes"/>
<layer number="154" name="FabDoc2" color="7" fill="1" visible="no" active="yes"/>
<layer number="155" name="FabDoc3" color="7" fill="1" visible="no" active="yes"/>
<layer number="199" name="Contour" color="7" fill="1" visible="no" active="yes"/>
<layer number="200" name="200bmp" color="1" fill="10" visible="no" active="no"/>
<layer number="201" name="201bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="202" name="202bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="203" name="203bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="204" name="204bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="205" name="205bmp" color="7" fill="1" visible="yes" active="yes"/>
<layer number="206" name="206bmp" color="7" fill="10" visible="no" active="yes"/>
<layer number="207" name="207bmp" color="8" fill="10" visible="no" active="yes"/>
<layer number="208" name="208bmp" color="9" fill="10" visible="no" active="yes"/>
<layer number="209" name="209bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="210" name="210bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="211" name="211bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="212" name="212bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="213" name="213bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="214" name="214bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="215" name="215bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="216" name="216bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="217" name="217bmp" color="18" fill="1" visible="no" active="no"/>
<layer number="218" name="218bmp" color="19" fill="1" visible="no" active="no"/>
<layer number="219" name="219bmp" color="20" fill="1" visible="no" active="no"/>
<layer number="220" name="220bmp" color="21" fill="1" visible="no" active="no"/>
<layer number="221" name="221bmp" color="22" fill="1" visible="no" active="no"/>
<layer number="222" name="222bmp" color="23" fill="1" visible="no" active="no"/>
<layer number="223" name="223bmp" color="24" fill="1" visible="no" active="no"/>
<layer number="224" name="224bmp" color="25" fill="1" visible="no" active="no"/>
<layer number="225" name="225bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="226" name="226bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="227" name="227bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="228" name="228bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="229" name="229bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="230" name="230bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="231" name="Eagle3D_PG1" color="14" fill="1" visible="no" active="yes"/>
<layer number="232" name="Eagle3D_PG2" color="14" fill="2" visible="no" active="yes"/>
<layer number="233" name="Eagle3D_PG3" color="14" fill="4" visible="no" active="yes"/>
<layer number="248" name="Housing" color="7" fill="1" visible="yes" active="yes"/>
<layer number="249" name="Edge" color="7" fill="1" visible="yes" active="yes"/>
<layer number="250" name="Descript" color="3" fill="1" visible="no" active="yes"/>
<layer number="251" name="SMDround" color="12" fill="11" visible="no" active="no"/>
<layer number="254" name="cooling" color="7" fill="1" visible="yes" active="yes"/>
<layer number="255" name="routoute" color="7" fill="1" visible="no" active="yes"/>
</layers>
<schematic xreflabel="%F%N/%S.%C%R" xrefpart="/%S.%C%R">
<libraries>
<library name="bt_arm">
<description>ARM devices</description>
<packages>
<package name="TSSOP20">
<description>TSSOP20 0.65mm pitch</description>
<wire x1="-3.1646" y1="-2.2828" x2="3.1646" y2="-2.2828" width="0.2032" layer="51"/>
<wire x1="3.1646" y1="2.2828" x2="3.1646" y2="-2.2828" width="0.2032" layer="21"/>
<wire x1="3.1646" y1="2.2828" x2="-3.1646" y2="2.2828" width="0.2032" layer="51"/>
<wire x1="-3.1646" y1="-2.2828" x2="-3.1646" y2="2.2828" width="0.2032" layer="21"/>
<circle x="-2.2756" y="-1.2192" radius="0.4572" width="0.2032" layer="21"/>
<smd name="1" x="-2.925" y="-2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="2" x="-2.275" y="-2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="3" x="-1.625" y="-2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="4" x="-0.975" y="-2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="5" x="-0.325" y="-2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="6" x="0.325" y="-2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="7" x="0.975" y="-2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="8" x="1.625" y="-2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="13" x="1.625" y="2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="14" x="0.975" y="2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="15" x="0.325" y="2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="16" x="-0.325" y="2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="17" x="-0.975" y="2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="18" x="-1.625" y="2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="19" x="-2.275" y="2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="20" x="-2.925" y="2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="9" x="2.275" y="-2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="10" x="2.925" y="-2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="12" x="2.275" y="2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<smd name="11" x="2.925" y="2.9178" dx="0.3048" dy="0.9906" layer="1"/>
<text x="-3.5456" y="-2.0828" size="0.8128" layer="25" font="vector" ratio="10" rot="R90">>NAME</text>
<rectangle x1="-3.0266" y1="-3.121" x2="-2.8234" y2="-2.2828" layer="51"/>
<rectangle x1="-2.3766" y1="-3.121" x2="-2.1734" y2="-2.2828" layer="51"/>
<rectangle x1="-1.7266" y1="-3.121" x2="-1.5234" y2="-2.2828" layer="51"/>
<rectangle x1="-1.0766" y1="-3.121" x2="-0.8734" y2="-2.2828" layer="51"/>
<rectangle x1="-0.4266" y1="-3.121" x2="-0.2234" y2="-2.2828" layer="51"/>
<rectangle x1="0.2234" y1="-3.121" x2="0.4266" y2="-2.2828" layer="51"/>
<rectangle x1="0.8734" y1="-3.121" x2="1.0766" y2="-2.2828" layer="51"/>
<rectangle x1="1.5234" y1="-3.121" x2="1.7266" y2="-2.2828" layer="51"/>
<rectangle x1="1.5234" y1="2.2828" x2="1.7266" y2="3.121" layer="51"/>
<rectangle x1="0.8734" y1="2.2828" x2="1.0766" y2="3.121" layer="51"/>
<rectangle x1="0.2234" y1="2.2828" x2="0.4266" y2="3.121" layer="51"/>
<rectangle x1="-0.4266" y1="2.2828" x2="-0.2234" y2="3.121" layer="51"/>
<rectangle x1="-1.0766" y1="2.2828" x2="-0.8734" y2="3.121" layer="51"/>
<rectangle x1="-1.7266" y1="2.2828" x2="-1.5234" y2="3.121" layer="51"/>
<rectangle x1="-2.3766" y1="2.2828" x2="-2.1734" y2="3.121" layer="51"/>
<rectangle x1="-3.0266" y1="2.2828" x2="-2.8234" y2="3.121" layer="51"/>
<rectangle x1="2.1734" y1="-3.121" x2="2.3766" y2="-2.2828" layer="51"/>
<rectangle x1="2.8234" y1="-3.121" x2="3.0266" y2="-2.2828" layer="51"/>
<rectangle x1="2.1734" y1="2.2828" x2="2.3766" y2="3.121" layer="51"/>
<rectangle x1="2.8234" y1="2.2828" x2="3.0266" y2="3.121" layer="51"/>
<text x="3.556" y="0" size="0.8128" layer="27" font="vector" ratio="10" rot="R90" align="top-center">>VALUE</text>
</package>
</packages>
<symbols>
<symbol name="MKE04Z8VTG4">
<description>Kinetis MKE04Z8VTG4 ARM Cortex M0+</description>
<pin name="VDD" x="-22.86" y="12.7" length="middle"/>
<pin name="VSS" x="-22.86" y="-10.16" length="middle"/>
<pin name="PTA0" x="22.86" y="12.7" length="middle" rot="R180"/>
<pin name="PTA1" x="22.86" y="10.16" length="middle" rot="R180"/>
<pin name="PTA2" x="22.86" y="7.62" length="middle" rot="R180"/>
<pin name="PTA3" x="22.86" y="5.08" length="middle" rot="R180"/>
<pin name="PTA4" x="22.86" y="2.54" length="middle" rot="R180"/>
<pin name="!RESET/PTA5" x="22.86" y="0" length="middle" rot="R180"/>
<pin name="PTC0" x="22.86" y="-2.54" length="middle" rot="R180"/>
<pin name="PTC1" x="22.86" y="-5.08" length="middle" rot="R180"/>
<pin name="PTC3" x="22.86" y="-10.16" length="middle" rot="R180"/>
<pin name="PTC2" x="22.86" y="-7.62" length="middle" rot="R180"/>
<pin name="PTB0" x="-22.86" y="10.16" length="middle"/>
<pin name="PTB1" x="-22.86" y="7.62" length="middle"/>
<pin name="PTB2" x="-22.86" y="5.08" length="middle"/>
<pin name="PTB3" x="-22.86" y="2.54" length="middle"/>
<pin name="PTB4" x="-22.86" y="0" length="middle"/>
<pin name="PTB5" x="-22.86" y="-2.54" length="middle"/>
<pin name="PTB6/XTAL" x="-22.86" y="-5.08" length="middle"/>
<pin name="PTB7/EXTAL" x="-22.86" y="-7.62" length="middle"/>
<wire x1="-17.78" y1="15.24" x2="-17.78" y2="-12.7" width="0.254" layer="94"/>
<wire x1="-17.78" y1="-12.7" x2="17.78" y2="-12.7" width="0.254" layer="94"/>
<wire x1="17.78" y1="-12.7" x2="17.78" y2="15.24" width="0.254" layer="94"/>
<wire x1="17.78" y1="15.24" x2="-17.78" y2="15.24" width="0.254" layer="94"/>
<text x="-17.78" y="15.748" size="1.778" layer="95">>NAME</text>
<text x="-17.78" y="-15.24" size="1.778" layer="96">>VALUE</text>
</symbol>
</symbols>
<devicesets>
<deviceset name="MKE04Z8VTG4" prefix="U">
<description>Kinetis KE04 ARM Cortex M0+

Datasheet.pdf

The MKE04Z8VTG4 is a 32-bit ARM Cortex M0+ that runs up to 48MHz on 2.7-5.5V with 8KB Flash, 1KB RAM, 4-24MHz crystal/ceramic resonator, 32.768kHz crystal resonator, and other clock options. Other features include:

Power management module (PMC) with three power modes: Run, Wait, Stop

Low-voltage detection (LVD) with reset or interrupt, selectable trip points

Watchdog with independent clock source (WDOG)

Programmable cyclic redundancy check module (CRC)

Serial wire debug interface (SWD)

Aliased SRAM bitband region (BIT-BAND)

Bit manipulation engine (BME)

80-bit unique identification (ID) number per chip

Up to 22 general-purpose input/output (GPIO)

Two 8-bit keyboard interrupt modules (KBI)

External interrupt (IRQ)

One 12-channel 12-bit SAR ADC, operation in Stop mode, optional hardware trigger (ADC)

Two analog comparators containing a 6-bit DAC and programmable reference input (ACMP)

One 6-channel FlexTimer/PWM (FTM)

One 2-channel FlexTimer/PWM (FTM)

One 2-channel periodic interrupt timer (PIT)

One pulse width timer (PWT)

One real-time clock (RTC)

One SPI module (SPI)

One UART module (UART)

One I2C module (I2C)

</description>
<gates>
<gate name="U1" symbol="MKE04Z8VTG4" x="0" y="0"/>
</gates>
<devices>
<device name="" package="TSSOP20">
<connects>
<connect gate="U1" pin="!RESET/PTA5" pad="1"/>
<connect gate="U1" pin="PTA0" pad="20"/>
<connect gate="U1" pin="PTA1" pad="19"/>
<connect gate="U1" pin="PTA2" pad="18"/>
<connect gate="U1" pin="PTA3" pad="17"/>
<connect gate="U1" pin="PTA4" pad="2"/>
<connect gate="U1" pin="PTB0" pad="16"/>
<connect gate="U1" pin="PTB1" pad="15"/>
<connect gate="U1" pin="PTB2" pad="14"/>
<connect gate="U1" pin="PTB3" pad="13"/>
<connect gate="U1" pin="PTB4" pad="8"/>
<connect gate="U1" pin="PTB5" pad="7"/>
<connect gate="U1" pin="PTB6/XTAL" pad="6"/>
<connect gate="U1" pin="PTB7/EXTAL" pad="5"/>
<connect gate="U1" pin="PTC0" pad="12"/>
<connect gate="U1" pin="PTC1" pad="11"/>
<connect gate="U1" pin="PTC2" pad="10"/>
<connect gate="U1" pin="PTC3" pad="9"/>
<connect gate="U1" pin="VDD" pad="3"/>
<connect gate="U1" pin="VSS" pad="4"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
<library name="bt">
<description>Miscellaneous parts

Created by Michael Shimniok www.bot-thoughts.com</description>
<packages>
</packages>
<symbols>
<symbol name="VDD">
<wire x1="-1.27" y1="2.54" x2="0" y2="5.08" width="0.254" layer="94"/>
<wire x1="0" y1="5.08" x2="1.27" y2="2.54" width="0.254" layer="94"/>
<wire x1="1.27" y1="2.54" x2="-1.27" y2="2.54" width="0.254" layer="94"/>
<text x="0" y="8.89" size="1.778" layer="95" align="bottom-center">VDD</text>
<text x="0" y="6.35" size="1.778" layer="96" align="bottom-center">>VALUE</text>
<pin name="VDD" x="0" y="0" visible="off" length="short" direction="sup" rot="R90"/>
</symbol>
<symbol name="GND">
<wire x1="-1.905" y1="0" x2="1.905" y2="0" width="0.254" layer="94"/>
<text x="-2.54" y="-2.54" size="1.778" layer="96">>VALUE</text>
<pin name="GND" x="0" y="2.54" visible="off" length="short" direction="sup" rot="R270"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="VDD">
<description>Voltage supply</description>
<gates>
<gate name="G$1" symbol="VDD" x="0" y="2.54"/>
</gates>
<devices>
<device name="">
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
<deviceset name="GND" prefix="GND">
<description>SUPPLY SYMBOL</description>
<gates>
<gate name="1" symbol="GND" x="0" y="0"/>
</gates>
<devices>
<device name="">
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
<library name="bt_electromech">
<description>Electromechanical devices

Created by Michael Shimniok www.bot-thoughts.com</description>
<packages>
<package name="1X01-S">
<description>PIN HEADER - 2.54</description>
<wire x1="-0.635" y1="1.27" x2="0.635" y2="1.27" width="0.1524" layer="21"/>
<wire x1="0.635" y1="1.27" x2="1.27" y2="0.635" width="0.1524" layer="21"/>
<wire x1="1.27" y1="0.635" x2="1.27" y2="-0.635" width="0.1524" layer="21"/>
<wire x1="1.27" y1="-0.635" x2="0.635" y2="-1.27" width="0.1524" layer="21"/>
<wire x1="-1.27" y1="0.635" x2="-1.27" y2="-0.635" width="0.1524" layer="21"/>
<wire x1="-0.635" y1="1.27" x2="-1.27" y2="0.635" width="0.1524" layer="21"/>
<wire x1="-1.27" y1="-0.635" x2="-0.635" y2="-1.27" width="0.1524" layer="21"/>
<wire x1="0.635" y1="-1.27" x2="-0.635" y2="-1.27" width="0.1524" layer="21"/>
<pad name="1" x="0" y="0" drill="1.016" shape="octagon"/>
<text x="1.524" y="0" size="1.016" layer="27" font="vector" ratio="10" align="center-left">>VALUE</text>
<rectangle x1="-0.254" y1="-0.254" x2="0.254" y2="0.254" layer="51"/>
</package>
<package name="1X01">
<description>PIN HEADER - 2.54</description>
<wire x1="-0.635" y1="1.27" x2="0.635" y2="1.27" width="0.1524" layer="21"/>
<wire x1="0.635" y1="1.27" x2="1.27" y2="0.635" width="0.1524" layer="21"/>
<wire x1="1.27" y1="0.635" x2="1.27" y2="-0.635" width="0.1524" layer="21"/>
<wire x1="1.27" y1="-0.635" x2="0.635" y2="-1.27" width="0.1524" layer="21"/>
<wire x1="-1.27" y1="0.635" x2="-1.27" y2="-0.635" width="0.1524" layer="21"/>
<wire x1="-0.635" y1="1.27" x2="-1.27" y2="0.635" width="0.1524" layer="21"/>
<wire x1="-1.27" y1="-0.635" x2="-0.635" y2="-1.27" width="0.1524" layer="21"/>
<wire x1="0.635" y1="-1.27" x2="-0.635" y2="-1.27" width="0.1524" layer="21"/>
<pad name="1" x="0" y="0" drill="1.016" shape="octagon"/>
<rectangle x1="-0.254" y1="-0.254" x2="0.254" y2="0.254" layer="51"/>
<text x="1.524" y="0" size="1.016" layer="27" font="vector" ratio="10" align="center-left">>VALUE</text>
</package>
<package name="1X01M">
<description>PIN HEADER - 2</description>
<wire x1="0.4" y1="1" x2="1" y2="0.4" width="0.2032" layer="21"/>
<wire x1="1" y1="0.4" x2="1" y2="-0.4" width="0.2032" layer="21"/>
<wire x1="1" y1="-0.4" x2="0.4" y2="-1" width="0.2032" layer="21"/>
<wire x1="0.4" y1="-1" x2="-0.4" y2="-1" width="0.2032" layer="21"/>
<wire x1="-0.4" y1="-1" x2="-1" y2="-0.4" width="0.2032" layer="21"/>
<wire x1="-1" y1="-0.4" x2="-1" y2="0.4" width="0.2032" layer="21"/>
<wire x1="-1" y1="0.4" x2="-0.4" y2="1" width="0.2032" layer="21"/>
<wire x1="-0.4" y1="1" x2="0.4" y2="1" width="0.2032" layer="21"/>
<pad name="1" x="0" y="0" drill="0.9144" shape="octagon"/>
<rectangle x1="-0.25" y1="-0.25" x2="0.25" y2="0.25" layer="51"/>
<text x="1.524" y="0" size="1.016" layer="27" font="vector" ratio="10" align="center-left">>VALUE</text>
</package>
<package name="1X01/90">
<description>PIN HEADER - 2.54 90°</description>
<wire x1="-2.54" y1="-1.905" x2="0" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="0" y1="-1.905" x2="0" y2="0.635" width="0.1524" layer="21"/>
<wire x1="0" y1="0.635" x2="-2.54" y2="0.635" width="0.1524" layer="21"/>
<wire x1="-2.54" y1="0.635" x2="-2.54" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-1.27" y1="6.985" x2="-1.27" y2="1.27" width="0.762" layer="21"/>
<pad name="1" x="-1.27" y="-3.81" drill="1.016" shape="long" rot="R90"/>
<text x="-3.175" y="-3.81" size="1.27" layer="25" ratio="10" rot="R90">>NAME</text>
<text x="1.905" y="-3.81" size="1.27" layer="27" rot="R90">>VALUE</text>
<rectangle x1="-1.651" y1="0.635" x2="-0.889" y2="1.143" layer="21"/>
<rectangle x1="-1.651" y1="-2.921" x2="-0.889" y2="-1.905" layer="21"/>
</package>
<package name="1X01/90-S">
<description>PIN HEADER - 2.54 90°</description>
<wire x1="-2.54" y1="-1.905" x2="0" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="0" y1="-1.905" x2="0" y2="0.635" width="0.1524" layer="21"/>
<wire x1="0" y1="0.635" x2="-2.54" y2="0.635" width="0.1524" layer="21"/>
<wire x1="-2.54" y1="0.635" x2="-2.54" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-1.27" y1="6.985" x2="-1.27" y2="1.27" width="0.762" layer="21"/>
<pad name="1" x="-1.27" y="-3.81" drill="1.016" shape="square"/>
<rectangle x1="-1.651" y1="0.635" x2="-0.889" y2="1.143" layer="21"/>
<rectangle x1="-1.651" y1="-2.921" x2="-0.889" y2="-1.905" layer="21"/>
<text x="-1.27" y="-5.08" size="1.016" layer="27" font="vector" ratio="10" rot="R90" align="center-right">>VALUE</text>
</package>
<package name="1X01SMD">
<description>PIN HEADER - 2.54 SMD</description>
<wire x1="-1.905" y1="1.27" x2="-0.635" y2="1.27" width="0.1524" layer="21"/>
<wire x1="-0.635" y1="1.27" x2="0" y2="0.635" width="0.1524" layer="21"/>
<wire x1="0" y1="0.635" x2="0" y2="-0.635" width="0.1524" layer="21"/>
<wire x1="0" y1="-0.635" x2="-0.635" y2="-1.27" width="0.1524" layer="21"/>
<wire x1="-2.54" y1="0.635" x2="-2.54" y2="-0.635" width="0.1524" layer="21"/>
<wire x1="-1.905" y1="1.27" x2="-2.54" y2="0.635" width="0.1524" layer="21"/>
<wire x1="-2.54" y1="-0.635" x2="-1.905" y2="-1.27" width="0.1524" layer="21"/>
<wire x1="-0.635" y1="-1.27" x2="-1.905" y2="-1.27" width="0.1524" layer="21"/>
<smd name="1" x="-1.27" y="1.27" dx="3.302" dy="1.016" layer="1" rot="R90"/>
<rectangle x1="-1.524" y1="-0.254" x2="-1.016" y2="0.254" layer="51"/>
<text x="-1.27" y="-1.524" size="1.016" layer="27" font="vector" ratio="10" rot="R90" align="center-right">>VALUE</text>
</package>
<package name="1X01SMD/90">
<description>PIN HEADER - 2.54 90°</description>
<wire x1="-2.54" y1="-1.905" x2="0" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="0" y1="-1.905" x2="0" y2="0.635" width="0.1524" layer="21"/>
<wire x1="0" y1="0.635" x2="-2.54" y2="0.635" width="0.1524" layer="21"/>
<wire x1="-2.54" y1="0.635" x2="-2.54" y2="-1.905" width="0.1524" layer="21"/>
<wire x1="-1.27" y1="6.0325" x2="-1.27" y2="1.27" width="0.762" layer="21"/>
<wire x1="-1.27" y1="-2.54" x2="-1.27" y2="-5.08" width="0.4064" layer="21"/>
<smd name="1" x="-1.27" y="-5.08" dx="1.778" dy="1.016" layer="1" rot="R90"/>
<rectangle x1="-1.651" y1="0.635" x2="-0.889" y2="1.143" layer="21"/>
<rectangle x1="-1.651" y1="-2.921" x2="-0.889" y2="-1.905" layer="21"/>
<text x="-1.27" y="-6.35" size="1.016" layer="27" font="vector" ratio="10" rot="R90" align="center-right">>VALUE</text>
</package>
<package name="OFFBOARD_2">
<pad name="P$1" x="-1.27" y="0" drill="0.8" shape="octagon"/>
<pad name="P$2" x="1.27" y="0" drill="0.8" shape="octagon"/>
<text x="-2.54" y="1.27" size="1.27" layer="25">>NAME</text>
<text x="-2.54" y="-2.54" size="1.27" layer="27">>VALUE</text>
</package>
<package name="EVQ11X09">
<wire x1="-0.508" y1="3.048" x2="-0.508" y2="-3.048" width="0.127" layer="21"/>
<wire x1="-0.508" y1="3.048" x2="5.588" y2="3.048" width="0.127" layer="21"/>
<wire x1="5.588" y1="3.048" x2="5.588" y2="-3.048" width="0.127" layer="21"/>
<wire x1="5.588" y1="-3.048" x2="-0.508" y2="-3.048" width="0.127" layer="21"/>
<pad name="1" x="0" y="0" drill="1.0414" diameter="1.6764" shape="octagon"/>
<pad name="2" x="5.08" y="0" drill="1.0414" diameter="1.6764" shape="octagon"/>
<text x="0" y="3.81" size="1.27" layer="25">>NAME</text>
<text x="0" y="-5.08" size="1.27" layer="25">>VALUE</text>
</package>
<package name="6MMTACTILE">
<description>6mm Through-Hole Tactile Mometary Switch</description>
<wire x1="-3" y1="3" x2="3" y2="3" width="0.127" layer="21"/>
<wire x1="3" y1="-3" x2="-3" y2="-3" width="0.127" layer="21"/>
<wire x1="-3" y1="3" x2="-3" y2="0.8" width="0.127" layer="21"/>
<wire x1="-3" y1="-3" x2="-3" y2="-0.8" width="0.127" layer="21"/>
<wire x1="3" y1="3" x2="3" y2="0.8" width="0.127" layer="21"/>
<wire x1="3" y1="-3" x2="3" y2="-0.8" width="0.127" layer="21"/>
<circle x="0" y="0" radius="1.4142" width="0.127" layer="21"/>
<pad name="P$1" x="-2.54" y="0" drill="0.8"/>
<pad name="P$2" x="2.54" y="0" drill="0.8"/>
</package>
<package name="6MMTACTILE_RECT">
<wire x1="-3" y1="-1.75" x2="3" y2="-1.75" width="0.127" layer="21"/>
<wire x1="3" y1="1.75" x2="-3" y2="1.75" width="0.127" layer="21"/>
<wire x1="-1.5" y1="0.75" x2="-1.5" y2="-0.75" width="0.127" layer="21"/>
<wire x1="-1.5" y1="-0.75" x2="1.5" y2="-0.75" width="0.127" layer="21"/>
<wire x1="1.5" y1="-0.75" x2="1.5" y2="0.75" width="0.127" layer="21"/>
<wire x1="1.5" y1="0.75" x2="-1.5" y2="0.75" width="0.127" layer="21"/>
<wire x1="-3" y1="1.7" x2="-3" y2="1.1" width="0.127" layer="21"/>
<wire x1="-3" y1="-1.7" x2="-3" y2="-1.1" width="0.127" layer="21"/>
<wire x1="3" y1="1.7" x2="3" y2="1.1" width="0.127" layer="21"/>
<wire x1="3" y1="-1.7" x2="3" y2="-1.1" width="0.127" layer="21"/>
<pad name="P$1" x="-3.5" y="0" drill="1.2"/>
<pad name="P$2" x="3.5" y="0" drill="1.2"/>
<text x="0" y="2.032" size="1.016" layer="27" font="vector" ratio="10" align="bottom-center">>VALUE</text>
</package>
<package name="EVQPJ">
<description>Panasonic EVQ-PJC tact switch</description>
<wire x1="-1.25" y1="1.75" x2="7.75" y2="1.75" width="0.127" layer="21"/>
<wire x1="7.75" y1="1.75" x2="7.75" y2="-1.75" width="0.127" layer="21"/>
<wire x1="7.75" y1="-1.75" x2="-1.25" y2="-1.75" width="0.127" layer="21"/>
<wire x1="-1.25" y1="-1.75" x2="-1.25" y2="1.75" width="0.127" layer="21"/>
<pad name="A" x="0" y="0" drill="1.3" diameter="2.1844" shape="octagon"/>
<pad name="B" x="6.5" y="0" drill="1.3" diameter="2.1844" shape="octagon"/>
<text x="-1" y="2" size="1.27" layer="25">>NAME</text>
<text x="-1" y="-3.5" size="1.27" layer="27">>VALUE</text>
</package>
<package name="OFFBOARD_2_LG">
<pad name="P$1" x="-2.54" y="0" drill="1.2" diameter="2.54" shape="octagon"/>
<pad name="P$2" x="2.54" y="0" drill="1.2" diameter="2.54" shape="octagon"/>
<text x="-3.81" y="-3.81" size="1.27" layer="27">>VALUE</text>
<text x="-3.81" y="2.54" size="1.27" layer="25">>NAME</text>
</package>
<package name="6MMTACTTILE_RECT_SMD">
<smd name="P$1" x="-4.6" y="0" dx="1.6" dy="2.19" layer="1" rot="R90"/>
<smd name="P$2" x="4.6" y="0" dx="1.6" dy="2.19" layer="1" rot="R90"/>
<wire x1="-3" y1="1.75" x2="3" y2="1.75" width="0.127" layer="21"/>
<wire x1="3" y1="1.75" x2="3" y2="-1.75" width="0.127" layer="21"/>
<wire x1="-3" y1="1.75" x2="-3" y2="-1.75" width="0.127" layer="21"/>
<wire x1="-3" y1="-1.75" x2="3" y2="-1.75" width="0.127" layer="21"/>
<wire x1="-1.5" y1="0.76" x2="1.5" y2="0.76" width="0.127" layer="21"/>
<wire x1="1.5" y1="0.76" x2="1.5" y2="-0.76" width="0.127" layer="21"/>
<wire x1="1.5" y1="-0.76" x2="-1.5" y2="-0.76" width="0.127" layer="21"/>
<wire x1="-1.5" y1="-0.76" x2="-1.5" y2="0.76" width="0.127" layer="21"/>
<text x="-3" y="2.5" size="1.27" layer="25">>NAME</text>
<text x="-3" y="-3.5" size="1.27" layer="27">>VALUE</text>
</package>
<package name="3X4X2TACT">
<description>3mm x 4mm x 2mm Tactile Switch</description>
<smd name="P$1" x="-2.1" y="0" dx="2" dy="1.2" layer="1" rot="R90"/>
<smd name="P$2" x="2.1" y="0" dx="2" dy="1.2" layer="1" rot="R90"/>
<wire x1="-2" y1="1.5" x2="2" y2="1.5" width="0.127" layer="21"/>
<wire x1="2" y1="1" x2="2" y2="-1" width="0.127" layer="51"/>
<wire x1="2" y1="-1.5" x2="-2" y2="-1.5" width="0.127" layer="21"/>
<circle x="0" y="0" radius="0.9" width="0.127" layer="21"/>
<text x="0" y="1.778" size="1.016" layer="27" font="vector" ratio="10" align="bottom-center">>VALUE</text>
<wire x1="-2" y1="-1" x2="-2" y2="1" width="0.127" layer="51"/>
<wire x1="2" y1="1.5" x2="2" y2="1" width="0.127" layer="21"/>
<wire x1="-2" y1="1.5" x2="-2" y2="1" width="0.127" layer="21"/>
<wire x1="-2" y1="-1.5" x2="-2" y2="-1" width="0.127" layer="21"/>
<wire x1="2" y1="-1.5" x2="2" y2="-1" width="0.127" layer="21"/>
</package>
</packages>
<symbols>
<symbol name="PINH1X01">
<wire x1="-6.35" y1="-2.54" x2="1.27" y2="-2.54" width="0.4064" layer="94"/>
<wire x1="1.27" y1="-2.54" x2="1.27" y2="2.54" width="0.4064" layer="94"/>
<wire x1="1.27" y1="2.54" x2="-6.35" y2="2.54" width="0.4064" layer="94"/>
<wire x1="-6.35" y1="2.54" x2="-6.35" y2="-2.54" width="0.4064" layer="94"/>
<text x="2.54" y="0" size="1.778" layer="96" align="center-left">>VALUE</text>
<pin name="1" x="-2.54" y="0" visible="pad" length="short" direction="pas" function="dot"/>
</symbol>
<symbol name="SPST">
<wire x1="-3.175" y1="0" x2="-2.54" y2="0" width="0.254" layer="94"/>
<wire x1="2.54" y1="0" x2="3.175" y2="0" width="0.254" layer="94"/>
<wire x1="-2.54" y1="0" x2="0" y2="0.635" width="0.254" layer="94"/>
<wire x1="0" y1="0.635" x2="2.54" y2="1.27" width="0.254" layer="94"/>
<text x="-3.937" y="2.794" size="1.778" layer="95">>NAME</text>
<text x="-4.699" y="-3.556" size="1.778" layer="96">>VALUE</text>
<pin name="P" x="-5.08" y="0" visible="off" length="short" direction="pas"/>
<pin name="S" x="5.08" y="0" visible="off" length="short" direction="pas" rot="R180"/>
</symbol>
</symbols>
<devicesets>
<deviceset name="PINHD-1X01" prefix="JP" uservalue="yes">
<description>PIN HEADER

Generic pin header in a variety of footprints
</description>
<gates>
<gate name="A" symbol="PINH1X01" x="0" y="0"/>
</gates>
<devices>
<device name="_2.54" package="1X01">
<connects>
<connect gate="A" pin="1" pad="1"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_2.54-S" package="1X01-S">
<connects>
<connect gate="A" pin="1" pad="1"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_2.00" package="1X01M">
<connects>
<connect gate="A" pin="1" pad="1"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_2.54-90°" package="1X01/90">
<connects>
<connect gate="A" pin="1" pad="1"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_2.54-90°-S" package="1X01/90-S">
<connects>
<connect gate="A" pin="1" pad="1"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_2.54-SMD" package="1X01SMD">
<connects>
<connect gate="A" pin="1" pad="1"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_2.54-SMD-90°" package="1X01SMD/90">
<connects>
<connect gate="A" pin="1" pad="1"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
<deviceset name="SPST" prefix="S">
<description>SPST SWITCH</description>
<gates>
<gate name="G$1" symbol="SPST" x="0" y="0"/>
</gates>
<devices>
<device name="_OFFBOARD" package="OFFBOARD_2">
<connects>
<connect gate="G$1" pin="P" pad="P$1"/>
<connect gate="G$1" pin="S" pad="P$2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_TACT1" package="EVQ11X09">
<connects>
<connect gate="G$1" pin="P" pad="1"/>
<connect gate="G$1" pin="S" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_TACT2" package="6MMTACTILE">
<connects>
<connect gate="G$1" pin="P" pad="P$1"/>
<connect gate="G$1" pin="S" pad="P$2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_TAC_RECT1" package="6MMTACTILE_RECT">
<connects>
<connect gate="G$1" pin="P" pad="P$1"/>
<connect gate="G$1" pin="S" pad="P$2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_TACT_RECT2" package="EVQPJ">
<connects>
<connect gate="G$1" pin="P" pad="A"/>
<connect gate="G$1" pin="S" pad="B"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_OFFBOARD_LG" package="OFFBOARD_2_LG">
<connects>
<connect gate="G$1" pin="P" pad="P$1"/>
<connect gate="G$1" pin="S" pad="P$2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_TACT_RECT_SMD" package="6MMTACTTILE_RECT_SMD">
<connects>
<connect gate="G$1" pin="P" pad="P$1"/>
<connect gate="G$1" pin="S" pad="P$2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="_3X4X2" package="3X4X2TACT">
<connects>
<connect gate="G$1" pin="P" pad="P$1"/>
<connect gate="G$1" pin="S" pad="P$2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
<library name="bt_rcl">
<description>Resistors, Capacitors, Inductors</description>
<packages>
<package name="0603">
<description>
Generic 1608 (0603) package

0.2mm courtyard excess rounded to nearest 0.05mm.
</description>
<wire x1="-1.6" y1="0.7" x2="1.6" y2="0.7" width="0.0508" layer="39"/>
<wire x1="1.6" y1="0.7" x2="1.6" y2="-0.7" width="0.0508" layer="39"/>
<wire x1="1.6" y1="-0.7" x2="-1.6" y2="-0.7" width="0.0508" layer="39"/>
<wire x1="-1.6" y1="-0.7" x2="-1.6" y2="0.7" width="0.0508" layer="39"/>
<wire x1="-0.356" y1="0.432" x2="0.356" y2="0.432" width="0.1016" layer="51"/>
<wire x1="-0.356" y1="-0.419" x2="0.356" y2="-0.419" width="0.1016" layer="51"/>
<smd name="1" x="-0.85" y="0" dx="1.1" dy="1" layer="1"/>
<smd name="2" x="0.85" y="0" dx="1.1" dy="1" layer="1"/>
<text x="0" y="0.762" size="0.8128" layer="25" font="vector" ratio="10" align="bottom-center">>NAME</text>
<text x="0" y="-0.762" size="0.8128" layer="27" font="vector" ratio="10" align="top-center">>VALUE</text>
<rectangle x1="-0.8382" y1="-0.4699" x2="-0.3381" y2="0.4801" layer="51"/>
<rectangle x1="0.3302" y1="-0.4699" x2="0.8303" y2="0.4801" layer="51"/>
<rectangle x1="-0.1999" y1="-0.3" x2="0.1999" y2="0.3" layer="35"/>
</package>
<package name="0805">
<description>
Generic 2012 (0805) package

0.2mm courtyard excess rounded to nearest 0.05mm.
</description>
<smd name="1" x="-0.9" y="0" dx="0.8" dy="1.2" layer="1"/>
<smd name="2" x="0.9" y="0" dx="0.8" dy="1.2" layer="1"/>
<text x="0" y="0.889" size="0.8128" layer="25" font="vector" ratio="10" align="bottom-center">>NAME</text>
<text x="0" y="-0.889" size="0.8128" layer="27" font="vector" ratio="10" align="top-center">>VALUE</text>
<wire x1="-1.5" y1="0.8" x2="1.5" y2="0.8" width="0.0508" layer="39"/>
<wire x1="1.5" y1="0.8" x2="1.5" y2="-0.8" width="0.0508" layer="39"/>
<wire x1="1.5" y1="-0.8" x2="-1.5" y2="-0.8" width="0.0508" layer="39"/>
<wire x1="-1.5" y1="-0.8" x2="-1.5" y2="0.8" width="0.0508" layer="39"/>
</package>
<package name="0204/5">
<description>RESISTOR

type 0204, grid 5 mm</description>
<wire x1="2.54" y1="0" x2="2.032" y2="0" width="0.508" layer="51"/>
<wire x1="-2.54" y1="0" x2="-2.032" y2="0" width="0.508" layer="51"/>
<wire x1="-1.778" y1="0.635" x2="-1.524" y2="0.889" width="0.1524" layer="21" curve="-90"/>
<wire x1="-1.778" y1="-0.635" x2="-1.524" y2="-0.889" width="0.1524" layer="21" curve="90"/>
<wire x1="1.524" y1="-0.889" x2="1.778" y2="-0.635" width="0.1524" layer="21" curve="90"/>
<wire x1="1.524" y1="0.889" x2="1.778" y2="0.635" width="0.1524" layer="21" curve="-90"/>
<wire x1="-1.778" y1="-0.635" x2="-1.778" y2="0.635" width="0.1524" layer="51"/>
<wire x1="-1.524" y1="0.889" x2="-1.27" y2="0.889" width="0.1524" layer="21"/>
<wire x1="-1.143" y1="0.762" x2="-1.27" y2="0.889" width="0.1524" layer="21"/>
<wire x1="-1.524" y1="-0.889" x2="-1.27" y2="-0.889" width="0.1524" layer="21"/>
<wire x1="-1.143" y1="-0.762" x2="-1.27" y2="-0.889" width="0.1524" layer="21"/>
<wire x1="1.143" y1="0.762" x2="1.27" y2="0.889" width="0.1524" layer="21"/>
<wire x1="1.143" y1="0.762" x2="-1.143" y2="0.762" width="0.1524" layer="21"/>
<wire x1="1.143" y1="-0.762" x2="1.27" y2="-0.889" width="0.1524" layer="21"/>
<wire x1="1.143" y1="-0.762" x2="-1.143" y2="-0.762" width="0.1524" layer="21"/>
<wire x1="1.524" y1="0.889" x2="1.27" y2="0.889" width="0.1524" layer="21"/>
<wire x1="1.524" y1="-0.889" x2="1.27" y2="-0.889" width="0.1524" layer="21"/>
<wire x1="1.778" y1="-0.635" x2="1.778" y2="0.635" width="0.1524" layer="51"/>
<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
<text x="-1.7526" y="1.1684" size="0.8128" layer="25" font="vector" ratio="10">>NAME</text>
<text x="0" y="0" size="0.8128" layer="27" font="vector" ratio="10" align="center">>VALUE</text>
<rectangle x1="-2.032" y1="-0.254" x2="-1.778" y2="0.254" layer="51"/>
<rectangle x1="1.778" y1="-0.254" x2="2.032" y2="0.254" layer="51"/>
</package>
<package name="0204V">
<description>RESISTOR

type 0204, grid 2.5 mm</description>
<wire x1="-1.27" y1="0" x2="1.27" y2="0" width="0.508" layer="51"/>
<wire x1="-0.127" y1="0" x2="0.127" y2="0" width="0.508" layer="21"/>
<circle x="-1.27" y="0" radius="0.889" width="0.1524" layer="51"/>
<circle x="-1.27" y="0" radius="0.635" width="0.0508" layer="51"/>
<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
<text x="-2.032" y="1.016" size="0.8128" layer="25" font="vector" ratio="10">>NAME</text>
<text x="-2.032" y="-1.016" size="0.8128" layer="27" font="vector" ratio="10" align="top-left">>VALUE</text>
</package>
<package name="0207/5V">
<description>RESISTOR

type 0207, grid 5 mm</description>
<wire x1="-2.54" y1="0" x2="-0.889" y2="0" width="0.6096" layer="51"/>
<wire x1="-0.762" y1="0" x2="0.762" y2="0" width="0.6096" layer="21"/>
<wire x1="0.889" y1="0" x2="2.54" y2="0" width="0.6096" layer="51"/>
<circle x="-2.54" y="0" radius="1.27" width="0.1016" layer="21"/>
<circle x="-2.54" y="0" radius="1.016" width="0.1524" layer="51"/>
<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
<text x="-1.016" y="0.889" size="1.016" layer="25" font="vector" ratio="10">>NAME</text>
<text x="-1.016" y="-0.889" size="1.016" layer="27" font="vector" ratio="10" align="top-left">>VALUE</text>
</package>
<package name="0207/7">
<description>RESISTOR

type 0207, grid 7.5 mm</description>
<wire x1="-3.81" y1="0" x2="-3.429" y2="0" width="0.6096" layer="51"/>
<wire x1="-3.175" y1="0.889" x2="-2.921" y2="1.143" width="0.1524" layer="21" curve="-90"/>
<wire x1="-3.175" y1="-0.889" x2="-2.921" y2="-1.143" width="0.1524" layer="21" curve="90"/>
<wire x1="2.921" y1="-1.143" x2="3.175" y2="-0.889" width="0.1524" layer="21" curve="90"/>
<wire x1="2.921" y1="1.143" x2="3.175" y2="0.889" width="0.1524" layer="21" curve="-90"/>
<wire x1="-3.175" y1="-0.889" x2="-3.175" y2="0.889" width="0.1524" layer="51"/>
<wire x1="-2.921" y1="1.143" x2="-2.54" y2="1.143" width="0.1524" layer="21"/>
<wire x1="-2.413" y1="1.016" x2="-2.54" y2="1.143" width="0.1524" layer="21"/>
<wire x1="-2.921" y1="-1.143" x2="-2.54" y2="-1.143" width="0.1524" layer="21"/>
<wire x1="-2.413" y1="-1.016" x2="-2.54" y2="-1.143" width="0.1524" layer="21"/>
<wire x1="2.413" y1="1.016" x2="2.54" y2="1.143" width="0.1524" layer="21"/>
<wire x1="2.413" y1="1.016" x2="-2.413" y2="1.016" width="0.1524" layer="21"/>
<wire x1="2.413" y1="-1.016" x2="2.54" y2="-1.143" width="0.1524" layer="21"/>
<wire x1="2.413" y1="-1.016" x2="-2.413" y2="-1.016" width="0.1524" layer="21"/>
<wire x1="2.921" y1="1.143" x2="2.54" y2="1.143" width="0.1524" layer="21"/>
<wire x1="2.921" y1="-1.143" x2="2.54" y2="-1.143" width="0.1524" layer="21"/>
<wire x1="3.175" y1="-0.889" x2="3.175" y2="0.889" width="0.1524" layer="51"/>
<wire x1="3.429" y1="0" x2="3.81" y2="0" width="0.6096" layer="51"/>
<pad name="1" x="-3.81" y="0" drill="0.8128" shape="octagon"/>
<pad name="2" x="3.81" y="0" drill="0.8128" shape="octagon"/>
<text x="-2.54" y="1.397" size="1.016" layer="25" font="vector" ratio="10">>NAME</text>
<text x="0" y="0" size="1.016" layer="27" font="vector" ratio="10" align="center">>VALUE</text>
<rectangle x1="-3.429" y1="-0.3048" x2="-3.175" y2="0.3048" layer="51"/>
<rectangle x1="3.175" y1="-0.3048" x2="3.429" y2="0.3048" layer="51"/>
</package>
<package name="0204/7">
<description>RESISTOR

type 0204, grid 7.5 mm</description>
<wire x1="3.81" y1="0" x2="2.921" y2="0" width="0.508" layer="51"/>
<wire x1="-3.81" y1="0" x2="-2.921" y2="0" width="0.508" layer="51"/>
<wire x1="-2.54" y1="0.762" x2="-2.286" y2="1.016" width="0.1524" layer="21" curve="-90"/>
<wire x1="-2.54" y1="-0.762" x2="-2.286" y2="-1.016" width="0.1524" layer="21" curve="90"/>
<wire x1="2.286" y1="-1.016" x2="2.54" y2="-0.762" width="0.1524" layer="21" curve="90"/>
<wire x1="2.286" y1="1.016" x2="2.54" y2="0.762" width="0.1524" layer="21" curve="-90"/>
<wire x1="-2.54" y1="-0.762" x2="-2.54" y2="0.762" width="0.1524" layer="21"/>
<wire x1="-2.286" y1="1.016" x2="-1.905" y2="1.016" width="0.1524" layer="21"/>
<wire x1="-1.778" y1="0.889" x2="-1.905" y2="1.016" width="0.1524" layer="21"/>
<wire x1="-2.286" y1="-1.016" x2="-1.905" y2="-1.016" width="0.1524" layer="21"/>
<wire x1="-1.778" y1="-0.889" x2="-1.905" y2="-1.016" width="0.1524" layer="21"/>
<wire x1="1.778" y1="0.889" x2="1.905" y2="1.016" width="0.1524" layer="21"/>
<wire x1="1.778" y1="0.889" x2="-1.778" y2="0.889" width="0.1524" layer="21"/>
<wire x1="1.778" y1="-0.889" x2="1.905" y2="-1.016" width="0.1524" layer="21"/>
<wire x1="1.778" y1="-0.889" x2="-1.778" y2="-0.889" width="0.1524" layer="21"/>
<wire x1="2.286" y1="1.016" x2="1.905" y2="1.016" width="0.1524" layer="21"/>
<wire x1="2.286" y1="-1.016" x2="1.905" y2="-1.016" width="0.1524" layer="21"/>
<wire x1="2.54" y1="-0.762" x2="2.54" y2="0.762" width="0.1524" layer="21"/>
<pad name="1" x="-3.81" y="0" drill="0.8128" shape="octagon"/>
<pad name="2" x="3.81" y="0" drill="0.8128" shape="octagon"/>
<text x="-2.54" y="1.2954" size="0.8128" layer="25" font="vector" ratio="10">>NAME</text>
<text x="0" y="0" size="0.8128" layer="27" font="vector" ratio="10" align="center">>VALUE</text>
<rectangle x1="2.54" y1="-0.254" x2="2.921" y2="0.254" layer="21"/>
<rectangle x1="-2.921" y1="-0.254" x2="-2.54" y2="0.254" layer="21"/>
</package>
<package name="C050-024X044">
<description>CAPACITOR

grid 5 mm, outline 2.4 x 4.4 mm</description>
<wire x1="-2.159" y1="-0.635" x2="-2.159" y2="0.635" width="0.1524" layer="51"/>
<wire x1="-2.159" y1="0.635" x2="-1.651" y2="1.143" width="0.1524" layer="21" curve="-90"/>
<wire x1="-2.159" y1="-0.635" x2="-1.651" y2="-1.143" width="0.1524" layer="21" curve="90"/>
<wire x1="1.651" y1="1.143" x2="-1.651" y2="1.143" width="0.1524" layer="21"/>
<wire x1="2.159" y1="-0.635" x2="2.159" y2="0.635" width="0.1524" layer="51"/>
<wire x1="1.651" y1="-1.143" x2="-1.651" y2="-1.143" width="0.1524" layer="21"/>
<wire x1="1.651" y1="1.143" x2="2.159" y2="0.635" width="0.1524" layer="21" curve="-90"/>
<wire x1="1.651" y1="-1.143" x2="2.159" y2="-0.635" width="0.1524" layer="21" curve="90"/>
<wire x1="-0.3048" y1="0.762" x2="-0.3048" y2="0" width="0.3048" layer="21"/>
<wire x1="-0.3048" y1="0" x2="-0.3048" y2="-0.762" width="0.3048" layer="21"/>
<wire x1="0.3302" y1="0.762" x2="0.3302" y2="0" width="0.3048" layer="21"/>
<wire x1="0.3302" y1="0" x2="0.3302" y2="-0.762" width="0.3048" layer="21"/>
<wire x1="1.27" y1="0" x2="0.3302" y2="0" width="0.1524" layer="21"/>
<wire x1="-1.27" y1="0" x2="-0.3048" y2="0" width="0.1524" layer="21"/>
<pad name="1" x="-2.54" y="0" drill="0.8128" shape="octagon"/>
<pad name="2" x="2.54" y="0" drill="0.8128" shape="octagon"/>
<text x="0" y="1.397" size="0.8128" layer="25" font="vector" ratio="10" align="bottom-center">>NAME</text>
<text x="0" y="-1.397" size="0.8128" layer="27" font="vector" ratio="10" align="top-center">>VALUE</text>
<rectangle x1="2.159" y1="-0.381" x2="2.54" y2="0.381" layer="51"/>
<rectangle x1="-2.54" y1="-0.381" x2="-2.159" y2="0.381" layer="51"/>
</package>
<package name="C025-024X044">
<description>CAPACITOR

grid 2.5 mm, outline 2.4 x 4.4 mm</description>
<wire x1="-2.159" y1="-0.635" x2="-2.159" y2="0.635" width="0.1524" layer="21"/>
<wire x1="-2.159" y1="0.635" x2="-1.651" y2="1.143" width="0.1524" layer="21" curve="-90"/>
<wire x1="-2.159" y1="-0.635" x2="-1.651" y2="-1.143" width="0.1524" layer="21" curve="90"/>
<wire x1="1.651" y1="1.143" x2="-1.651" y2="1.143" width="0.1524" layer="21"/>
<wire x1="2.159" y1="-0.635" x2="2.159" y2="0.635" width="0.1524" layer="21"/>
<wire x1="1.651" y1="-1.143" x2="-1.651" y2="-1.143" width="0.1524" layer="21"/>
<wire x1="1.651" y1="1.143" x2="2.159" y2="0.635" width="0.1524" layer="21" curve="-90"/>
<wire x1="1.651" y1="-1.143" x2="2.159" y2="-0.635" width="0.1524" layer="21" curve="90"/>
<wire x1="-0.3048" y1="0.762" x2="-0.3048" y2="-0.762" width="0.3048" layer="21"/>
<wire x1="0.3302" y1="0.762" x2="0.3302" y2="-0.762" width="0.3048" layer="21"/>
<wire x1="1.27" y1="0" x2="0.3302" y2="0" width="0.1524" layer="51"/>
<wire x1="-1.27" y1="0" x2="-0.3048" y2="0" width="0.1524" layer="51"/>
<pad name="1" x="-1.27" y="0" drill="0.8128" shape="octagon"/>
<pad name="2" x="1.27" y="0" drill="0.8128" shape="octagon"/>
<text x="0" y="1.397" size="0.8128" layer="25" font="vector" ratio="10" align="bottom-center">>NAME</text>
<text x="0" y="-1.397" size="0.8128" layer="27" font="vector" ratio="10" rot="R180" align="bottom-center">>VALUE</text>
</package>
<package name="1206">
<description>
Generic 3216 (1206) package

0.2mm courtyard excess rounded to nearest 0.05mm.
</description>
<wire x1="-2.4" y1="1.1" x2="2.4" y2="1.1" width="0.0508" layer="39"/>
<wire x1="2.4" y1="-1.1" x2="-2.4" y2="-1.1" width="0.0508" layer="39"/>
<wire x1="-2.4" y1="-1.1" x2="-2.4" y2="1.1" width="0.0508" layer="39"/>
<wire x1="2.4" y1="1.1" x2="2.4" y2="-1.1" width="0.0508" layer="39"/>
<wire x1="-0.965" y1="0.787" x2="0.965" y2="0.787" width="0.1016" layer="51"/>
<wire x1="-0.965" y1="-0.787" x2="0.965" y2="-0.787" width="0.1016" layer="51"/>
<smd name="1" x="-1.4" y="0" dx="1.6" dy="1.8" layer="1"/>
<smd name="2" x="1.4" y="0" dx="1.6" dy="1.8" layer="1"/>
<text x="0" y="1.143" size="0.8128" layer="25" font="vector" ratio="10" align="bottom-center">>NAME</text>
<text x="0" y="-1.143" size="0.8128" layer="27" font="vector" ratio="10" align="top-center">>VALUE</text>
<rectangle x1="-1.7018" y1="-0.8509" x2="-0.9517" y2="0.8491" layer="51"/>
<rectangle x1="0.9517" y1="-0.8491" x2="1.7018" y2="0.8509" layer="51"/>
<rectangle x1="-0.1999" y1="-0.4001" x2="0.1999" y2="0.4001" layer="35"/>
</package>
</packages>
<symbols>
<symbol name="R">
<wire x1="-2.54" y1="0" x2="-2.159" y2="1.016" width="0.2032" layer="94"/>
<wire x1="-2.159" y1="1.016" x2="-1.524" y2="-1.016" width="0.2032" layer="94"/>
<wire x1="-1.524" y1="-1.016" x2="-0.889" y2="1.016" width="0.2032" layer="94"/>
<wire x1="-0.889" y1="1.016" x2="-0.254" y2="-1.016" width="0.2032" layer="94"/>
<wire x1="-0.254" y1="-1.016" x2="0.381" y2="1.016" width="0.2032" layer="94"/>
<wire x1="0.381" y1="1.016" x2="1.016" y2="-1.016" width="0.2032" layer="94"/>
<wire x1="1.016" y1="-1.016" x2="1.651" y2="1.016" width="0.2032" layer="94"/>
<wire x1="1.651" y1="1.016" x2="2.286" y2="-1.016" width="0.2032" layer="94"/>
<wire x1="2.286" y1="-1.016" x2="2.54" y2="0" width="0.2032" layer="94"/>
<text x="-3.81" y="1.4986" size="1.778" layer="95">>NAME</text>
<text x="-3.81" y="-3.302" size="1.778" layer="96">>VALUE</text>
<pin name="2" x="5.08" y="0" visible="off" length="short" direction="pas" swaplevel="1" rot="R180"/>
<pin name="1" x="-5.08" y="0" visible="off" length="short" direction="pas" swaplevel="1"/>
</symbol>
<symbol name="C">
<pin name="+" x="0" y="2.54" visible="off" length="short" direction="pas" swaplevel="1" rot="R270"/>
<pin name="-" x="0" y="-5.08" visible="off" length="short" direction="pas" swaplevel="1" rot="R90"/>
<wire x1="-2.54" y1="0" x2="2.54" y2="0" width="0.254" layer="94"/>
<wire x1="0" y1="-1.016" x2="0" y2="-2.54" width="0.1524" layer="94"/>
<wire x1="0" y1="-1" x2="2.4892" y2="-1.8542" width="0.254" layer="94" curve="-37.878202"/>
<wire x1="-2.4669" y1="-1.8504" x2="0" y2="-1.0161" width="0.254" layer="94" curve="-37.376341"/>
<text x="1.016" y="0.635" size="1.778" layer="95">>NAME</text>
<text x="1.016" y="-4.191" size="1.778" layer="96">>VALUE</text>
</symbol>
</symbols>
<devicesets>
<deviceset name="R" prefix="R" uservalue="yes">
<description>Resistor, American symbol</description>
<gates>
<gate name="R1" symbol="R" x="0" y="0"/>
</gates>
<devices>
<device name="0603" package="0603">
<connects>
<connect gate="R1" pin="1" pad="1"/>
<connect gate="R1" pin="2" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="0805" package="0805">
<connects>
<connect gate="R1" pin="1" pad="1"/>
<connect gate="R1" pin="2" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="1206" package="1206">
<connects>
<connect gate="R1" pin="1" pad="1"/>
<connect gate="R1" pin="2" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="0204/5-PTH" package="0204/5">
<connects>
<connect gate="R1" pin="1" pad="1"/>
<connect gate="R1" pin="2" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="0204V-PTH" package="0204V">
<connects>
<connect gate="R1" pin="1" pad="1"/>
<connect gate="R1" pin="2" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="0207V-PTH" package="0207/5V">
<connects>
<connect gate="R1" pin="1" pad="1"/>
<connect gate="R1" pin="2" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="0207-PTH" package="0207/7">
<connects>
<connect gate="R1" pin="1" pad="1"/>
<connect gate="R1" pin="2" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="0204/7-PTH" package="0204/7">
<connects>
<connect gate="R1" pin="1" pad="1"/>
<connect gate="R1" pin="2" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
<deviceset name="C" prefix="C" uservalue="yes">
<description>
Capacitor, non-polarized, American symbol
</description>
<gates>
<gate name="C1" symbol="C" x="0" y="0"/>
</gates>
<devices>
<device name="-0603" package="0603">
<connects>
<connect gate="C1" pin="+" pad="1"/>
<connect gate="C1" pin="-" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="-0805" package="0805">
<connects>
<connect gate="C1" pin="+" pad="1"/>
<connect gate="C1" pin="-" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="-1206" package="1206">
<connects>
<connect gate="C1" pin="+" pad="1"/>
<connect gate="C1" pin="-" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="-050PTH" package="C050-024X044">
<connects>
<connect gate="C1" pin="+" pad="1"/>
<connect gate="C1" pin="-" pad="2"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
<device name="-025PTH" package="C025-024X044">
<connects>
<connect gate="C1" pin="+" pad="1"/>
<connect gate="C1" pin="-" pad="2"/>
</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="U1" library="bt_arm" deviceset="MKE04Z8VTG4" device=""/>
<part name="C1" library="bt_rcl" deviceset="C" device="-0603" value="104"/>
<part name="C2" library="bt_rcl" deviceset="C" device="-1206" value="106"/>
<part name="U$1" library="bt" deviceset="VDD" device="" value="5V"/>
<part name="GND1" library="bt" deviceset="GND" device=""/>
<part name="R1" library="bt_rcl" deviceset="R" device="0603" value="10K"/>
<part name="JP1" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="!RESET"/>
<part name="JP2" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTA4"/>
<part name="JP3" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="VDD"/>
<part name="JP4" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="GND"/>
<part name="JP5" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTB7"/>
<part name="JP6" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTB6"/>
<part name="JP7" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTB5"/>
<part name="JP8" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTB4"/>
<part name="JP9" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTC3"/>
<part name="JP10" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTC2"/>
<part name="JP11" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTC1"/>
<part name="JP12" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTC0"/>
<part name="JP13" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTB3"/>
<part name="JP14" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTB2"/>
<part name="JP15" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTB1"/>
<part name="JP16" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTB0"/>
<part name="JP17" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTA3"/>
<part name="JP18" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTA2"/>
<part name="JP19" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTA1"/>
<part name="JP20" library="bt_electromech" deviceset="PINHD-1X01" device="_2.54-S" value="PTA0"/>
<part name="GND2" library="bt" deviceset="GND" device=""/>
<part name="GND3" library="bt" deviceset="GND" device=""/>
<part name="U$3" library="bt" deviceset="VDD" device="" value="5V"/>
<part name="U$4" library="bt" deviceset="VDD" device="" value="5V"/>
<part name="S1" library="bt_electromech" deviceset="SPST" device="_3X4X2" value="RESET"/>
<part name="GND4" library="bt" deviceset="GND" device=""/>
<part name="R2" library="bt_rcl" deviceset="R" device="0603" value="10K"/>
<part name="U$2" library="bt" deviceset="VDD" device="" value="5V"/>
</parts>
<sheets>
<sheet>
<plain>
</plain>
<instances>
<instance part="U1" gate="U1" x="86.36" y="58.42"/>
<instance part="C1" gate="C1" x="48.26" y="38.1"/>
<instance part="C2" gate="C1" x="58.42" y="38.1"/>
<instance part="U$1" gate="G$1" x="25.4" y="111.76"/>
<instance part="GND1" gate="1" x="17.78" y="5.08"/>
<instance part="R1" gate="R1" x="111.76" y="78.74" rot="R90"/>
<instance part="JP1" gate="A" x="142.24" y="58.42"/>
<instance part="JP2" gate="A" x="142.24" y="68.58"/>
<instance part="JP3" gate="A" x="0" y="106.68" rot="R180"/>
<instance part="JP4" gate="A" x="0" y="15.24" rot="R180"/>
<instance part="JP5" gate="A" x="0" y="25.4" rot="R180"/>
<instance part="JP6" gate="A" x="0" y="35.56" rot="R180"/>
<instance part="JP7" gate="A" x="0" y="45.72" rot="R180"/>
<instance part="JP8" gate="A" x="0" y="55.88" rot="R180"/>
<instance part="JP9" gate="A" x="142.24" y="20.32" rot="MR180"/>
<instance part="JP10" gate="A" x="142.24" y="30.48" rot="MR180"/>
<instance part="JP11" gate="A" x="142.24" y="40.64" rot="MR180"/>
<instance part="JP12" gate="A" x="142.24" y="50.8" rot="MR180"/>
<instance part="JP13" gate="A" x="0" y="66.04" rot="R180"/>
<instance part="JP14" gate="A" x="0" y="76.2" rot="R180"/>
<instance part="JP15" gate="A" x="0" y="86.36" rot="R180"/>
<instance part="JP16" gate="A" x="0" y="96.52" rot="R180"/>
<instance part="JP17" gate="A" x="142.24" y="81.28"/>
<instance part="JP18" gate="A" x="142.24" y="93.98"/>
<instance part="JP19" gate="A" x="142.24" y="106.68"/>
<instance part="JP20" gate="A" x="142.24" y="119.38"/>
<instance part="GND2" gate="1" x="48.26" y="25.4"/>
<instance part="GND3" gate="1" x="58.42" y="25.4"/>
<instance part="U$3" gate="G$1" x="111.76" y="88.9"/>
<instance part="U$4" gate="G$1" x="48.26" y="88.9"/>
<instance part="S1" gate="G$1" x="111.76" y="30.48" rot="R90"/>
<instance part="GND4" gate="1" x="111.76" y="15.24"/>
<instance part="R2" gate="R1" x="33.02" y="78.74" rot="R90"/>
<instance part="U$2" gate="G$1" x="33.02" y="88.9"/>
</instances>
<busses>
</busses>
<nets>
<net name="VDD" class="0">
<segment>
<pinref part="U$3" gate="G$1" pin="VDD"/>
<pinref part="R1" gate="R1" pin="2"/>
<wire x1="111.76" y1="83.82" x2="111.76" y2="88.9" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U$1" gate="G$1" pin="VDD"/>
<wire x1="25.4" y1="106.68" x2="25.4" y2="111.76" width="0.1524" layer="91"/>
<pinref part="JP3" gate="A" pin="1"/>
<wire x1="2.54" y1="106.68" x2="25.4" y2="106.68" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="C1" gate="C1" pin="+"/>
<wire x1="48.26" y1="40.64" x2="48.26" y2="71.12" width="0.1524" layer="91"/>
<pinref part="U1" gate="U1" pin="VDD"/>
<wire x1="63.5" y1="71.12" x2="58.42" y2="71.12" width="0.1524" layer="91"/>
<pinref part="C2" gate="C1" pin="+"/>
<wire x1="58.42" y1="40.64" x2="58.42" y2="71.12" width="0.1524" layer="91"/>
<wire x1="58.42" y1="71.12" x2="48.26" y2="71.12" width="0.1524" layer="91"/>
<junction x="58.42" y="71.12"/>
<junction x="48.26" y="71.12"/>
<wire x1="48.26" y1="71.12" x2="48.26" y2="88.9" width="0.1524" layer="91"/>
<pinref part="U$4" gate="G$1" pin="VDD"/>
</segment>
<segment>
<pinref part="R2" gate="R1" pin="2"/>
<pinref part="U$2" gate="G$1" pin="VDD"/>
<wire x1="33.02" y1="88.9" x2="33.02" y2="83.82" width="0.1524" layer="91"/>
</segment>
</net>
<net name="PTA5" class="0">
<segment>
<pinref part="U1" gate="U1" pin="!RESET/PTA5"/>
<pinref part="R1" gate="R1" pin="1"/>
<wire x1="109.22" y1="58.42" x2="111.76" y2="58.42" width="0.1524" layer="91"/>
<wire x1="111.76" y1="58.42" x2="111.76" y2="73.66" width="0.1524" layer="91"/>
<pinref part="JP1" gate="A" pin="1"/>
<wire x1="111.76" y1="58.42" x2="139.7" y2="58.42" width="0.1524" layer="91"/>
<junction x="111.76" y="58.42"/>
<pinref part="S1" gate="G$1" pin="S"/>
<wire x1="111.76" y1="35.56" x2="111.76" y2="58.42" width="0.1524" layer="91"/>
</segment>
</net>
<net name="GND" class="0">
<segment>
<pinref part="C2" gate="C1" pin="-"/>
<pinref part="GND3" gate="1" pin="GND"/>
<wire x1="58.42" y1="27.94" x2="58.42" y2="33.02" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="C1" gate="C1" pin="-"/>
<pinref part="GND2" gate="1" pin="GND"/>
<wire x1="48.26" y1="33.02" x2="48.26" y2="27.94" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="U1" gate="U1" pin="VSS"/>
<pinref part="GND1" gate="1" pin="GND"/>
<wire x1="63.5" y1="48.26" x2="17.78" y2="48.26" width="0.1524" layer="91"/>
<wire x1="17.78" y1="48.26" x2="17.78" y2="15.24" width="0.1524" layer="91"/>
<wire x1="17.78" y1="15.24" x2="17.78" y2="7.62" width="0.1524" layer="91"/>
<junction x="17.78" y="15.24"/>
<pinref part="JP4" gate="A" pin="1"/>
<wire x1="17.78" y1="15.24" x2="2.54" y2="15.24" width="0.1524" layer="91"/>
</segment>
<segment>
<pinref part="S1" gate="G$1" pin="P"/>
<pinref part="GND4" gate="1" pin="GND"/>
<wire x1="111.76" y1="25.4" x2="111.76" y2="17.78" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$1" class="0">
<segment>
<pinref part="JP5" gate="A" pin="1"/>
<wire x1="2.54" y1="25.4" x2="15.24" y2="25.4" width="0.1524" layer="91"/>
<wire x1="15.24" y1="25.4" x2="15.24" y2="50.8" width="0.1524" layer="91"/>
<pinref part="U1" gate="U1" pin="PTB7/EXTAL"/>
<wire x1="15.24" y1="50.8" x2="63.5" y2="50.8" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$3" class="0">
<segment>
<pinref part="U1" gate="U1" pin="PTB6/XTAL"/>
<wire x

branch_name: refs/heads/main

extension: sch


text:
1="63.5" y1="53.34" x2="12.7" y2="53.34" width="0.1524" layer="91"/>
<wire x1="12.7" y1="53.34" x2="12.7" y2="35.56" width="0.1524" layer="91"/>
<pinref part="JP6" gate="A" pin="1"/>
<wire x1="12.7" y1="35.56" x2="2.54" y2="35.56" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$4" class="0">
<segment>
<pinref part="JP7" gate="A" pin="1"/>
<wire x1="2.54" y1="45.72" x2="10.16" y2="45.72" width="0.1524" layer="91"/>
<wire x1="10.16" y1="45.72" x2="10.16" y2="55.88" width="0.1524" layer="91"/>
<pinref part="U1" gate="U1" pin="PTB5"/>
<wire x1="10.16" y1="55.88" x2="63.5" y2="55.88" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$5" class="0">
<segment>
<pinref part="U1" gate="U1" pin="PTB4"/>
<wire x1="63.5" y1="58.42" x2="33.02" y2="58.42" width="0.1524" layer="91"/>
<wire x1="33.02" y1="58.42" x2="7.62" y2="58.42" width="0.1524" layer="91"/>
<wire x1="7.62" y1="58.42" x2="7.62" y2="55.88" width="0.1524" layer="91"/>
<wire x1="7.62" y1="55.88" x2="2.54" y2="55.88" width="0.1524" layer="91"/>
<pinref part="JP8" gate="A" pin="1"/>
<pinref part="R2" gate="R1" pin="1"/>
<wire x1="33.02" y1="73.66" x2="33.02" y2="58.42" width="0.1524" layer="91"/>
<junction x="33.02" y="58.42"/>
</segment>
</net>
<net name="PTA4" class="0">
<segment>
<pinref part="U1" gate="U1" pin="PTA4"/>
<wire x1="109.22" y1="60.96" x2="127" y2="60.96" width="0.1524" layer="91"/>
<wire x1="127" y1="60.96" x2="127" y2="68.58" width="0.1524" layer="91"/>
<pinref part="JP2" gate="A" pin="1"/>
<wire x1="127" y1="68.58" x2="139.7" y2="68.58" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$7" class="0">
<segment>
<pinref part="U1" gate="U1" pin="PTC3"/>
<wire x1="109.22" y1="48.26" x2="116.84" y2="48.26" width="0.1524" layer="91"/>
<wire x1="116.84" y1="48.26" x2="116.84" y2="20.32" width="0.1524" layer="91"/>
<pinref part="JP9" gate="A" pin="1"/>
<wire x1="116.84" y1="20.32" x2="139.7" y2="20.32" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$8" class="0">
<segment>
<pinref part="JP10" gate="A" pin="1"/>
<wire x1="139.7" y1="30.48" x2="119.38" y2="30.48" width="0.1524" layer="91"/>
<wire x1="119.38" y1="30.48" x2="119.38" y2="50.8" width="0.1524" layer="91"/>
<pinref part="U1" gate="U1" pin="PTC2"/>
<wire x1="119.38" y1="50.8" x2="109.22" y2="50.8" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$9" class="0">
<segment>
<pinref part="U1" gate="U1" pin="PTC1"/>
<wire x1="109.22" y1="53.34" x2="121.92" y2="53.34" width="0.1524" layer="91"/>
<wire x1="121.92" y1="53.34" x2="121.92" y2="40.64" width="0.1524" layer="91"/>
<pinref part="JP11" gate="A" pin="1"/>
<wire x1="121.92" y1="40.64" x2="139.7" y2="40.64" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$10" class="0">
<segment>
<pinref part="JP12" gate="A" pin="1"/>
<wire x1="139.7" y1="50.8" x2="124.46" y2="50.8" width="0.1524" layer="91"/>
<wire x1="124.46" y1="50.8" x2="124.46" y2="55.88" width="0.1524" layer="91"/>
<pinref part="U1" gate="U1" pin="PTC0"/>
<wire x1="124.46" y1="55.88" x2="109.22" y2="55.88" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$12" class="0">
<segment>
<pinref part="U1" gate="U1" pin="PTB3"/>
<wire x1="63.5" y1="60.96" x2="12.7" y2="60.96" width="0.1524" layer="91"/>
<wire x1="12.7" y1="60.96" x2="12.7" y2="66.04" width="0.1524" layer="91"/>
<pinref part="JP13" gate="A" pin="1"/>
<wire x1="12.7" y1="66.04" x2="2.54" y2="66.04" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$13" class="0">
<segment>
<pinref part="JP14" gate="A" pin="1"/>
<wire x1="2.54" y1="76.2" x2="15.24" y2="76.2" width="0.1524" layer="91"/>
<wire x1="15.24" y1="76.2" x2="15.24" y2="63.5" width="0.1524" layer="91"/>
<wire x1="15.24" y1="63.5" x2="63.5" y2="63.5" width="0.1524" layer="91"/>
<pinref part="U1" gate="U1" pin="PTB2"/>
</segment>
</net>
<net name="N$14" class="0">
<segment>
<pinref part="U1" gate="U1" pin="PTB1"/>
<wire x1="63.5" y1="66.04" x2="17.78" y2="66.04" width="0.1524" layer="91"/>
<wire x1="17.78" y1="66.04" x2="17.78" y2="86.36" width="0.1524" layer="91"/>
<pinref part="JP15" gate="A" pin="1"/>
<wire x1="17.78" y1="86.36" x2="2.54" y2="86.36" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$15" class="0">
<segment>
<pinref part="JP16" gate="A" pin="1"/>
<wire x1="2.54" y1="96.52" x2="20.32" y2="96.52" width="0.1524" layer="91"/>
<wire x1="20.32" y1="96.52" x2="20.32" y2="68.58" width="0.1524" layer="91"/>
<pinref part="U1" gate="U1" pin="PTB0"/>
<wire x1="20.32" y1="68.58" x2="63.5" y2="68.58" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$16" class="0">
<segment>
<pinref part="U1" gate="U1" pin="PTA3"/>
<wire x1="109.22" y1="63.5" x2="124.46" y2="63.5" width="0.1524" layer="91"/>
<wire x1="124.46" y1="63.5" x2="124.46" y2="81.28" width="0.1524" layer="91"/>
<pinref part="JP17" gate="A" pin="1"/>
<wire x1="124.46" y1="81.28" x2="139.7" y2="81.28" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$17" class="0">
<segment>
<pinref part="U1" gate="U1" pin="PTA2"/>
<wire x1="109.22" y1="66.04" x2="121.92" y2="66.04" width="0.1524" layer="91"/>
<wire x1="121.92" y1="66.04" x2="121.92" y2="93.98" width="0.1524" layer="91"/>
<pinref part="JP18" gate="A" pin="1"/>
<wire x1="121.92" y1="93.98" x2="139.7" y2="93.98" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$18" class="0">
<segment>
<pinref part="JP19" gate="A" pin="1"/>
<wire x1="139.7" y1="106.68" x2="119.38" y2="106.68" width="0.1524" layer="91"/>
<wire x1="119.38" y1="106.68" x2="119.38" y2="68.58" width="0.1524" layer="91"/>
<pinref part="U1" gate="U1" pin="PTA1"/>
<wire x1="119.38" y1="68.58" x2="109.22" y2="68.58" width="0.1524" layer="91"/>
</segment>
</net>
<net name="PTA0" class="0">
<segment>
<pinref part="U1" gate="U1" pin="PTA0"/>
<wire x1="109.22" y1="71.12" x2="116.84" y2="71.12" width="0.1524" layer="91"/>
<wire x1="116.84" y1="71.12" x2="116.84" y2="119.38" width="0.1524" layer="91"/>
<pinref part="JP20" gate="A" pin="1"/>
<wire x1="116.84" y1="119.38" x2="139.7" y2="119.38" width="0.1524" layer="91"/>
</segment>
</net>
</nets>
</sheet>
</sheets>
</schematic>
</drawing>
</eagle>

license: MIT

license_type: permissive


text:
package cloudcallcenter

//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)

// ListSkillGroupSummaryReports invokes the cloudcallcenter.ListSkillGroupSummaryReports API synchronously
// api document: https://help.aliyun.com/api/cloudcallcenter/listskillgroupsummaryreports.html
func (client *Client) ListSkillGroupSummaryReports(request *ListSkillGroupSummaryReportsRequest) (response *ListSkillGroupSummaryReportsResponse, err error) {
	response = CreateListSkillGroupSummaryReportsResponse()
	err = client.DoAction(request, response)
	return
}

// ListSkillGroupSummaryReportsWithChan invokes the cloudcallcenter.ListSkillGroupSummaryReports API asynchronously
// api document: https://help.aliyun.com/api/cloudcallcenter/listskillgroupsummaryreports.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListSkillGroupSummaryReportsWithChan(request *ListSkillGroupSummaryReportsRequest) (<-chan *ListSkillGroupSummaryReportsResponse, <-chan error) {
	responseChan := make(chan *ListSkillGroupSummaryReportsResponse, 1)
	errChan := make(chan error, 1)
	err := client.AddAsyncTask(func() {
		defer close(responseChan)
		defer close(errChan)
		response, err := client.ListSkillGroupSummaryReports(request)
		if err != nil {
			errChan <- err
		} else {
			responseChan <- response
		}
	})
	if err != nil {
		errChan <- err
		close(responseChan)
		close(errChan)
	}
	return responseChan, errChan
}

// ListSkillGroupSummaryReportsWithCallback invokes the cloudcallcenter.ListSkillGroupSummaryReports API asynchronously
// api document: https://help.aliyun.com/api/cloudcallcenter/listskillgroupsummaryreports.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListSkillGroupSummaryReportsWithCallback(request *ListSkillGroupSummaryReportsRequest, callback func(response *ListSkillGroupSummaryReportsResponse, err error)) <-chan int {
	result := make(chan int, 1)
	err := client.AddAsyncTask(func() {
		var response *ListSkillGroupSummaryReportsResponse
		var err error
		defer close(result)
		response, err = client.ListSkillGroupSummaryReports(request)
		callback(response, err)
		result <- 1
	})
	if err != nil {
		defer close(result)
		callback(nil, err)
		result <- 0
	}
	return result
}

// ListSkillGroupSummaryReportsRequest is the request struct for api ListSkillGroupSummaryReports
type ListSkillGroupSummaryReportsRequest struct {
	*requests.RpcRequest
	OrderByOutboundTotalTalkTime string           `position:"Query" name:"OrderByOutboundTotalTalkTime"`
	OrderByInboundTotalTalkTime  string           `position:"Query" name:"OrderByInboundTotalTalkTime"`
	EndTime                      string           `position:"Query" name:"EndTime"`
	StartTime                    string           `position:"Query" name:"StartTime"`
	OrderByInboundTotalCalls     string           `position:"Query" name:"OrderByInboundTotalCalls"`
	PageNumber                   requests.Integer `position:"Query" name:"PageNumber"`
	OrderByTotalTalkTime         string           `position:"Query" name:"OrderByTotalTalkTime"`
	InstanceId                   string           `position:"Query" name:"InstanceId"`
	OrderByOutboundTotalCalls    string           `position:"Query" name:"OrderByOutboundTotalCalls"`
	SkillGroupIds                string           `position:"Query" name:"SkillGroupIds"`
	PageSize                     requests.Integer `position:"Query" name:"PageSize"`
	OrderByOccupancyRate         string           `position:"Query" name:"OrderByOccupancyRate"`
	OrderByTotalCalls            string           `position:"Query" name:"OrderByTotalCalls"`
}

// ListSkillGroupSummaryReportsResponse is the response struct for api ListSkillGroupSummaryReports
type ListSkillGroupSummaryReportsResponse struct {
	*responses.BaseResponse
	RequestId      string                             `json:"RequestId" xml:"RequestId"`
	Success        bool                               `json:"Success" xml:"Success"`
	Code           string                             `json:"Code" xml:"Code"`
	Message        string                             `json:"Message" xml:"Message"`
	HttpStatusCode int                                `json:"HttpStatusCode" xml:"HttpStatusCode"`
	Data           DataInListSkillGroupSummaryReports `json:"Data" xml:"Data"`
}

// CreateListSkillGroupSummaryReportsRequest creates a request to invoke ListSkillGroupSummaryReports API
func CreateListSkillGroupSummaryReportsRequest() (request *ListSkillGroupSummaryReportsRequest) {
	request = &ListSkillGroupSummaryReportsRequest{
		RpcRequest: &requests.RpcRequest{},
	}
	request.InitWithApiInfo("CloudCallCenter", "2017-07-05", "ListSkillGroupSummaryReports", "", "")
	request.Method = requests.POST
	return
}

// CreateListSkillGroupSummaryReportsResponse creates a response to parse from ListSkillGroupSummaryReports response
func CreateListSkillGroupSummaryReportsResponse() (response *ListSkillGroupSummaryReportsResponse) {
	response = &ListSkillGroupSummaryReportsResponse{
		BaseResponse: &responses.BaseResponse{},
	}
	return
}

repository: aliyun/alibaba-cloud-sdk-go

repo_name: aliyun/alibaba-cloud-sdk-go

branch_name: refs/heads/master

gha_language: Go

extension: go


text:
#ifndef _REMOTE_INTERACT_H_
#define _REMOTE_INTERACT_H_

#include <boost/asio/io_service.hpp>
#include <boost/asio/signal_set.hpp>

#include "ds_client.h"
#include "sdm_control.h"
#include "profiler.h"
#include "trans.h"

/******************************************  RFPManager  ******************************************/
class RFPManager { // Remote Fetch & Place
  private:
    DATA_ID_T data_id_t;

    boost::shared_ptr<Trans> trans_;
    boost::shared_ptr<DSDriver> ds_driver_;

    patch::thread_safe_map<std::string, uint64_t> data_id__recved_size_map;
    patch::thread_safe_map<std::string, void*> data_id__data_map;
    patch::syncer<unsigned int> rfp_syncer;

    boost::mutex property_mtx;
  public:
    RFPManager(DATA_ID_T data_id_t, std::string trans_protocol,
               std::string ib_lip, std::list<std::string> ib_lport_list,
               std::string tcp_lip, int tcp_lport,
               std::string gftp_lintf, std::string gftp_lip, std::string gftp_lport, std::string tmpfs_dir,
               boost::shared_ptr<DSDriver> ds_driver_);
    ~RFPManager();
    std::string to_str();

    std::string get_lip();
    std::string get_lport();
    std::string get_tmpfs_dir();
    uint64_t get_data_length(int ndim, uint64_t* gdim_, uint64_t* lb_, uint64_t* ub_);

    int wa_put(std::string lip, std::string lport, std::string tmpfs_dir,
               std::string key, unsigned int ver, std::string data_type,
               int size, int ndim, uint64_t* gdim_, uint64_t* lb_, uint64_t* ub_);
    int wa_get(std::string lip, std::string lport, std::string tmpfs_dir,
               std::string key, unsigned int ver, std::string data_type,
               int size, int ndim, uint64_t* gdim_, uint64_t* lb_, uint64_t* ub_);
    int clean_up_for_retry(std::string data_id);
    bool is_being_get(std::string key, unsigned int ver, uint64_t* lb_, uint64_t* ub_);
    int wait_for_get(std::string key, unsigned int ver, uint64_t* lb_, uint64_t* ub_);
    int notify_remote_get_done(std::string key, unsigned int ver, uint64_t* lb_, uint64_t* ub_);

    void handle_recv(std::string data_id, uint64_t data_size, void* data_);
};

/*******************************************  RIManager  ******************************************/
// App - RI
const std::string GET = "g";
const std::string GET_REPLY = "gr";
const std::string BLOCKING_GET = "bg";
const std::string BLOCKING_GET_REPLY = "bgr";
const std::string GET_DONE = "gd";
const std::string PUT = "p";
const std::string PUT_REPLY = "pr";
const std::string DEL = "d";
const std::string DEL_REPLY = "dr";
// RI - RI
const std::string RI_TINFO_QUERY = "ri_tiq";
const std::string RI_TINFO_QUERY_REPLY = "ri_tiqr";
const std::string RI_GRIDFTP_PUT = "ri_gp";
const std::string RI_REPEAT_TRANS = "ri_rt";
const std::string RI_REPEAT_TRANS_REPLY = "ri_rtr";
const std::string RI_FAIL_REMOTE_GET = "ri_frg";

const int CL__RIMANAGER_MAX_MSG_SIZE = 1000;

class RIManager {
  struct trans_info {
    std::string lip, lport, tmpfs_dir;

    trans_info(std::string lip, std::string lport, std::string tmpfs_dir)
    : lip(lip), lport(lport), tmpfs_dir(tmpfs_dir)
    {}
  };

  struct data_info {
    std::string data_type;
    int size;
    COOR_T* gdim_;

    data_info(std::string data_type, int size, COOR_T* gdim_)
    : data_type(data_type), size(size), gdim_(gdim_)
    {}
  };

  protected:
    //ImpRem: Since handle_ core functions are called by client threads, properties must be thread-safe
    int cl_id, base_client_id, num_peer;
    DATA_ID_T data_id_t;
    std::string data_trans_protocol;

    patch_sdm::MsgCoder msg_coder;

    boost::shared_ptr<SDMSlave> sdm_slave_;
    boost::shared_ptr<DSDriver> ds_driver_;
    boost::shared_ptr<SDMNode> lsdm_node_; // Replacing bc_server--client
    boost::shared_ptr<RFPManager> rfp_manager_;
    // patch::thread_safe_map<int, boost::shared_ptr<trans_info> > ds_id__trans_info_map;
    patch::thread_safe_map<unsigned int, boost::shared_ptr<trans_info> > data_id_hash__trans_info_map;
    patch::thread_safe_map<unsigned int, boost::shared_ptr<data_info> > data_id_hash__data_info_map;
    patch::thread_safe_vector<std::string> busy_data_id_v;
    patch::thread_safe_vector<std::string> failed_remote_get_data_id_v;

    patch::syncer<unsigned int> ri_syncer;

    boost::asio::io_service io_service;
    boost::asio::signal_set signals;

    patch::thread_safe_map<std::string, boost::shared_ptr<boost::thread> > data_id__remote_get_t_map;
    //
    // Note: For nstx_sync_sim
    // boost::mutex ns_m;
    // int ns_counter;
    // patch::thread_safe_vector<int> ns_cl_id_v;
    // patch::thread_safe_vector<unsigned int> ns_sync_point_v;
  public:
    RIManager(int cl_id, int base_client_id, int num_peer, DATA_ID_T data_id_t,
              std::string lcontrol_lip, int lcontrol_lport, std::string join_lcontrol_lip, int join_lcontrol_lport,
              std::string data_trans_protocol, std::string ib_lip, std::list<std::string> ib_lport_list,
              std::string tcp_lip, int tcp_lport,
              std::string gftp_lintf, std::string gftp_lip, std::string gftp_lport, std::string tmpfs_dir);
    ~RIManager();
    void close();
    virtual std::string to_str();

    void handle_app_msg(std::map<std::string, std::string> msg_map);
    void handle_get(bool blocking, int cl_id, std::map<std::string, std::string> get_map);
    int handle_get_done(int cl_id, std::map<std::string, std::string> msg_map);
    void handle_put(int p_id, std::map<std::string, std::string> put_map);
    // void handle_del(key_ver_pair kv);

    int trans_info_query(int to_id, std::map<std::string, std::string> msg_map);
    void handle_rimsg(std::map<std::string, std::string> rimsg_map);
    void handle_tinfo_query(std::map<std::string, std::string> msg_map);
    int remote_get(std::map<std::string, std::string> msg_map);
    void remote_put(std::map<std::string, std::string> msg_map);
    void handle_tinfo_query_reply(std::map<std::string, std::string> msg_map);
    void handle_gridftp_put(std::map<std::string, std::string> msg_map);
    void handle_repeat_trans(std::map<std::string, std::string> msg_map);
    void handle_repeat_trans_reply(std::map<std::string, std::string> msg_map);
    void handle_fail_remote_get(std::map<std::string, std::string> msg_map);

    void handle_dm_act(std::map<std::string, std::string> dm_act_map);
    void handle_dm_move(std::map<std::string, std::string> msg_map);
    int handle_dm_del(std::map<std::string, std::string> msg_map);
};

/***********************************  MSRIManager : RIManager  ************************************/
class MSRIManager : public RIManager { // Markov Slave
  public:
    MSRIManager(int cl_id, int base_client_id, int num_peer,
                std::string lcontrol_lip, int lcontrol_lport, std::string join_lcontrol_lip, int join_lcontrol_lport,
                int ds_id, std::string control_lip, int control_lport, std::string join_control_lip, int join_control_lport,
                std::string data_trans_protocol, std::string ib_lip, std::list<std::string> ib_lport_list,
                std::string tcp_lip, int tcp_lport,
                std::string gftp_lintf, std::string gftp_lip, std::string gftp_lport, std::string tmpfs_dir)
    : RIManager(cl_id, base_client_id, num_peer, KV_DATA_ID,
                lcontrol_lip, lcontrol_lport, join_lcontrol_lip, join_lcontrol_lport,
                data_trans_protocol, ib_lip, ib_lport_list,
                tcp_lip, tcp_lport,
                gftp_lintf, gftp_lip, gftp_lport, tmpfs_dir)
    {
      sdm_slave_ = boost::make_shared<MSDMSlave>(ds_id, control_lip, control_lport, join_control_lip, join_control_lport,
                                                 boost::bind(&RIManager::handle_rimsg, this, _1), boost::bind(&RIManager::handle_dm_act, this, _1) );
      // Note: sdm_node within sdm_slave takes longer to connect especially for wide-area scenario which
      // makes the wait for join within sdm_node constructor useless. I had to move initialization of
      // lsdm_node here after sdm_slave is ready
      lsdm_node_ = boost::make_shared<SDMNode>(
                     "m", true,
                     boost::lexical_cast<int>(cl_id), lcontrol_lip, lcontrol_lport, join_lcontrol_lip, join_lcontrol_lport,
                     boost::bind(&RIManager::handle_app_msg, this, _1) );
      //
      log_(INFO, "constructed; \n" << to_str() )

      signals.async_wait(boost::bind(&RIManager::close, this) );
      io_service.run();
    }
    ~MSRIManager() { log_(INFO, "destructed.") }

    std::string to_str()
    {
      std::stringstream ss;
      ss << "\t sdm_slave= \n" << sdm_slave_->to_str() << "\n"
         << "\t lsdm_node= \n" << lsdm_node_->to_str() << "\n";
      return ss.str();
    }
};

/***********************************  SSRIManager : RIManager  ************************************/
class SSRIManager : public RIManager { // Spatial Slave
  public:
    SSRIManager(int cl_id, int base_client_id, int num_peer,
                std::string lcontrol_lip, int lcontrol_lport, std::string join_lcontrol_lip, int join_lcontrol_lport,
                int ds_id, std::string control_lip, int control_lport, std::string join_control_lip, int join_control_lport,
                std::string data_trans_protocol, std::string ib_lip, std::list<std::string> ib_lport_list,
                std::string tcp_lip, int tcp_lport,
                std::string gftp_lintf, std::string gftp_lip, std::string gftp_lport, std::string tmpfs_dir)
    : RIManager(cl_id, base_client_id, num_peer, LUCOOR_DATA_ID,
                lcontrol_lip, lcontrol_lport, join_lcontrol_lip, join_lcontrol_lport,
                data_trans_protocol, ib_lip, ib_lport_list,
                tcp_lip, tcp_lport,
                gftp_lintf, gftp_lip, gftp_lport, tmpfs_dir)
    {
      sdm_slave_ = boost::make_shared<SSDMSlave>(ds_id, control_lip, control_lport, join_control_lip, join_control_lport,
                                                 boost::bind(&RIManager::handle_rimsg, this, _1), boost::bind(&RIManager::handle_dm_act, this, _1) );
      lsdm_node_ = boost::make_shared<SDMNode>(
                     "m", true,
                     boost::lexical_cast<int>(cl_id), lcontrol_lip, lcontrol_lport, join_lcontrol_lip, join_lcontrol_lport,
                     boost::bind(&RIManager::handle_app_msg, this, _1) );
      //
      log_(INFO, "constructed; \n" << to_str() )

      signals.async_wait(boost::bind(&RIManager::close, this) );
      io_service.run();
    }
    ~SSRIManager() { log_(INFO, "destructed.") }

    std::string to_str()
    {
      std::stringstream ss;
      ss << "\t sdm_slave= \n" << sdm_slave_->to_str() << "\n"
         << "\t lsdm_node= \n" << lsdm_node_->to_str() << "\n";
      return ss.str();
    }
};

/***********************************  MMRIManager : RIManager  ************************************/
class MMRIManager : public RIManager { // Markov Master
  public:
    MMRIManager(int cl_id, int base_client_id, int num_peer,
                std::string lcontrol_lip, int lcontrol_lport, std::string join_lcontrol_lip, int join_lcontrol_lport,
                int ds_id, std::string control_lip, int control_lport, std::string join_control_lip, int join_control_lport,
                PALGO_T palgo_t, int max_num_key_ver_in_mpbuffer, bool w_prefetch,
                std::string data_trans_protocol, std::string ib_lip, std::list<std::string> ib_lport_list,
                std::string tcp_lip, int tcp_lport,
                std::string gftp_lintf, std::string gftp_lip, std::string gftp_lport, std::string tmpfs_dir)
    : RIManager(cl_id, base_client_id, num_peer, KV_DATA_ID,
                lcontrol_lip, lcontrol_lport, join_lcontrol_lip, join_lcontrol_lport,
                data_trans_protocol, ib_lip, ib_lport_list,
                tcp_lip, tcp_lport,
                gftp_lintf, gftp_lip, gftp_lport, tmpfs_dir)
    {
      boost::shared_ptr<SDMSlave> t_sdm_slave_(
        new MSDMMaster(ds_id, control_lip, control_lport, join_control_lip, join_control_lport,
                       boost::bind(&RIManager::handle_rimsg, this, _1), boost::bind(&RIManager::handle_dm_act, this, _1),
                       palgo_t, max_num_key_ver_in_mpbuffer, w_prefetch) );
      sdm_slave_ = t_sdm_slave_;

      lsdm_node_ = boost::make_shared<SDMNode>(
                     "m", true,
                     boost::lexical_cast<int>(cl_id), lcontrol_lip, lcontrol_lport, join_lcontrol_lip, join_lcontrol_lport,
                     boost::bind(&RIManager::handle_app_msg, this, _1) );
      //
      log_(INFO, "constructed; \n" << to_str() )

      signals.async_wait(boost::bind(&RIManager::close, this) );
      io_service.run();
    }
    ~MMRIManager() { log_(INFO, "destructed.") }

    std::string to_str()
    {
      std::stringstream ss;
      ss << "\t sdm_slave= \n" << sdm_slave_->to_str() << "\n"
         << "\t lsdm_node= \n" << lsdm_node_->to_str() << "\n";
      return ss.str();
    }
};

/***********************************  SMRIManager : RIManager  ************************************/
class SMRIManager : public RIManager { // Spatial Master
  public:
    SMRIManager(int cl_id, int base_client_id, int num_peer,
                std::string lcontrol_lip, int lcontrol_lport, std::string join_lcontrol_lip, int join_lcontrol_lport,
                int ds_id, std::string control_lip, int control_lport, std::string join_control_lip, int join_control_lport,
                SALGO_T salgo_t, COOR_T* lcoor_, COOR_T* ucoor_, int sexpand_length, bool w_prefetch,
                std::string data_trans_protocol, std::string ib_lip, std::list<std::string> ib_lport_list,
                std::string tcp_lip, int tcp_lport,
                std::string gftp_lintf, std::string gftp_lip, std::string gftp_lport, std::string tmpfs_dir)
    : RIManager(cl_id, base_client_id, num_peer, LUCOOR_DATA_ID,
                lcontrol_lip, lcontrol_lport, join_lcontrol_lip, join_lcontrol_lport,
                data_trans_protocol, ib_lip, ib_lport_list,
                tcp_lip, tcp_lport,
                gftp_lintf, gftp_lip, gftp_lport, tmpfs_dir)
    {
      boost::shared_ptr<SDMSlave> t_sdm_slave_(
        new SSDMMaster(ds_id, control_lip, control_lport, join_control_lip, join_control_lport,
                       boost::bind(&RIManager::handle_rimsg, this, _1), boost::bind(&RIManager::handle_dm_act, this, _1),
                       salgo_t, lcoor_, ucoor_, sexpand_length, w_prefetch) );
      sdm_slave_ = t_sdm_slave_;

      lsdm_node_ = boost::make_shared<SDMNode>(
                     "m", true,
                     boost::lexical_cast<int>(cl_id), lcontrol_lip, lcontrol_lport, join_lcontrol_lip, join_lcontrol_lport,
                     boost::bind(&RIManager::handle_app_msg, this, _1) );
      //
      log_(INFO, "constructed; \n" << to_str() )

      signals.async_wait(boost::bind(&RIManager::close, this) );
      io_service.run();
    }
    ~SMRIManager() { log_(INFO, "destructed.") }

    std::string to_str()
    {
      std::stringstream ss;
      ss << "\t sdm_slave= \n" << sdm_slave_->to_str() << "\n"
         << "\t lsdm_node= \n" << lsdm_node_->to_str() << "\n";
      return ss.str();
    }
};

#endif //end of _REMOTE_INTERACT_H_

extension: h


text:
package api

import (
	"context"

	"github.com/testground/testground/pkg/config"
	"github.com/testground/testground/pkg/rpc"
)

type Engine interface {
	BuilderByName(name string) (Builder, bool)
	RunnerByName(name string) (Runner, bool)

	ListBuilders() map[string]Builder
	ListRunners() map[string]Runner

	DoBuild(context.Context, *Composition, string, string, string, *rpc.OutputWriter) ([]*BuildOutput, error)
	DoRun(context.Context, *Composition, *rpc.OutputWriter) (*RunOutput, error)
	DoCollectOutputs(ctx context.Context, runner string, runID string, ow *rpc.OutputWriter) error
	DoTerminate(ctx context.Context, runner string, ow *rpc.OutputWriter) error
	DoHealthcheck(ctx context.Context, runner string, fix bool, ow *rpc.OutputWriter) (*HealthcheckReport, error)

	EnvConfig() config.EnvConfig
	Context() context.Context
}

repository: alanshaw/testground

repo_name: alanshaw/testground

gha_license_id: NOASSERTION


text:
package connectionutils_test

import (
	"net"
	"testing"

	"github.com/normegil/connectionutils"
	"github.com/normegil/interval"
)

func TestAvailable(t *testing.T) {
	ip := "127.0.0.1"
	port := 50900
	available := connectionutils.TCPPortAvalaible(&net.TCPAddr{
		IP:   net.ParseIP(ip),
		Port: port,
	})
	if !available {
		t.Errorf("Port not available {%s:%d}", ip, port)
	}
}

func TestNotAvailable(t *testing.T) {
	ip := "127.0.0.1"
	port := 50900
	tcpAddr := &net.TCPAddr{
		IP:   net.ParseIP(ip),
		Port: port,
	}
	defer Block(t, tcpAddr)()

	available := connectionutils.TCPPortAvalaible(tcpAddr)
	if available {
		t.Errorf("Port available {%s:%d} but should be used", ip, port)
	}
}

func TestSelectPort_SameIP(t *testing.T) {
	ports := interval.Test_ParseIntervalInteger(t, "[50900;50900]")

	tests := []string{
		"127.0.0.1",
		"192.168.0.1",
		"8.8.8.8",
		"::1",
		"2001:0db8:0000:85a3:0000:0000:ac1f:8001",
	}

	for _, test := range tests {
		ip := net.ParseIP(test)
		addr := connectionutils.SelectPort(ip, *ports)
		if addr.IP.String() != ip.String() {
			t.Errorf("Given IP (%+v) doesn't correspond to returned IP (%+v)", ip, addr.IP)
		}
	}
}

func TestSelectPort(t *testing.T) {
	ip := net.ParseIP("127.0.0.1")
	tests := []struct {
		name          string
		portsInterval string
		portsExcluded []int
		portsBlocked  []int
		expectedPort  int
	}{
		{"No port blocked", "[50900;50900]", []int{}, []int{}, 50900},
		{"First port blocked", "[50900;50901]", []int{}, []int{50900}, 50901},
		{"Last port blocked", "[50900;50901]", []int{}, []int{50901}, 50900},
		{"All but last port blocked", "[50900;50904]", []int{}, []int{50900, 50901, 50902, 50903}, 50904},
		{"Excluding first port", "]50900;50901]", []int{}, []int{}, 50901},
		{"Excluding last port", "]50900;50902[", []int{}, []int{}, 50901},
		{"No port avalaible", "[50900;50900]", []int{}, []int{50900}, 0},
		{"Exluding port in interval", "[50900;50902]", []int{50900}, []int{}, 50901},
		{"Exluding port list in interval", "[50900;50902]", []int{50900, 50901}, []int{}, 50902},
	}
	for _, test := range tests {
		t.Run(test.name, func(t *testing.T) {
			for _, toBlock := range test.portsBlocked {
				defer Block(t, &net.TCPAddr{
					IP:   ip,
					Port: toBlock,
				})()
			}
			ports := interval.Test_ParseIntervalInteger(t, test.portsInterval)
			addr := connectionutils.SelectPortExcluding(ip, *ports, test.portsExcluded)
			if test.expectedPort != addr.Port {
				t.Errorf("%s: Selected port (%d) doesn't correspond to expected port (%d)", test.portsInterval, addr.Port, test.expectedPort)
			}
		})
	}
}

func Block(t *testing.T, tcpAddr *net.TCPAddr) func() error {
	listener, err := net.ListenTCP("tcp", tcpAddr)
	if nil != err {
		t.Fatal(err)
	}
	return listener.Close
}

license: Unlicense

repository: normegil/connectionutils

repo_name: normegil/connectionutils


text:
# Recipe created by recipetool
# This is the basis of a recipe and may need further editing in order to be fully functional.
# (Feel free to remove these comments when editing.)

SUMMARY = "Advanced GPIO for the Raspberry Pi. Extends RPi.GPIO with PWM, GPIO interrups, TCP socket interrupts, command line tools and more"
HOMEPAGE = "https://github.com/metachris/RPIO"
# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is
# your responsibility to verify that the values are complete and correct.
#
# The following license files were not able to be identified and are
# represented as "Unknown" below, you will need to check them yourself:
#   debian/copyright
# NOTE: Original package / source metadata indicates license is: LGPL-3.0+
#
# NOTE: multiple licenses have been detected; they have been separated with &
# in the LICENSE value for now since it is a reasonable assumption that all
# of the licenses apply. If instead there is a choice between the multiple
# licenses then you should change the value to separate the licenses with |
# instead of &. If there is any doubt, check the accompanying documentation
# to determine which situation is applicable.
LICENSE = "LGPLv3 & Unknown & LGPL-3.0+"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=bb3ca60759f3202f1ae42e3519cd06bc \
                    file://debian/copyright;md5=d649edf5fe0d6df23bda355c81f75603"

SRC_URI = "git://github.com/JamesGKent/RPIO.git;branch=v2;protocol=https"

# Modify these as desired
PV = "0.10.1+git${SRCPV}"
SRCREV = "b1112f52ef485d0c0a66c070526fd98b863b05b2"

S = "${WORKDIR}/git"

inherit setuptools

# WARNING: the following rdepends are determined through basic analysis of the
# python sources, and might not be 100% accurate.
RDEPENDS_${PN} += "python-core python-curses python-io python-lang python-logging python-netclient python-subprocess python-textutils python-threading"

# WARNING: We were unable to map the following python package/module
# dependencies to the bitbake packages which include them:
#    urllib.request

do_configure[noexec] = "1"

repository: DengkeDu/meta-dengke

repo_name: DengkeDu/meta-dengke

extension: bb


text:
package config

import (
	"flag"
	"fmt"
	"math/rand"
	"net"
	"strings"
	"time"
)

// AppConf 应用全局参数
var AppConf appConf

func init() {
	var mode string
	flag.BoolVar(&AppConf.Debug, "debug", false, "调试模式，默认：false")
	flag.StringVar(&AppConf.IP, "ip", "", "监听的IP地址，默认：127.0.0.1")
	flag.IntVar(&AppConf.Port, "port", 0, "服务端口，默认：随机")
	flag.StringVar(&mode, "mode", "app", "运行模式：server：API服务模式；web：Web模式；app：App模式(试验)，默认：app")
	// flag.StringVar(&mode, "mode", "web", "运行模式：server：API服务模式；web：Web模式；默认：web")
	flag.StringVar(&AppConf.PrefixPath, "prefix", "", "Web模式下有效，WebUI的路径前缀，默认为空")
	flag.StringVar(&AppConf.Token, "token", "", "API授权令牌，为空时不校验，默认为空")
	flag.Parse()

	if AppConf.IP == "" {
		AppConf.IP = "127.0.0.1"
	}

	if AppConf.Port <= 0 {
		AppConf.Port = newPort(AppConf.IP)
	}

	switch strings.ToLower(mode) {
	case "server":
		AppConf.IsServerMode = true
	case "web":
		AppConf.IsWebMode = true
	case "app":
		AppConf.IsAppMode = true
	default:
		AppConf.IsWebMode = true
	}

	if AppConf.IsServerMode || AppConf.IsAppMode {
		AppConf.PrefixPath = ""
	}

	AppConf.Name = "dproxy"
	AppConf.Version = "0.4.0"
	AppConf.Started = time.Now().Unix()
}

type appConf struct {
	Name         string
	Version      string
	Debug        bool
	Mode         string
	IP           string
	Port         int
	PrefixPath   string
	Token        string
	Started      int64
	IsServerMode bool
	IsWebMode    bool
	IsAppMode    bool
}

//newPort 查找可用端口
func newPort(ip string) int {
	i := 0
	for {
		if i > 10 {
			return 8080
		}

		r := rand.New(rand.NewSource(time.Now().UnixNano()))
		port := r.Intn(60000)
		if port <= 0 {
			continue
		}

		conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", ip, port))
		if err != nil {
			if strings.Contains(err.Error(), "refused") {
				return port
			}

			i++
			continue
		}
		conn.Close()
	}
}

repository: iamsee/dproxy

repo_name: iamsee/dproxy


text:
#ifndef OCLINT_EXCEPTION_GENERICEXCEPTION_H
#define OCLINT_EXCEPTION_GENERICEXCEPTION_H

#include <string>

using namespace std;

class GenericException {
public:
  const string message;

  GenericException(const string& exceptionMessage);
};

#endif