text:
ire x1="13.679065625" y1="24.211040625" x2="14.619159375" y2="24.211040625" width="0.4064" layer="1"/>
</signal>
<signal name="N$3">
<contactref element="U3" pad="1"/>
<contactref element="U4" pad="2" route="any" routetag="DI"/>
<wire x1="14.972609375" y1="25.873890625" x2="14.1559875" y2="26.6905125" width="0.4064" layer="1"/>
<wire x1="14.1559875" y1="26.6905125" x2="13.97" y2="27.139525" width="0.4064" layer="1" curve="-45"/>
<wire x1="13.97" y1="27.139525" x2="13.97" y2="31.486975" width="0.4064" layer="1"/>
<wire x1="17.122375" y1="33.55316875" x2="16.87653125" y2="33.655" width="0.4064" layer="1" curve="45"/>
<wire x1="16.87653125" y1="33.655" x2="15.875" y2="33.655" width="0.4064" layer="1"/>
<wire x1="15.875" y1="33.655" x2="14.1559875" y2="31.9359875" width="0.4064" layer="1"/>
<wire x1="14.1559875" y1="31.9359875" x2="13.97" y2="31.486975" width="0.4064" layer="1" curve="45"/>
</signal>
<signal name="N$4">
<contactref element="U4" pad="1"/>
<contactref element="U5" pad="2" route="any" routetag="DI"/>
<wire x1="17.647703125" y1="35.1699625" x2="16.6959875" y2="36.121678125" width="0.4064" layer="1"/>
<wire x1="16.6959875" y1="36.121678125" x2="16.51" y2="36.570690625" width="0.4064" layer="1" curve="-45"/>
<wire x1="16.51" y1="36.570690625" x2="16.51" y2="39.741975" width="0.4064" layer="1"/>
<wire x1="20.5884" y1="42.5824625" x2="20.49795625" y2="42.545" width="0.4064" layer="1" curve="-45"/>
<wire x1="20.49795625" y1="42.545" x2="19.05" y2="42.545" width="0.4064" layer="1"/>
<wire x1="19.05" y1="42.545" x2="16.6959875" y2="40.1909875" width="0.4064" layer="1"/>
<wire x1="16.6959875" y1="40.1909875" x2="16.51" y2="39.741975" width="0.4064" layer="1" curve="45"/>
</signal>
<signal name="N$5">
<contactref element="U5" pad="1"/>
<contactref element="U6" pad="2" route="any" routetag="DI"/>
<wire x1="21.27985" y1="44.135490625" x2="21.1409875" y2="44.274353125" width="0.4064" layer="1"/>
<wire x1="21.1409875" y1="44.274353125" x2="20.955" y2="44.723365625" width="0.4064" layer="1" curve="-45"/>
<wire x1="20.955" y1="44.723365625" x2="20.955" y2="48.895" width="0.4064" layer="1"/>
<wire x1="20.955" y1="48.895" x2="23.3090125" y2="51.2490125" width="0.4064" layer="1"/>
<wire x1="23.3090125" y1="51.2490125" x2="23.758025" y2="51.435" width="0.4064" layer="1" curve="-45"/>
<wire x1="23.758025" y1="51.435" x2="24.13" y2="51.435" width="0.4064" layer="1"/>
<wire x1="24.13" y1="51.435" x2="24.1790125" y2="51.3859875" width="0.4064" layer="1"/>
<wire x1="24.1790125" y1="51.3859875" x2="24.628025" y2="51.2" width="0.4064" layer="1" curve="45"/>
<wire x1="24.628025" y1="51.2" x2="24.97925" y2="51.2" width="0.4064" layer="1"/>
</signal>
<signal name="N$6">
<contactref element="U6" pad="1"/>
<contactref element="U7" pad="2" route="any" routetag="DI"/>
<wire x1="25.82925" y1="52.672240625" x2="25.5859875" y2="52.915503125" width="0.4064" layer="1"/>
<wire x1="25.5859875" y1="52.915503125" x2="25.4" y2="53.364515625" width="0.4064" layer="1" curve="-45"/>
<wire x1="25.4" y1="53.364515625" x2="25.4" y2="56.515" width="0.4064" layer="1"/>
<wire x1="25.4" y1="56.515" x2="28.01036875" y2="59.12536875" width="0.4064" layer="1"/>
<wire x1="28.01036875" y1="59.12536875" x2="28.45938125" y2="59.31135625" width="0.4064" layer="1" curve="-45"/>
<wire x1="28.45938125" y1="59.31135625" x2="30.246828125" y2="59.31135625" width="0.4064" layer="1"/>
</signal>
<signal name="N$7">
<contactref element="U7" pad="1"/>
<contactref element="U8" pad="2" route="any" routetag="DI"/>
<wire x1="36.333415625" y1="66.827665625" x2="36.03706875" y2="67.1240125" width="0.4064" layer="1"/>
<wire x1="36.03706875" y1="67.1240125" x2="35.58805625" y2="67.31" width="0.4064" layer="1" curve="45"/>
<wire x1="35.58805625" y1="67.31" x2="34.29" y2="67.31" width="0.4064" layer="1"/>
<wire x1="34.29" y1="67.31" x2="31.432053125" y2="64.452053125" width="0.4064" layer="1"/>
<wire x1="31.432053125" y1="64.452053125" x2="31.246065625" y2="64.003040625" width="0.4064" layer="1" curve="45"/>
<wire x1="31.246065625" y1="64.003040625" x2="31.246065625" y2="60.686684375" width="0.4064" layer="1"/>
</signal>
<signal name="N$8">
<contactref element="U8" pad="1"/>
<contactref element="U9" pad="2" route="any" routetag="DI"/>
<wire x1="43.17233125" y1="73.66658125" x2="42.7299" y2="74.1090125" width="0.4064" layer="1"/>
<wire x1="42.7299" y1="74.1090125" x2="42.2808875" y2="74.295" width="0.4064" layer="1" curve="45"/>
<wire x1="42.2808875" y1="74.295" x2="41.275" y2="74.295" width="0.4064" layer="1"/>
<wire x1="41.275" y1="74.295" x2="37.656925" y2="70.676925" width="0.4064" layer="1"/>
<wire x1="37.656925" y1="70.676925" x2="37.4709375" y2="70.2279125" width="0.4064" layer="1" curve="45"/>
<wire x1="37.4709375" y1="70.2279125" x2="37.4709375" y2="68.0910125" width="0.4064" layer="1"/>
</signal>
<signal name="N$9">
<contactref element="U9" pad="1"/>
<contactref element="U10" pad="2" route="any" routetag="DI"/>
<wire x1="50.688640625" y1="79.75316875" x2="49.982796875" y2="80.4590125" width="0.4064" layer="1"/>
<wire x1="49.982796875" y1="80.4590125" x2="49.533784375" y2="80.645" width="0.4064" layer="1" curve="45"/>
<wire x1="49.533784375" y1="80.645" x2="48.895" y2="80.645" width="0.4064" layer="1"/>
<wire x1="48.895" y1="80.645" x2="44.621665625" y2="76.371665625" width="0.4064" layer="1"/>
<wire x1="44.621665625" y1="76.371665625" x2="44.435678125" y2="75.922653125" width="0.4064" layer="1" curve="45"/>
<wire x1="44.435678125" y1="75.922653125" x2="44.435678125" y2="74.804103125" width="0.4064" layer="1"/>
</signal>
<signal name="N$10">
<contactref element="U10" pad="1"/>
<contactref element="U11" pad="2" route="any" routetag="DI"/>
<wire x1="58.8" y1="85.020746875" x2="57.646734375" y2="86.1740125" width="0.4064" layer="1"/>
<wire x1="57.646734375" y1="86.1740125" x2="57.197721875" y2="86.36" width="0.4064" layer="1" curve="45"/>
<wire x1="57.197721875" y1="86.36" x2="56.515" y2="86.36" width="0.4064" layer="1"/>
<wire x1="56.515" y1="86.36" x2="52.249959375" y2="82.094959375" width="0.4064" layer="1"/>
<wire x1="52.249959375" y1="82.094959375" x2="52.063971875" y2="81.645946875" width="0.4064" layer="1" curve="45"/>
<wire x1="52.063971875" y1="81.645946875" x2="52.063971875" y2="80.752403125" width="0.4064" layer="1"/>
</signal>
<signal name="N$11">
<contactref element="U11" pad="1"/>
<contactref element="U12" pad="2" route="any" routetag="DI"/>
<wire x1="67.417534375" y1="89.411596875" x2="66.21011875" y2="90.6190125" width="0.4064" layer="1"/>
<wire x1="66.21011875" y1="90.6190125" x2="65.76110625" y2="90.805" width="0.4064" layer="1" curve="45"/>
<wire x1="65.76110625" y1="90.805" x2="64.77" y2="90.805" width="0.4064" layer="1"/>
<wire x1="64.77" y1="90.805" x2="60.458228125" y2="86.493228125" width="0.4064" layer="1"/>
<wire x1="60.458228125" y1="86.493228125" x2="60.272240625" y2="86.044215625" width="0.4064" layer="1" curve="45"/>
<wire x1="60.272240625" y1="86.044215625" x2="60.272240625" y2="85.870746875" width="0.4064" layer="1"/>
</signal>
<signal name="N$12">
<contactref element="U12" pad="1"/>
<contactref element="U13" pad="2" route="any" routetag="DI"/>
<wire x1="76.446828125" y1="92.877621875" x2="75.5304375" y2="93.7940125" width="0.4064" layer="1"/>
<wire x1="75.5304375" y1="93.7940125" x2="75.081425" y2="93.98" width="0.4064" layer="1" curve="45"/>
<wire x1="68.970559375" y1="90.10305" x2="72.661521875" y2="93.7940125" width="0.4064" layer="1"/>
<wire x1="72.661521875" y1="93.7940125" x2="73.110534375" y2="93.98" width="0.4064" layer="1" curve="-45"/>
<wire x1="73.110534375" y1="93.98" x2="75.081425" y2="93.98" width="0.4064" layer="1"/>
</signal>
<signal name="N$13">
<contactref element="U13" pad="1"/>
<contactref element="U14" pad="2" route="any" routetag="DI"/>
<wire x1="78.063625" y1="93.40295" x2="81.6296875" y2="96.9690125" width="0.4064" layer="1"/>
<wire x1="81.6296875" y1="96.9690125" x2="82.0787" y2="97.155" width="0.4064" layer="1" curve="-45"/>
<wire x1="82.0787" y1="97.155" x2="84.455" y2="97.155" width="0.4064" layer="1"/>
<wire x1="84.455" y1="97.155" x2="85.60296875" y2="96.00703125" width="0.4064" layer="1"/>
<wire x1="85.60296875" y1="96.00703125" x2="85.78895625" y2="95.55801875" width="0.4064" layer="1" curve="-45"/>
<wire x1="85.78895625" y1="95.55801875" x2="85.78895625" y2="95.3808375" width="0.4064" layer="1"/>
</signal>
<signal name="N$14">
<contactref element="U14" pad="1"/>
<contactref element="U15" pad="2" route="any" routetag="DI"/>
<wire x1="87.451809375" y1="95.7342875" x2="89.956534375" y2="98.2390125" width="0.4064" layer="1"/>
<wire x1="89.956534375" y1="98.2390125" x2="90.405546875" y2="98.425" width="0.4064" layer="1" curve="-45"/>
<wire x1="90.405546875" y1="98.425" x2="94.615" y2="98.425" width="0.4064" layer="1"/>
<wire x1="94.615" y1="98.425" x2="95.15558125" y2="97.88441875" width="0.4064" layer="1"/>
<wire x1="95.15558125" y1="97.88441875" x2="95.34156875" y2="97.43540625" width="0.4064" layer="1" curve="-45"/>
<wire x1="95.34156875" y1="97.43540625" x2="95.34156875" y2="96.893821875" width="0.4064" layer="1"/>
</signal>
<signal name="VCC">
<contactref element="U16" pad="3"/>
<contactref element="C1" pad="1"/>
<contactref element="J1" pad="PWR"/>
<wire x1="50.8" y1="57.32" x2="50.727" y2="57.393" width="0.4064" layer="16"/>
<wire x1="50.727" y1="57.393" x2="48.006" y2="57.393" width="0.6096" layer="16"/>
<contactref element="C23" pad="1"/>
<contactref element="U$4" pad="2"/>
<contactref element="U$4" pad="3"/>
<wire x1="29.555" y1="6.675" x2="29.555" y2="6.025" width="0.4064" layer="1"/>
<wire x1="34.02" y1="11.43" x2="33.655" y2="11.43" width="1.016" layer="1"/>
<wire x1="33.655" y1="11.43" x2="31.75" y2="9.525" width="1.016" layer="1"/>
<wire x1="31.75" y1="9.525" x2="31.75" y2="7.62" width="1.016" layer="1"/>
<wire x1="31.75" y1="7.62" x2="31.75" y2="7.493" width="1.016" layer="1"/>
<wire x1="31.75" y1="7.493" x2="30.607" y2="6.35" width="1.016" layer="1"/>
<wire x1="30.607" y1="6.35" x2="29.21" y2="6.35" width="1.016" layer="1"/>
<wire x1="29.555" y1="6.025" x2="29.535" y2="6.025" width="0.4064" layer="1"/>
<wire x1="29.535" y1="6.025" x2="29.21" y2="6.35" width="0.4064" layer="1"/>
<wire x1="33.02" y1="7.25" x2="32.12" y2="7.25" width="0.4064" layer="1"/>
<wire x1="32.12" y1="7.25" x2="31.75" y2="7.62" width="0.4064" layer="1"/>
<wire x1="34.02" y1="11.43" x2="46.355" y2="56.515" width="0.6096" layer="1"/>
<via x="46.355" y="56.515" extent="1-16" drill="0.6"/>
<wire x1="46.355" y1="56.515" x2="48.006" y2="57.393" width="0.6096" layer="16"/>
</signal>
<signal name="GND">
<contactref element="U5" pad="6"/>
<contactref element="U4" pad="6"/>
<contactref element="U3" pad="6"/>
<contactref element="U2" pad="6"/>
<contactref element="U1" pad="6"/>
<contactref element="U15" pad="6"/>
<contactref element="U14" pad="6"/>
<contactref element="U13" pad="6"/>
<contactref element="U12" pad="6"/>
<contactref element="U11" pad="6"/>
<contactref element="U10" pad="6"/>
<contactref element="U9" pad="6"/>
<contactref element="U8" pad="6"/>
<contactref element="U7" pad="6"/>
<contactref element="U6" pad="6"/>
<contactref element="U16" pad="1"/>
<contactref element="C1" pad="2"/>
<contactref element="C2" pad="1"/>
<contactref element="Q1" pad="2"/>
<contactref element="U$1" pad="15"/>
<contactref element="C4" pad="2"/>
<contactref element="C3" pad="2"/>
<contactref element="C5" pad="2"/>
<contactref element="C6" pad="2"/>
<contactref element="JP1" pad="3"/>
<contactref element="JP2" pad="5"/>
<contactref element="U$2" pad="4"/>
<contactref element="U$3" pad="P$3"/>
<contactref element="C7" pad="2"/>
<contactref element="C9" pad="2"/>
<contactref element="C10" pad="2"/>
<contactref element="C11" pad="2"/>
<contactref element="C12" pad="2"/>
<contactref element="C13" pad="2"/>
<contactref element="C14" pad="2"/>
<contactref element="C15" pad="2"/>
<contactref element="C16" pad="2"/>
<contactref element="C17" pad="2"/>
<contactref element="C18" pad="2"/>
<contactref element="C19" pad="2"/>
<contactref element="C20" pad="2"/>
<contactref element="C21" pad="2"/>
<contactref element="C22" pad="2"/>
<contactref element="C8" pad="2"/>
<wire x1="21.297" y1="4.953" x2="21.356003125" y2="6.332853125" width="0.8128" layer="1"/>
<wire x1="21.356003125" y1="6.332853125" x2="21.673340625" y2="13.75415" width="0.8128" layer="1"/>
<wire x1="17.4" y1="6.7" x2="21.356003125" y2="6.332853125" width="0.4064" layer="1"/>
<wire x1="21.673340625" y1="13.75415" x2="21.905490625" y2="15.188953125" width="0.8128" layer="1"/>
<wire x1="21.905490625" y1="15.188953125" x2="23.056425" y2="22.302275" width="0.8128" layer="1"/>
<wire x1="18.057578125" y1="15.84738125" x2="21.905490625" y2="15.188953125" width="0.4064" layer="1"/>
<wire x1="23.056425" y1="22.302275" x2="23.5359" y2="23.931028125" width="0.8128" layer="1"/>
<wire x1="23.5359" y1="23.931028125" x2="25.573396875" y2="30.852334375" width="0.8128" layer="1"/>
<wire x1="25.573396875" y1="30.852334375" x2="26.069940625" y2="32.123259375" width="0.8128" layer="1"/>
<wire x1="26.069940625" y1="32.123259375" x2="28.7165125" y2="38.897271875" width="0.8128" layer="1"/>
<wire x1="28.7165125" y1="38.897271875" x2="29.52135625" y2="40.48185625" width="0.8128" layer="1"/>
<wire x1="29.52135625" y1="40.48185625" x2="32.74011875" y2="46.819" width="0.8128" layer="1"/>
<wire x1="32.74011875" y1="46.819" x2="33.49465" y2="47.940728125" width="0.8128" layer="1"/>
<wire x1="33.49465" y1="47.940728125" x2="37.6446625" y2="54.11038125" width="0.8128" layer="1"/>
<wire x1="37.6446625" y1="54.11038125" x2="38.593178125" y2="55.353234375" width="0.8128" layer="1"/>
<wire x1="38.593178125" y1="55.353234375" x2="42.922671875" y2="61.0262375" width="0.8128" layer="1"/>
<wire x1="42.922671875" y1="61.0262375" x2="43.97988125" y2="62.06165" width="0.8128" layer="1"/>
<wire x1="43.97988125" y1="62.06165" x2="49.082759375" y2="67.059325" width="0.8128" layer="1"/>
<wire x1="55.871615625" y1="72.464334375" x2="57.608565625" y2="73.58295625" width="0.8128" layer="1"/>
<wire x1="57.608565625" y1="73.58295625" x2="60.43089375" y2="75.400575" width="0.8128" layer="1"/>
<wire x1="60.43089375" y1="75.400575" x2="60.590675" y2="75.503475" width="0.8128" layer="1"/>
<wire x1="60.590675" y1="75.503475" x2="63.29" y2="77.241878125" width="0.8128" layer="1"/>
<wire x1="63.29" y1="77.241878125" x2="64.8104125" y2="78.026709375" width="0.8128" layer="1"/>
<wire x1="64.8104125" y1="78.026709375" x2="71.084725" y2="81.265484375" width="0.8128" layer="1"/>
<wire x1="71.084725" y1="81.265484375" x2="72.650078125" y2="81.8343875" width="0.8128" layer="1"/>
<wire x1="72.650078125" y1="81.8343875" x2="79.3836625" y2="84.2816" width="0.8128" layer="1"/>
<wire x1="79.3836625" y1="84.2816" x2="81.2067375" y2="84.74390625" width="0.8128" layer="1"/>
<wire x1="81.2067375" y1="84.74390625" x2="87.806721875" y2="86.417571875" width="0.8128" layer="1"/>
<wire x1="87.806721875" y1="86.417571875" x2="89.581528125" y2="86.678365625" width="0.8128" layer="1"/>
<wire x1="89.581528125" y1="86.678365625" x2="90.935109375" y2="86.877265625" width="0.8128" layer="1"/>
<wire x1="90.935109375" y1="86.877265625" x2="94.449846875" y2="87.67365625" width="0.8128" layer="1"/>
<wire x1="19.66771875" y1="24.875915625" x2="23.5359" y2="23.931028125" width="0.4064" layer="1"/>
<wire x1="22.212775" y1="33.68668125" x2="22.225" y2="33.655" width="0.4064" layer="1"/>
<wire x1="22.225" y1="33.655" x2="26.069940625" y2="32.123259375" width="0.4064" layer="1"/>
<wire x1="25.66486875" y1="42.183153125" x2="26.035" y2="41.91" width="0.4064" layer="1"/>
<wire x1="26.035" y1="41.91" x2="29.52135625" y2="40.48185625" width="0.4064" layer="1"/>
<wire x1="29.986171875" y1="50.272240625" x2="33.49465" y2="47.940728125" width="0.4064" layer="1"/>
<wire x1="35.129346875" y1="57.865315625" x2="38.593178125" y2="55.353234375" width="0.4064" layer="1"/>
<wire x1="41.038034375" y1="64.879184375" x2="43.97988125" y2="62.06165" width="0.4064" layer="1"/>
<wire x1="55.871615625" y1="72.464334375" x2="50.5496875" y2="68.227234375" width="0.8128" layer="1"/>
<wire x1="50.5496875" y1="68.227234375" x2="49.082759375" y2="67.059325" width="0.8128" layer="1"/>
<wire x1="47.64750625" y1="71.23700625" x2="50.486140625" y2="68.1766375" width="0.4064" layer="1"/>
<wire x1="49.082759375" y1="67.059325" x2="50.486140625" y2="68.1766375" width="0.4064" layer="1"/>
<wire x1="62.672240625" y1="81.713825" x2="64.8104125" y2="78.026709375" width="0.4064" layer="1"/>
<wire x1="70.922896875" y1="85.71803125" x2="72.650078125" y2="81.8343875" width="0.4064" layer="1"/>
<wire x1="79.54690625" y1="88.837878125" x2="81.2067375" y2="84.74390625" width="0.4064" layer="1"/>
<wire x1="88.449784375" y1="91.039178125" x2="89.581528125" y2="86.678365625" width="0.4064" layer="1"/>
<wire x1="94.449846875" y1="87.67365625" x2="96.012" y2="87.884" width="0.8128" layer="1"/>
<wire x1="96.012" y1="87.884" x2="97.533990625" y2="92.297815625" width="0.4064" layer="1"/>
<contactref element="J1" pad="GND"/>
<contactref element="J1" pad="GNDBREAK"/>
<wire x1="28.02" y1="11.43" x2="25.69585" y2="13.75415" width="0.8128" layer="1"/>
<wire x1="25.69585" y1="13.75415" x2="21.673340625" y2="13.75415" width="0.8128" layer="1"/>
<wire x1="28.02" y1="11.43" x2="31.02" y2="14.43" width="0.8128" layer="1"/>
<wire x1="31.02" y1="14.43" x2="31.02" y2="16.13" width="0.8128" layer="1"/>
<contactref element="CON1" pad="2"/>
<wire x1="49.85" y1="59.42" x2="49.623" y2="59.193" width="0.4064" layer="16"/>
<wire x1="49.623" y1="59.193" x2="48.006" y2="59.193" width="0.4064" layer="16"/>
<wire x1="49.85" y1="59.42" x2="49.9" y2="59.47" width="0.4064" layer="16"/>
<wire x1="49.9" y1="59.47" x2="49.9" y2="60.96" width="0.4064" layer="16"/>
<contactref element="U$4" pad="1"/>
<contactref element="C23" pad="2"/>
<contactref element="CON2" pad="2"/>
<contactref element="C24" pad="2"/>
<contactref element="U$5" pad="P$1"/>
<wire x1="54.885340625" y1="76.869121875" x2="57.608565625" y2="73.58295625" width="0.4064" layer="1"/>
<wire x1="29.845" y1="2.54" x2="29.845" y2="9.605" width="1.016" layer="16"/>
<wire x1="29.845" y1="9.605" x2="28.02" y2="11.43" width="1.016" layer="16"/>
<wire x1="29.555" y1="5.375" x2="32.31" y2="5.375" width="0.4064" layer="1"/>
<wire x1="32.31" y1="5.375" x2="33.02" y2="5.45" width="0.4064" layer="1"/>
<wire x1="33.02" y1="5.45" x2="32.12" y2="5.45" width="0.4064" layer="1"/>
<wire x1="32.12" y1="5.45" x2="29.845" y2="3.175" width="0.4064" layer="1"/>
<wire x1="29.845" y1="3.175" x2="29.845" y2="2.54" width="0.4064" layer="1"/>
<contactref element="BAT1" pad="GND"/>
<wire x1="82.705" y1="78.585" x2="82.705" y2="78.26" width="0.4064" layer="16"/>
<wire x1="82.705" y1="78.26" x2="77.47" y2="73.025" width="0.4064" layer="16"/>
<wire x1="77.47" y1="73.025" x2="74.3712" y2="73.025" width="0.4064" layer="16"/>
<wire x1="74.3712" y1="73.025" x2="72.39" y2="75.0062" width="0.4064" layer="16"/>
<wire x1="51.562" y1="64.908" x2="53.34" y2="64.858" width="0.4064" layer="16"/>
<wire x1="61.96" y1="64.1092" x2="64.1092" y2="64.1092" width="0.4064" layer="16"/>
<wire x1="64.1092" y1="64.1092" x2="64.516" y2="64.516" width="0.4064" layer="16"/>
<wire x1="64.516" y1="64.516" x2="64.516" y2="66.294" width="0.4064" layer="16"/>
<wire x1="64.516" y1="66.294" x2="64.643" y2="66.421" width="0.4064" layer="16"/>
<wire x1="64.643" y1="66.421" x2="65.648" y2="66.421" width="0.4064" layer="16"/>
<wire x1="65.648" y1="66.421" x2="65.659" y2="66.382" width="0.4064" layer="16"/>
<wire x1="65.659" y1="66.382" x2="67.31" y2="66.432" width="0.4064" layer="16"/>
<wire x1="65.648" y1="66.421" x2="65.648" y2="70.44615" width="0.4064" layer="16"/>
<wire x1="65.648" y1="70.44615" x2="63.919575" y2="72.174575" width="0.4064" layer="16"/>
<via x="60.590675" y="75.503475" extent="1-16" drill="0.6"/>
<wire x1="63.919575" y1="72.174575" x2="60.590675" y2="75.503475" width="0.4064" layer="16"/>
<wire x1="60.590675" y1="75.503475" x2="60.53379375" y2="75.503475" width="0.4064" layer="1"/>
<wire x1="60.53379375" y1="75.503475" x2="60.43089375" y2="75.400575" width="0.4064" layer="1"/>
<wire x1="83.3" y1="63.515" x2="83.3" y2="65.29" width="0.3048" layer="1"/>
<wire x1="83.3" y1="65.29" x2="82.55" y2="66.04" width="0.3048" layer="1"/>
<via x="82.55" y="66.04" extent="1-16" drill="0.6"/>
<wire x1="82.55" y1="66.04" x2="82.55" y2="67.945" width="0.3048" layer="16"/>
<wire x1="82.55" y1="67.945" x2="77.47" y2="73.025" width="0.3048" layer="16"/>
<wire x1="85.09" y1="65.67" x2="82.92" y2="65.67" width="0.3048" layer="16"/>
<wire x1="82.92" y1="65.67" x2="82.55" y2="66.04" width="0.3048" layer="16"/>
<wire x1="82.705" y1="78.585" x2="88.265" y2="73.025" width="0.6096" layer="16"/>
<wire x1="88.265" y1="73.025" x2="90.805" y2="73.025" width="0.6096" layer="16"/>
<wire x1="90.805" y1="73.025" x2="92.71" y2="74.93" width="0.6096" layer="16"/>
<via x="90.935109375" y="86.877265625" extent="1-16" drill="0.6"/>
<wire x1="90.935109375" y1="86.877265625" x2="90.935109375" y2="84.324890625" width="0.6096" layer="16"/>
<wire x1="90.935109375" y1="84.324890625" x2="92.71" y2="82.55" width="0.6096" layer="16"/>
<wire x1="92.71" y1="82.55" x2="92.71" y2="74.93" width="0.6096" layer="16"/>
<wire x1="63.18" y1="70.95" x2="63.18" y2="71.435" width="0.4064" layer="16"/>
<wire x1="63.18" y1="71.435" x2="63.919575" y2="72.174575" width="0.4064" layer="16"/>
<via x="50.5496875" y="68.227234375" extent="1-16" drill="0.6"/>
<wire x1="50.5496875" y1="68.227234375" x2="50.5496875" y2="68.1953125" width="0.4064" layer="16"/>
<wire x1="50.5496875" y1="68.1953125" x2="51.435" y2="67.31" width="0.4064" layer="16"/>
<wire x1="51.435" y1="67.31" x2="51.435" y2="65.035" width="0.4064" layer="16"/>
<wire x1="51.435" y1="65.035" x2="51.562" y2="64.908" width="0.4064" layer="16"/>
<wire x1="49.9" y1="60.96" x2="49.9" y2="63.87" width="0.4064" layer="16"/>
<wire x1="49.9" y1="63.87" x2="50.8" y2="64.77" width="0.4064" layer="16"/>
<wire x1="50.8" y1="64.77" x2="51.424" y2="64.77" width="0.4064" layer="16"/>
<wire x1="51.424" y1="64.77" x2="51.562" y2="64.908" width="0.4064" layer="16"/>
<wire x1="67.945" y1="55.88" x2="67.945" y2="54.61" width="0.4064" layer="16"/>
<wire x1="67.945" y1="54.61" x2="68.58" y2="53.975" width="0.4064" layer="16"/>
<wire x1="68.58" y1="53.975" x2="73.025" y2="53.975" width="0.4064" layer="16"/>
<wire x1="73.025" y1="53.975" x2="79.375" y2="60.325" width="0.4064" layer="16"/>
<wire x1="79.375" y1="60.325" x2="79.375" y2="62.865" width="0.4064" layer="16"/>
<wire x1="79.375" y1="62.865" x2="82.55" y2="66.04" width="0.4064" layer="16"/>
<wire x1="55.88" y1="73.24" x2="55.88" y2="74.295" width="0.4064" layer="16"/>
<wire x1="55.88" y1="74.295" x2="54.61" y2="75.565" width="0.4064" layer="16"/>
<wire x1="54.61" y1="75.565" x2="54.61" y2="78.105" width="0.4064" layer="16"/>
<wire x1="54.61" y1="78.105" x2="54.61" y2="81.28" width="0.4064" layer="16"/>
<wire x1="54.61" y1="81.28" x2="55.245" y2="81.915" width="0.4064" layer="16"/>
<wire x1="55.245" y1="81.915" x2="56.515" y2="81.915" width="0.4064" layer="16"/>
<wire x1="56.515" y1="81.915" x2="58.42" y2="80.01" width="0.4064" layer="16"/>
<wire x1="58.42" y1="80.01" x2="58.42" y2="77.67415" width="0.4064" layer="16"/>
<wire x1="58.42" y1="77.67415" x2="60.590675" y2="75.503475" width="0.4064" layer="16"/>
<wire x1="33.02" y1="5.45" x2="33.39" y2="5.45" width="0.4064" layer="1"/>
<wire x1="33.39" y1="5.45" x2="38.735" y2="10.795" width="0.4064" layer="1"/>
<wire x1="38.735" y1="10.795" x2="38.735" y2="20.32" width="0.4064" layer="1"/>
<wire x1="38.735" y1="20.32" x2="43.18" y2="24.765" width="0.4064" layer="1"/>
<wire x1="97.409" y1="80.264" x2="94.996" y2="80.264" width="0.8128" layer="1"/>
<wire x1="94.996" y1="80.264" x2="91.1225" y2="84.1375" width="0.8128" layer="1"/>
<wire x1="91.1225" y1="84.1375" x2="91.1225" y2="86.689875" width="0.8128" layer="1"/>
<wire x1="91.1225" y1="86.689875" x2="90.935109375" y2="86.877265625" width="0.8128" layer="1"/>
<contactref element="U$6" pad="3"/>
<wire x1="52.46" y1="45" x2="50.08" y2="45" width="0.4064" layer="16"/>
<wire x1="50.08" y1="45" x2="43.815" y2="38.735" width="0.4064" layer="16"/>
<wire x1="43.815" y1="38.735" x2="43.815" y2="25.4" width="0.4064" layer="16"/>
<wire x1="43.815" y1="25.4" x2="43.18" y2="24.765" width="0.4064" layer="16"/>
<wire x1="52.705" y1="77.63" x2="54.135" y2="77.63" width="0.4064" layer="16"/>
<wire x1="54.135" y1="77.63" x2="54.61" y2="78.105" width="0.4064" layer="16"/>
</signal>
<signal name="DI">
<contactref element="U1" pad="2" route="any" routetag="DI"/>
<contactref element="J2" pad="2"/>
<wire x1="31.75" y1="22.225" x2="16.51" y2="22.225" width="0.6096" layer="16"/>
<wire x1="16.51" y1="22.225" x2="10.16" y2="15.875" width="0.6096" layer="16"/>
<wire x1="10.16" y1="15.875" x2="10.16" y2="6.35" width="0.6096" layer="16"/>
<wire x1="10.16" y1="6.35" x2="10.795" y2="5.715" width="0.6096" layer="16"/>
<via x="10.795" y="5.715" extent="1-16" drill="0.6"/>
<wire x1="10.795" y1="5.715" x2="11.43" y2="5.08" width="0.6096" layer="1"/>
<wire x1="11.43" y1="5.08" x2="12.52" y2="5.08" width="0.6096" layer="1"/>
<wire x1="12.52" y1="5.08" x2="12.6" y2="5" width="0.6096" layer="1"/>
</signal>
<signal name="D_OUT">
<contactref element="U15" pad="1"/>
<contactref element="CON2" pad="3"/>
<wire x1="97.409" y1="77.724" x2="95.631" y2="77.724" width="0.4064" layer="16"/>
<wire x1="95.631" y1="77.724" x2="94.615" y2="78.74" width="0.4064" layer="16"/>
<wire x1="94.615" y1="78.74" x2="94.615" y2="92.075" width="0.4064" layer="16"/>
<wire x1="94.615" y1="92.075" x2="99.06" y2="96.52" width="0.4064" layer="16"/>
<wire x1="99.06" y1="96.52" x2="99.06" y2="97.79" width="0.4064" layer="16"/>
<wire x1="99.06" y1="97.79" x2="98.425" y2="98.425" width="0.4064" layer="16"/>
<via x="98.425" y="98.425" extent="1-16" drill="0.6"/>
<wire x1="98.425" y1="98.425" x2="97.79" y2="98.425" width="0.4064" layer="1"/>
<wire x1="97.79" y1="98.425" x2="97.155" y2="97.79" width="0.4064" layer="1"/>
<wire x1="97.155" y1="97.79" x2="97.155" y2="97.194265625" width="0.4064" layer="1"/>
<wire x1="97.155" y1="97.194265625" x2="97.03225625" y2="97.071521875" width="0.4064" layer="1"/>
</signal>
<signal name="MOSI">
<contactref element="Q1" pad="1"/>
<contactref element="U$1" pad="13"/>
<wire x1="61.966" y1="65.43" x2="62.89" y2="65.43" width="0.254" layer="16"/>
<wire x1="62.89" y1="65.43" x2="63.5" y2="66.04" width="0.254" layer="16"/>
<wire x1="63.5" y1="66.04" x2="63.5" y2="69.469" width="0.254" layer="16"/>
<wire x1="63.5" y1="69.469" x2="63.119" y2="69.85" width="0.254" layer="16"/>
<wire x1="63.119" y1="69.85" x2="62.38" y2="69.85" width="0.254" layer="16"/>
<wire x1="62.38" y1="69.85" x2="61.28" y2="70.95" width="0.254" layer="16"/>
</signal>
<signal name="3V3">
<contactref element="U$1" pad="16"/>
<contactref element="U16" pad="2"/>
<contactref element="C2" pad="2"/>
<contactref element="C4" pad="1"/>
<contactref element="C3" pad="1"/>
<contactref element="C5" pad="1"/>
<contactref element="C6" pad="1"/>
<contactref element="U$1" pad="5"/>
<contactref element="JP1" pad="1"/>
<contactref element="JP2" pad="1"/>
<contactref element="U$2" pad="8"/>
<contactref element="U$3" pad="P$1"/>
<contactref element="C7" pad="1"/>
<contactref element="R2" pad="2"/>
<contactref element="R3" pad="2"/>
<wire x1="51.75" y1="59.42" x2="51.7" y2="59.47" width="0.4064" layer="16"/>
<wire x1="51.7" y1="59.47" x2="51.7" y2="60.96" width="0.4064" layer="16"/>
<contactref element="R4" pad="2"/>
<wire x1="56.118" y1="63.4488" x2="54.8128" y2="63.4488" width="0.4064" layer="16"/>
<wire x1="54.8128" y1="63.4488" x2="54.483" y2="63.119" width="0.4064" layer="16"/>
<wire x1="54.483" y1="63.119" x2="53.351" y2="63.119" width="0.4064" layer="16"/>
<wire x1="53.351" y1="63.119" x2="53.34" y2="63.158" width="0.4064" layer="16"/>
<wire x1="53.351" y1="63.119" x2="51.573" y2="63.119" width="0.4064" layer="16"/>
<wire x1="51.573" y1="63.119" x2="51.562" y2="63.108" width="0.4064" layer="16"/>
<wire x1="61.96" y1="63.4488" x2="65.405" y2="63.4488" width="0.4064" layer="16"/>
<wire x1="65.405" y1="63.4488" x2="67.8938" y2="63.4488" width="0.4064" layer="16"/>
<wire x1="67.8938" y1="63.4488" x2="68.58" y2="64.135" width="0.4064" layer="16"/>
<wire x1="68.58" y1="64.135" x2="68.58" y2="69.7738" width="0.4064" layer="16"/>
<wire x1="65.659" y1="64.682" x2="65.659" y2="63.7028" width="0.4064" layer="16"/>
<wire x1="65.659" y1="63.7028" x2="65.405" y2="63.4488" width="0.4064" layer="16"/>
<wire x1="67.31" y1="64.632" x2="67.31" y2="64.77" width="0.4064" layer="16"/>
<wire x1="67.31" y1="64.77" x2="65.797" y2="64.77" width="0.4064" layer="16"/>
<wire x1="65.797" y1="64.77" x2="65.659" y2="64.682" width="0.4064" layer="16"/>
<wire x1="68.58" y1="69.7738" x2="68.58" y2="71.755" width="0.4064" layer="16"/>
<wire x1="68.58" y1="71.755" x2="69.215" y2="72.39" width="0.4064" layer="16"/>
<wire x1="69.215" y1="72.39" x2="73.025" y2="72.39" width="0.4064" layer="16"/>
<wire x1="73.025" y1="72.39" x2="74.295" y2="71.12" width="0.4064" layer="16"/>
<via x="74.295" y="71.12" extent="1-16" drill="0.6"/>
<wire x1="74.295" y1="71.12" x2="80.645" y2="71.12" width="0.3048" layer="1"/>
<wire x1="80.645" y1="71.12" x2="86.36" y2="65.405" width="0.3048" layer="1"/>
<wire x1="86.36" y1="65.405" x2="86.36" y2="62.865" width="0.3048" layer="1"/>
<wire x1="86.36" y1="62.865" x2="85.725" y2="62.23" width="0.3048" layer="1"/>
<wire x1="85.725" y1="62.23" x2="85.71" y2="62.215" width="0.3048" layer="1"/>
<wire x1="83.3" y1="62.215" x2="85.71" y2="62.215" width="0.3048" layer="1"/>
<wire x1="83.3" y1="62.215" x2="83.3" y2="61.075" width="0.3048" layer="1"/>
<wire x1="83.3" y1="61.075" x2="81.915" y2="59.69" width="0.3048" layer="1"/>
<wire x1="81.915" y1="59.69" x2="75.145" y2="59.69" width="0.3048" layer="1"/>
<wire x1="77.255" y1="69.469" x2="75.946" y2="69.469" width="0.3048" layer="1"/>
<wire x1="75.946" y1="69.469" x2="74.295" y2="71.12" width="0.3048" layer="1"/>
<via x="85.725" y="62.23" extent="1-16" drill="0.6"/>
<wire x1="85.725" y1="62.23" x2="85.725" y2="63.235" width="0.3048" layer="16"/>
<wire x1="85.725" y1="63.235" x2="85.09" y2="63.87" width="0.3048" layer="16"/>
<wire x1="51.573" y1="63.119" x2="51.573" y2="61.087" width="0.4064" layer="16"/>
<wire x1="51.573" y1="61.087" x2="51.7" y2="60.96" width="0.4064" layer="16"/>
<wire x1="51.7" y1="59.47" x2="52.29" y2="59.47" width="0.4064" layer="16"/>
<wire x1="52.29" y1="59.47" x2="53.34" y2="58.42" width="0.4064" layer="16"/>
<via x="53.34" y="58.42" extent="1-16" drill="0.6"/>
<wire x1="53.34" y1="58.42" x2="62.865" y2="58.42" width="0.4064" layer="1"/>
<wire x1="62.865" y1="58.42" x2="80.645" y2="58.42" width="0.4064" layer="1"/>
<wire x1="80.645" y1="58.42" x2="81.915" y2="59.69" width="0.4064" layer="1"/>
<wire x1="62.865" y1="58.42" x2="62.865" y2="55.88" width="0.4064" layer="1"/>
<wire x1="53.34" y1="56.73" x2="53.34" y2="58.42" width="0.4064" layer="16"/>
<wire x1="43.18" y1="14.605" x2="44.45" y2="14.605" width="0.4064" layer="1"/>
<wire x1="44.45" y1="14.605" x2="45.72" y2="15.875" width="0.4064" layer="1"/>
<wire x1="45.72" y1="15.875" x2="46.3446" y2="34.925340625" width="0.4064" layer="1"/>
<wire x1="46.3446" y1="34.925340625" x2="46.99" y2="54.61" width="0.4064" layer="1"/>
<wire x1="46.99" y1="54.61" x2="53.34" y2="58.42" width="0.4064" layer="1"/>
<contactref element="U$6" pad="2"/>
<wire x1="57.54" y1="45" x2="56.419259375" y2="45" width="0.4064" layer="1"/>
<wire x1="56.419259375" y1="45" x2="46.3446" y2="34.925340625" width="0.4064" layer="1"/>
</signal>
<signal name="SWDIO">
<contactref element="U$1" pad="19"/>
<contactref element="JP1" pad="4"/>
<wire x1="61.96" y1="61.4676" x2="66.8024" y2="61.4676" width="0.4064" layer="16"/>
<wire x1="66.8024" y1="61.4676" x2="70.485" y2="57.785" width="0.4064" layer="16"/>
<wire x1="70.485" y1="57.785" x2="70.485" y2="55.88" width="0.4064" layer="16"/>
</signal>
<signal name="SWCLK">
<contactref element="U$1" pad="20"/>
<contactref element="JP1" pad="2"/>
<wire x1="61.96" y1="60.8072" x2="63.0178" y2="60.8072" width="0.4064" layer="16"/>
<wire x1="63.0178" y1="60.8072" x2="65.405" y2="58.42" width="0.4064" layer="16"/>
<wire x1="65.405" y1="58.42" x2="65.405" y2="55.88" width="0.4064" layer="16"/>
</signal>
<signal name="SCL">
<contactref element="U$1" pad="17"/>
<contactref element="U$2" pad="6"/>
<contactref element="U$3" pad="P$2"/>
<contactref element="R2" pad="1"/>
<wire x1="61.96" y1="62.7884" x2="68.5034" y2="62.7884" width="0.4064" layer="16"/>
<wire x1="68.5034" y1="62.7884" x2="71.12" y2="65.405" width="0.4064" layer="16"/>
<wire x1="71.12" y1="65.405" x2="71.12" y2="67.945" width="0.4064" layer="16"/>
<wire x1="71.12" y1="67.945" x2="71.12" y2="69.7738" width="0.4064" layer="16"/>
<via x="71.12" y="67.945" extent="1-16" drill="0.6"/>
<wire x1="71.12" y1="67.945" x2="78.74" y2="67.945" width="0.3048" layer="1"/>
<wire x1="78.74" y1="67.945" x2="82.55" y2="67.945" width="0.3048" layer="1"/>
<wire x1="82.55" y1="67.945" x2="85.09" y2="65.405" width="0.3048" layer="1"/>
<wire x1="85.09" y1="65.405" x2="85.09" y2="63.5" width="0.3048" layer="1"/>
<wire x1="85.09" y1="63.5" x2="84.455" y2="62.865" width="0.3048" layer="1"/>
<wire x1="84.455" y1="62.865" x2="83.3" y2="62.865" width="0.3048" layer="1"/>
<wire x1="78.955" y1="69.469" x2="78.955" y2="68.16" width="0.3048" layer="1"/>
<wire x1="78.955" y1="68.16" x2="78.74" y2="67.945" width="0.3048" layer="1"/>
</signal>
<signal name="SDA">
<contactref element="U$1" pad="18"/>
<contactref element="U$2" pad="5"/>
<contactref element="U$3" pad="P$6"/>
<contactref element="R3" pad="1"/>
<wire x1="61.96" y1="62.128" x2="69.748" y2="62.128" width="0.4064" layer="16"/>
<wire x1="69.748" y1="62.128" x2="69.85" y2="62.23" width="0.4064" layer="16"/>
<wire x1="69.85" y1="62.23" x2="72.39" y2="64.77" width="0.4064" layer="16"/>
<wire x1="72.39" y1="64.77" x2="72.39" y2="69.7738" width="0.4064" layer="16"/>
<wire x1="81.8" y1="62.215" x2="69.865" y2="62.215" width="0.3048" layer="1"/>
<wire x1="69.865" y1="62.215" x2="69.85" y2="62.23" width="0.3048" layer="1"/>
<via x="69.85" y="62.23" extent="1-16" drill="0.6"/>
<wire x1="73.445" y1="59.69" x2="72.39" y2="59.69" width="0.3048" layer="1"/>
<wire x1="72.39" y1="59.69" x2="69.85" y2="62.23" width="0.3048" layer="1"/>
</signal>
<signal name="USART1_TX">
<contactref element="U$1" pad="8"/>
<contactref element="JP2" pad="4"/>
<wire x1="56.112" y1="65.43" x2="54.635" y2="65.43" width="0.4064" layer="16"/>
<wire x1="54.635" y1="65.43" x2="54.61" y2="65.405" width="0.4064" layer="16"/>
<wire x1="54.61" y1="65.405" x2="50.165" y2="69.85" width="0.4064" layer="16"/>
<wire x1="50.165" y1="69.85" x2="48.895" y2="69.85" width="0.4064" layer="16"/>
<wire x1="48.895" y1="69.85" x2="36.195" y2="57.15" width="0.4064" layer="16"/>
<wire x1="36.195" y1="57.15" x2="36.195" y2="24.13" width="0.4064" layer="16"/>
<wire x1="36.195" y1="24.13" x2="38.1" y2="22.225" width="0.4064" layer="16"/>
<wire x1="38.1" y1="22.225" x2="43.18" y2="22.225" width="0.4064" layer="16"/>
</signal>
<signal name="USART1_RX">
<contactref element="U$1" pad="9"/>
<contactref element="JP2" pad="3"/>
<wire x1="56.118" y1="66.0904" x2="55.1946" y2="66.0904" width="0.4064" layer="16"/>
<wire x1="55.1946" y1="66.0904" x2="50.165" y2="71.12" width="0.4064" layer="16"/>
<wire x1="50.165" y1="71.12" x2="48.895" y2="71.12" width="0.4064" layer="16"/>
<wire x1="48.895" y1="71.12" x2="34.925" y2="57.15" width="0.4064" layer="16"/>
<wire x1="34.925" y1="57.15" x2="34.925" y2="24.13" width="0.4064" layer="16"/>
<wire x1="34.925" y1="24.13" x2="39.37" y2="19.685" width="0.4064" layer="16"/>
<wire x1="39.37" y1="19.685" x2="43.18" y2="19.685" width="0.4064" layer="16"/>
</signal>
<signal name="INT_RTC">
<contactref element="U$2" pad="7"/>
<contactref element="U$1" pad="14"/>
<wire x1="69.85" y1="69.7738" x2="69.85" y2="66.675" width="0.4064" layer="16"/>
<via x="69.85" y="66.675" extent="1-16" drill="0.6"/>
<wire x1="69.85" y1="66.675" x2="69.85" y2="65.405" width="0.4064" layer="1"/>
<wire x1="69.85" y1="65.405" x2="67.945" y2="63.5" width="0.4064" layer="1"/>
<wire x1="67.945" y1="63.5" x2="60.325" y2="63.5" width="0.4064" layer="1"/>
<wire x1="60.325" y1="63.5" x2="60.325" y2="64.135" width="0.4064" layer="1"/>
<via x="60.325" y="64.135" extent="1-16" drill="0.6"/>
<wire x1="60.325" y1="64.135" x2="60.325" y2="64.77" width="0.4064" layer="16"/>
<wire x1="60.325" y1="64.77" x2="61.9596" y2="64.77" width="0.4064" layer="16"/>
<wire x1="61.9596" y1="64.77" x2="61.96" y2="64.7696" width="0.4064" layer="16"/>
</signal>
<signal name="INT_L">
<contactref element="U$3" pad="P$5"/>
<contactref element="U$1" pad="7"/>
<wire x1="81.8" y1="62.865" x2="81.915" y2="62.865" width="0.3048" layer="1"/>
<wire x1="81.8" y1="62.865" x2="71.12" y2="62.865" width="0.3048" layer="1"/>
<wire x1="71.12" y1="62.865" x2="70.485" y2="63.5" width="0.3048" layer="1"/>
<wire x1="70.485" y1="63.5" x2="69.215" y2="63.5" width="0.3048" layer="1"/>
<wire x1="69.215" y1="63.5" x2="67.945" y2="62.23" width="0.3048" layer="1"/>
<wire x1="67.945" y1="62.23" x2="59.69" y2="62.23" width="0.3048" layer="1"/>
<wire x1="59.69" y1="62.23" x2="59.055" y2="62.865" width="0.3048" layer="1"/>
<wire x1="59.055" y1="62.865" x2="59.055" y2="64.77" width="0.3048" layer="1"/>
<wire x1="59.055" y1="64.77" x2="57.785" y2="66.04" width="0.3048" layer="1"/>
<via x="57.785" y="66.04" extent="1-16" drill="0.6"/>
<wire x1="57.785" y1="66.04" x2="57.785" y2="65.405" width="0.3048" layer="16"/>
<wire x1="57.785" y1="65.405" x2="57.15" y2="64.77" width="0.3048" layer="16"/>
<wire x1="57.15" y1="64.77" x2="56.1184" y2="64.77" width="0.3048" layer="16"/>
<wire x1="56.1184" y1="64.77" x2="56.118" y2="64.7696" width="0.3048" layer="16"/>
</signal>
<signal name="RTC_BAT+">
<contactref element="U$2" pad="3"/>
<contactref element="BAT1" pad="VCC@1"/>
<wire x1="71.12" y1="75.0062" x2="71.12" y2="76.2" width="0.4064" layer="16"/>
<wire x1="71.12" y1="76.2" x2="71.755" y2="76.835" width="0.4064" layer="16"/>
<wire x1="71.755" y1="76.835" x2="72.39" y2="76.835" width="0.4064" layer="16"/>
<wire x1="72.39" y1="76.835" x2="74.93" y2="83.185" width="0.4064" layer="16"/>
<wire x1="74.93" y1="83.185" x2="77.47" y2="83.82" width="0.4064" layer="16"/>
<wire x1="77.47" y1="83.82" x2="87.63" y2="83.82" width="0.4064" layer="16"/>
<wire x1="87.63" y1="83.82" x2="88.9" y2="82.55" width="0.4064" layer="16"/>
<wire x1="88.9" y1="82.55" x2="88.9" y2="78.994" width="0.4064" layer="16"/>
<wire x1="88.9" y1="78.994" x2="89.309" y2="78.585" width="0.4064" layer="16"/>
</signal>
<signal name="D_IN">
<contactref element="CON1" pad="3"/>
<contactref element="J2" pad="3"/>
<wire x1="31.75" y1="20.701" x2="33.909" y2="20.701" width="0.6096" layer="16"/>
<wire x1="33.909" y1="20.701" x2="37.465" y2="17.145" width="0.6096" layer="16"/>
<wire x1="37.465" y1="17.145" x2="37.465" y2="7.62" width="0.6096" layer="16"/>
<wire x1="37.465" y1="7.62" x2="32.385" y2="2.54" width="0.6096" layer="16"/>
</signal>
<signal name="MOSI_5V">
<contactref element="Q1" pad="3"/>
<contactref element="R1" pad="1"/>
<contactref element="J2" pad="1"/>
<wire x1="62.23" y1="68.75" x2="59.94" y2="68.75" width="0.4064" layer="16"/>
<wire x1="59.94" y1="68.75" x2="59.055" y2="69.635" width="0.4064" layer="16"/>
<wire x1="31.75" y1="23.749" x2="31.75" y2="28.575" width="0.6096" layer="16"/>
<via x="31.75" y="28.575" extent="1-16" drill="0.6"/>
<wire x1="31.75" y1="28.575" x2="44.45" y2="57.15" width="0.6096" layer="1"/>
<wire x1="44.45" y1="57.15" x2="56.515" y2="69.215" width="0.6096" layer="1"/>
<via x="56.515" y="69.215" extent="1-16" drill="0.6"/>
<wire x1="56.515" y1="69.215" x2="59.055" y2="69.635" width="0.6096" layer="16"/>
</signal>
<signal name="5V_LED">
<contactref element="U1" pad="3"/>
<contactref element="U1" pad="5"/>
<contactref element="U2" pad="3"/>
<contactref element="U2" pad="5"/>
<contactref element="U3" pad="3"/>
<contactref element="U3" pad="5"/>
<contactref element="U4" pad="3"/>
<contactref element="U4" pad="5"/>
<contactref element="U5" pad="3"/>
<contactref element="U5" pad="5"/>
<contactref element="C9" pad="1"/>
<contactref element="C10" pad="1"/>
<contactref element="C11" pad="1"/>
<contactref element="C12" pad="1"/>
<contactref element="C8" pad="1"/>
<wire x1="19.597" y1="4.953" x2="17.4" y2="5" width="0.4064" layer="1"/>
<wire x1="21.393571875" y1="22.655721875" x2="19.31426875" y2="23.2130625" width="0.4064" layer="1"/>
<wire x1="19.98265625" y1="13.931846875" x2="17.879878125" y2="14.15669375" width="0.4064" layer="1"/>
<wire x1="27.163484375" y1="39.588725" x2="24.973415625" y2="40.630128125" width="0.4064" layer="1"/>
<wire x1="23.9566" y1="31.3776625" x2="21.687446875" y2="32.069884375" width="0.4064" layer="1"/>
<contactref element="U6" pad="3"/>
<contactref element="U6" pad="5"/>
<contactref element="U7" pad="3"/>
<contactref element="U7" pad="5"/>
<contactref element="U8" pad="3"/>
<contactref element="U8" pad="5"/>
<contactref element="U9" pad="3"/>
<contactref element="U9" pad="5"/>
<contactref element="U10" pad="3"/>
<contactref element="U10" pad="5"/>
<contactref element="C13" pad="1"/>
<contactref element="C14" pad="1"/>
<contactref element="C15" pad="1"/>
<contactref element="C16" pad="1"/>
<contactref element="C17" pad="1"/>
<wire x1="54.87238125" y1="73.8396625" x2="53.5100125" y2="75.869884375" width="0.4064" layer="1"/>
<wire x1="47.9452375" y1="68.322671875" x2="46.384159375" y2="70.099484375" width="0.4064" layer="1"/>
<wire x1="41.659325" y1="62.163759375" x2="39.9005125" y2="63.6158375" width="0.4064" layer="1"/>
<wire x1="36.269334375" y1="55.109615625" x2="34.1301125" y2="56.489984375" width="0.4064" layer="1"/>
<wire x1="31.267878125" y1="47.669" x2="29.136171875" y2="48.8" width="0.4064" layer="1"/>
<contactref element="U11" pad="3"/>
<contactref element="U11" pad="5"/>
<contactref element="U12" pad="3"/>
<contactref element="U12" pad="5"/>
<contactref element="U13" pad="3"/>
<contactref element="U13" pad="5"/>
<contactref element="U14" pad="3"/>
<contactref element="U14" pad="5"/>
<contactref element="U15" pad="3"/>
<contactref element="U15" pad="5"/>
<contactref element="C18" pad="1"/>
<contactref element="C19" pad="1"/>
<contactref element="C20" pad="1"/>
<contactref element="C21" pad="1"/>
<contactref element="C22" pad="1"/>
<wire x1="61.2" y1="80.863825" x2="59.1269375" y2="82.634234375" width="0.4064" layer="1"/>
<wire x1="59.1269375" y1="82.634234375" x2="57.32775625" y2="84.170746875" width="0.4064" layer="1"/>
<wire x1="69.36986875" y1="85.02658125" x2="67.71179375" y2="86.773678125" width="0.4064" layer="1"/>
<wire x1="67.71179375" y1="86.773678125" x2="65.86450625" y2="88.720146875" width="0.4064" layer="1"/>
<wire x1="74.830034375" y1="92.35229375" x2="76.391778125" y2="90.31716875" width="0.4064" layer="1"/>
<wire x1="76.391778125" y1="90.31716875" x2="77.9301125" y2="88.31255" width="0.4064" layer="1"/>
<wire x1="84.12610625" y1="95.0273875" x2="85.421740625" y2="92.913309375" width="0.4064" layer="1"/>
<wire x1="85.421740625" y1="92.913309375" x2="86.786934375" y2="90.685728125" width="0.4064" layer="1"/>
<wire x1="93.65088125" y1="96.716125" x2="94.716728125" y2="94.481778125" width="0.4064" layer="1"/>
<wire x1="94.716728125" y1="94.481778125" x2="94.77515" y2="94.35930625" width="0.4064" layer="1"/>
<wire x1="94.77515" y1="94.35930625" x2="95.843303125" y2="92.12011875" width="0.4064" layer="1"/>
<wire x1="94.27215" y1="89.364340625" x2="95.843303125" y2="92.12011875" width="0.4064" layer="1"/>
<wire x1="87.453275" y1="88.080425" x2="86.786934375" y2="90.685728125" width="0.4064" layer="1"/>
<wire x1="78.858334375" y1="85.898396875" x2="77.9301125" y2="88.31255" width="0.4064" layer="1"/>
<wire x1="70.393271875" y1="82.8185125" x2="69.36986875" y2="85.02658125" width="0.4064" layer="1"/>
<wire x1="62.44" y1="78.71411875" x2="61.2" y2="80.863825" width="0.4064" layer="1"/>
<wire x1="37.565671875" y1="64.58284375" x2="43.971940625" y2="71.409078125" width="0.8128" layer="1"/>
<wire x1="43.971940625" y1="71.409078125" x2="44.120803125" y2="71.52891875" width="0.8128" layer="1"/>
<wire x1="44.120803125" y1="71.52891875" x2="51.07551875" y2="77.127759375" width="0.8128" layer="1"/>
<wire x1="51.07551875" y1="77.127759375" x2="51.353721875" y2="77.351725" width="0.8128" layer="1"/>
<wire x1="51.353721875" y1="77.351725" x2="55.750003125" y2="80.33934375" width="0.8128" layer="1"/>
<wire x1="55.750003125" y1="80.33934375" x2="59.1269375" y2="82.634234375" width="0.8128" layer="1"/>
<wire x1="59.1269375" y1="82.634234375" x2="67.71179375" y2="86.773678125" width="0.8128" layer="1"/>
<wire x1="67.71179375" y1="86.773678125" x2="76.391778125" y2="90.31716875" width="0.8128" layer="1"/>
<wire x1="76.391778125" y1="90.31716875" x2="85.421740625" y2="92.913309375" width="0.8128" layer="1"/>
<wire x1="85.421740625" y1="92.913309375" x2="94.77515" y2="94.35930625" width="0.8128" layer="1"/>
<contactref element="CON1" pad="1"/>
<contactref element="CON2" pad="1"/>
<wire x1="37.565671875" y1="64.58284375" x2="39.9005125" y2="63.6158375" width="0.4064" layer="1"/>
<wire x1="35.19589375" y1="65.56431875" x2="37.565671875" y2="64.58284375" width="0.4064" layer="1"/>
<wire x1="19.896946875" y1="41.0294375" x2="22.2312" y2="40.845828125" width="0.4064" layer="1"/>
<wire x1="22.2312" y1="40.845828125" x2="24.973415625" y2="40.630128125" width="0.4064" layer="1"/>
<wire x1="16.597046875" y1="31.936371875" x2="19.060071875" y2="32.000971875" width="0.4064" layer="1"/>
<wire x1="19.060071875" y1="32.000971875" x2="21.687446875" y2="32.069884375" width="0.4064" layer="1"/>
<wire x1="14.265709375" y1="22.5481875" x2="16.761771875" y2="22.876909375" width="0.4064" layer="1"/>
<wire x1="16.761771875" y1="22.876909375" x2="19.31426875" y2="23.2130625" width="0.4064" layer="1"/>
<wire x1="12.928475" y1="12.967740625" x2="15.370365625" y2="13.554096875" width="0.4064" layer="1"/>
<wire x1="15.370365625" y1="13.554096875" x2="17.879878125" y2="14.15669375" width="0.4064" layer="1"/>
<wire x1="12.6" y1="3.3" x2="15.226153125" y2="4.230096875" width="0.4064" layer="1"/>
<wire x1="15.226153125" y1="4.230096875" x2="17.4" y2="5" width="0.4064" layer="1"/>
<wire x1="41.908984375" y1="72.529059375" x2="44.120803125" y2="71.52891875" width="0.4064" layer="1"/>
<wire x1="46.384159375" y1="70.099484375" x2="44.120803125" y2="71.52891875" width="0.4064" layer="1"/>
<wire x1="49.3133125" y1="78.75393125" x2="50.756146875" y2="77.422478125" width="0.4064" layer="1"/>
<wire x1="50.756146875" y1="77.422478125" x2="51.07551875" y2="77.127759375" width="0.4064" layer="1"/>
<wire x1="53.5100125" y1="75.869884375" x2="50.756146875" y2="77.422478125" width="0.4064" layer="1"/>
<wire x1="29.24759375" y1="57.936025" x2="31.762225" y2="57.191275" width="0.4064" layer="1"/>
<wire x1="31.762225" y1="57.191275" x2="34.1301125" y2="56.489984375" width="0.4064" layer="1"/>
<wire x1="37.565671875" y1="64.58284375" x2="31.762225" y2="57.191275" width="0.8128" layer="1"/>
<wire x1="24.12925" y1="49.72775625" x2="26.73484375" y2="49.244953125" width="0.4064" layer="1"/>
<wire x1="26.73484375" y1="49.244953125" x2="29.136171875" y2="48.8" width="0.4064" layer="1"/>
<wire x1="31.762225" y1="57.191275" x2="26.73484375" y2="49.244953125" width="0.8128" layer="1"/>
<wire x1="26.73484375" y1="49.244953125" x2="22.2312" y2="40.845828125" width="0.8128" layer="1"/>
<wire x1="22.2312" y1="40.845828125" x2="19.060071875" y2="32.000971875" width="0.8128" layer="1"/>
<wire x1="19.060071875" y1="32.000971875" x2="16.761771875" y2="22.876909375" width="0.8128" layer="1"/>
<wire x1="16.761771875" y1="22.876909375" x2="15.370365625" y2="13.554096875" width="0.8128" layer="1"/>
<wire x1="15.370365625" y1="13.554096875" x2="15.226153125" y2="4.230096875" width="0.8128" layer="1"/>
<contactref element="U$4" pad="7"/>
<contactref element="U$4" pad="6"/>
<contactref element="U$4" pad="8"/>
<wire x1="27.305" y1="2.54" x2="27.305" y2="5.08" width="1.016" layer="1"/>
<wire x1="27.305" y1="5.08" x2="26.416" y2="5.969" width="1.016" layer="1"/>
<wire x1="26.416" y1="5.969" x2="25.111" y2="5.969" width="1.016" layer="1"/>
<wire x1="25.111" y1="5.969" x2="25.055" y2="6.025" width="1.016" layer="1"/>
<wire x1="25.055" y1="6.675" x2="25.055" y2="6.025" width="0.4064" layer="1"/>
<wire x1="25.055" y1="5.375" x2="25.055" y2="6.025" width="0.4064" layer="1"/>
<wire x1="15.226153125" y1="4.230096875" x2="15.226153125" y2="1.918846875" width="0.8128" layer="1"/>
<wire x1="15.226153125" y1="1.918846875" x2="15.875" y2="1.27" width="0.8128" layer="1"/>
<wire x1="15.875" y1="1.27" x2="26.035" y2="1.27" width="0.8128" layer="1"/>
<wire x1="26.035" y1="1.27" x2="27.305" y2="2.54" width="0.8128" layer="1"/>
<contactref element="R1" pad="2"/>
<wire x1="59.055" y1="71.335" x2="59.055" y2="71.12" width="0.4064" layer="16"/>
<via x="55.750003125" y="80.33934375" extent="1-16" drill="0.6"/>
<wire x1="55.750003125" y1="80.33934375" x2="55.750003125" y2="76.329996875" width="0.4064" layer="16"/>
<wire x1="55.750003125" y1="76.329996875" x2="59.055" y2="73.025" width="0.4064" layer="16"/>
<wire x1="59.055" y1="73.025" x2="59.055" y2="71.335" width="0.4064" layer="16"/>
<wire x1="97.409" y1="82.804" x2="97.409" y2="84.074" width="0.8128" layer="1"/>
<wire x1="97.409" y1="84.074" x2="99.06" y2="85.725" width="0.8128" layer="1"/>
<wire x1="99.06" y1="85.725" x2="99.06" y2="93.345" width="0.8128" layer="1"/>
<wire x1="99.06" y1="93.345" x2="97.663" y2="94.742" width="0.8128" layer="1"/>
<wire x1="97.663" y1="94.742" x2="94.716728125" y2="94.481778125" width="0.8128" layer="1"/>
</signal>
<signal name="LED_EN">
<contactref element="U$4" pad="4"/>
<wire x1="29.555" y1="7.325" x2="26.965" y2="7.325" width="0.4064" layer

license: MIT

license_type: permissive

branch_name: refs/heads/master

extension: brd


text:
="1"/>
<wire x1="26.965" y1="7.325" x2="25.4" y2="8.89" width="0.4064" layer="1"/>
<via x="25.4" y="8.89" extent="1-16" drill="0.6"/>
<wire x1="25.4" y1="8.89" x2="24.765" y2="9.525" width="0.4064" layer="16"/>
<wire x1="24.765" y1="9.525" x2="24.765" y2="15.875" width="0.4064" layer="16"/>
<contactref element="U$1" pad="2"/>
<wire x1="56.118" y1="61.4676" x2="57.2774" y2="61.4676" width="0.4064" layer="16"/>
<wire x1="57.2774" y1="61.4676" x2="57.785" y2="60.96" width="0.4064" layer="16"/>
<wire x1="57.785" y1="60.96" x2="57.785" y2="57.15" width="0.4064" layer="16"/>
<wire x1="57.785" y1="57.15" x2="54.61" y2="53.975" width="0.4064" layer="16"/>
<wire x1="54.61" y1="53.975" x2="41.275" y2="53.975" width="0.4064" layer="16"/>
<wire x1="24.765" y1="15.875" x2="26.035" y2="19.685" width="0.4064" layer="16"/>
<via x="26.035" y="19.685" extent="1-16" drill="0.6"/>
<wire x1="26.035" y1="19.685" x2="40.64" y2="52.705" width="0.4064" layer="1"/>
<via x="40.64" y="52.705" extent="1-16" drill="0.6"/>
<wire x1="40.64" y1="52.705" x2="41.275" y2="53.975" width="0.4064" layer="16"/>
</signal>
<signal name="LED_FAULT">
<contactref element="U$4" pad="5"/>
<wire x1="25.055" y1="7.325" x2="24.425" y2="7.325" width="0.4064" layer="1"/>
<wire x1="24.425" y1="7.325" x2="23.495" y2="8.255" width="0.4064" layer="1"/>
<via x="23.495" y="8.255" extent="1-16" drill="0.6"/>
<wire x1="23.495" y1="8.255" x2="23.495" y2="15.875" width="0.4064" layer="16"/>
<contactref element="U$1" pad="3"/>
<contactref element="R4" pad="1"/>
<wire x1="56.118" y1="62.128" x2="55.143" y2="62.128" width="0.4064" layer="16"/>
<wire x1="55.143" y1="62.128" x2="54.61" y2="61.595" width="0.4064" layer="16"/>
<wire x1="54.61" y1="61.595" x2="54.61" y2="55.88" width="0.4064" layer="16"/>
<wire x1="54.61" y1="55.88" x2="53.975" y2="55.245" width="0.4064" layer="16"/>
<wire x1="53.975" y1="55.245" x2="53.555" y2="55.245" width="0.4064" layer="16"/>
<wire x1="53.555" y1="55.245" x2="53.34" y2="55.03" width="0.4064" layer="16"/>
<wire x1="40.64" y1="55.245" x2="53.125" y2="55.245" width="0.4064" layer="16"/>
<wire x1="53.125" y1="55.245" x2="53.34" y2="55.03" width="0.4064" layer="16"/>
<wire x1="23.495" y1="15.875" x2="24.13" y2="19.05" width="0.4064" layer="16"/>
<via x="24.13" y="19.05" extent="1-16" drill="0.6"/>
<wire x1="24.13" y1="19.05" x2="40.005" y2="54.61" width="0.4064" layer="1"/>
<via x="40.005" y="54.61" extent="1-16" drill="0.6"/>
<wire x1="40.005" y1="54.61" x2="40.64" y2="55.245" width="0.4064" layer="16"/>
</signal>
<signal name="N$16">
<contactref element="U$2" pad="2"/>
<contactref element="Y1" pad="P$1"/>
<wire x1="69.85" y1="75.0062" x2="69.85" y2="77.565" width="0.4064" layer="16"/>
<wire x1="69.85" y1="77.565" x2="70.815" y2="78.53" width="0.4064" layer="16"/>
</signal>
<signal name="N$17">
<contactref element="U$1" pad="4"/>
<contactref element="C24" pad="1"/>
<contactref element="U$5" pad="P$2"/>
<wire x1="56.118" y1="62.7884" x2="57.7084" y2="62.7884" width="0.4064" layer="16"/>
<wire x1="57.7084" y1="62.7884" x2="59.055" y2="63.5" width="0.4064" layer="16"/>
<wire x1="59.055" y1="63.5" x2="59.055" y2="66.675" width="0.4064" layer="16"/>
<wire x1="59.055" y1="66.675" x2="57.785" y2="67.945" width="0.4064" layer="16"/>
<wire x1="57.785" y1="67.945" x2="55.085" y2="67.945" width="0.4064" layer="16"/>
<wire x1="55.085" y1="67.945" x2="53.94305" y2="70.000990625" width="0.4064" layer="16"/>
<wire x1="53.94305" y1="70.000990625" x2="52.705" y2="72.23" width="0.4064" layer="16"/>
<wire x1="53.94305" y1="70.000990625" x2="54.340990625" y2="70.000990625" width="0.4064" layer="16"/>
<wire x1="54.340990625" y1="70.000990625" x2="55.88" y2="71.54" width="0.4064" layer="16"/>
</signal>
<signal name="N$15">
<contactref element="Y1" pad="P$2"/>
<contactref element="U$2" pad="1"/>
<wire x1="68.58" y1="75.0062" x2="68.58" y2="77.565" width="0.4064" layer="16"/>
<wire x1="68.58" y1="77.565" x2="67.615" y2="78.53" width="0.4064" layer="16"/>
</signal>
<signal name="N$19">
</signal>
<signal name="ADJ">
<contactref element="U$1" pad="6"/>
<contactref element="U$6" pad="1"/>
<wire x1="56.118" y1="64.1092" x2="57.7592" y2="64.1092" width="0.4064" layer="16"/>
<wire x1="57.7592" y1="64.1092" x2="57.785" y2="64.135" width="0.4064" layer="16"/>
<via x="57.785" y="64.135" extent="1-16" drill="0.6"/>
<wire x1="57.785" y1="64.135" x2="57.785" y2="62.23" width="0.4064" layer="1"/>
<wire x1="57.785" y1="62.23" x2="59.69" y2="60.325" width="0.4064" layer="1"/>
<via x="59.69" y="60.325" extent="1-16" drill="0.6"/>
<wire x1="59.69" y1="60.325" x2="59.69" y2="54.77" width="0.4064" layer="16"/>
<wire x1="59.69" y1="54.77" x2="55" y2="50.08" width="0.4064" layer="16"/>
</signal>
</signals>
</board>
</drawing>
</eagle>


text:
DESCRIPTION = "Supplementary Cryptographic components for Golang"
HOMEPAGE = "https://godoc.org/golang.org/x/crypto"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707"

SRC_URI = " \
    git://github.com/golang/crypto;protocol=https;branch=master \
    "

SRCREV = "ae814b36b87190c757eede9bc2d32ed77df88551"
PV = "git+${SRCPV}"

S = "${WORKDIR}/git"

GO_IMPORT = "golang.org/x/crypto"

# This is packaging only since the repo is stashed in the way we need to do this.
do_install() {
    install -d ${D}${libdir}/go/src/${GO_IMPORT}
    cp -Rp --no-preserve=ownership ${S}/* ${D}${libdir}/go/src/${GO_IMPORT}
    rm -f ${D}/usr/lib/go/src/golang.org/x/crypto/curve25519/internal/field/sync.sh
    rm -rf ${D}/usr/lib/go/src/golang.org/x/crypto/ssh/test
}

FILES:${PN} = "${libdir}/go/src"

extension: bb


text:
// Copyright (c) 2014 Oyster
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

package halfshell

import (
	"fmt"
	"io/ioutil"
	"mime"
	"net/http"
	"os"
	"path/filepath"
	"strconv"
	"strings"
)

// Image contains a byte array of the image data and its MIME type.
// TODO: See if we can use the std library's Image type without incurring
// the hit of extra copying.
type Image struct {
	Bytes     []byte
	MimeType  string
	Signature string
}

// NewImageFromHTTPResponse returns a pointer to a new Image created from an
// HTTP response object.
func NewImageFromHTTPResponse(httpResponse *http.Response) (*Image, error) {
	imageBytes, err := ioutil.ReadAll(httpResponse.Body)
	defer httpResponse.Body.Close()
	if err != nil {
		return nil, err
	}

	return &Image{
		Bytes:    imageBytes,
		MimeType: httpResponse.Header.Get("Content-Type"),
	}, nil
}

// NewImageFromFile returns a pointer to a new Image created from a file.
func NewImageFromFile(file *os.File) (*Image, error) {
	imageBytes, err := ioutil.ReadAll(file)
	if err != nil {
		return nil, err
	}

	return &Image{
		Bytes:    imageBytes,
		MimeType: mime.TypeByExtension(filepath.Ext(file.Name())),
	}, nil
}

// ImageDimensions is the width and height of an image.
type ImageDimensions struct {
	Width  uint64
	Height uint64
}

// Focalpoint is an x/y pair representing the location of the image subject.
// 0.5/0.5 is the middle.
type Focalpoint struct {
	X float64
	Y float64
}

// NewFocalpoint splits the given string into a Focalpoint struct. The string
// format should be: "X,Y". For example: "0.1,0.1".
func NewFocalpoint(s string) (fp Focalpoint) {
	fp = Focalpoint{0.5, 0.5}

	pair := strings.Split(s, ",")
	if len(pair) != 2 {
		return
	}

	x, _ := strconv.ParseFloat(pair[0], 64)
	y, _ := strconv.ParseFloat(pair[1], 64)

	fp.X = x
	fp.Y = y
	return
}

// AspectRatio returns the image dimension's aspect ratio.
func (d ImageDimensions) AspectRatio() float64 {
	return float64(d.Width) / float64(d.Height)
}

func (d ImageDimensions) String() string {
	return fmt.Sprintf("%dx%d", d.Width, d.Height)
}

repository: storehouse/halfshell

repo_name: storehouse/halfshell

extension: go