├── DRILEGEND.CFG ├── README.md ├── SwitchPi-v0.1.brd ├── SwitchPi-v0.1.dru ├── SwitchPi-v0.1.pro ├── SwitchPi-v0.1.sch ├── SwitchPi-v0.1_DL.scr ├── SwitchPi-v0.2.brd ├── SwitchPi-v0.2.sch ├── c_source ├── keypad └── keypad.c ├── drilegend.lbr ├── eagle.epf └── mod_switchpi ├── Makefile └── mod_switchpi.c /DRILEGEND.CFG: -------------------------------------------------------------------------------- 1 | InputUserCfg = 1 2 | SymbolLayer = 144 3 | SymbolSize = 40 4 | SymbolWidth = 4 5 | TextSize = 70.0000 6 | TextRatio = 5 7 | IdxFnt = 0 8 | decMM = 2 9 | decMIL = 0 10 | SortHoles = 1 11 | TolPlated = 0.02 12 | TolNonPlated = 0.03 13 | PlatedStatusNot = NOT 14 | PlatedStatusBoth = BOTH 15 | PlatedStatusYes = YES 16 | VerticalChart = 1 17 | HighCellFactor = 1.10 18 | WideCellFactor = 1.10 19 | CellOutline = 4 20 | TitleOutline = 4 21 | TableOutline = 8 22 | SymbTitle = Sym 23 | ToolTitle = N° 24 | MMTitle = MM 25 | MilTitle = Mils 26 | MicTitle = Mic 27 | QtyTitle = Qty 28 | TypeTitle = Plated 29 | ToleTitle = Tol 30 | SymbRank = 1 31 | ToolRank = 2 32 | MMRank = 4 33 | MilRank = 3 34 | MicRank = 0 35 | QtyRank = 5 36 | TypeRank = 6 37 | ToleRank = 0 38 | OutputDrillRack = 0 39 | DrillRackFile = DRILLRACK.DRL 40 | Unit = 0 41 | OutputUserCfg = 1 42 | UserCfgFile = DRILEGEND.CFG 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | switchpi 2 | ======== 3 | 4 | Turning a RaspberryPI into VoIP Phone, and Small SoftSwitch with some extra bells and whistles 5 | 6 | (C)2013-2019 Ken Rice 7 | 8 | All Souce code is MPL1.1 License. 9 | 10 | All Hardware is designs are licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 11 | To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/. 12 | 13 | 14 | ** So, some group in China is trying to steal my project name. Not very Nice of them. Found this by looking for SwitchPi PBX, Well you found SwitchPI the original. Not the Rip Off ** 15 | -------------------------------------------------------------------------------- /SwitchPi-v0.1.brd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | (C)2013 Ken Rice <krice@freeswitch.org> 128 | This work is licensed under the Creative Commons 129 | Attribution-NonCommercial-ShareAlike 3.0 Unported License. 130 | To view a copy of this license, visit 131 | http://creativecommons.org/licenses/by-nc-sa/3.0/. 132 | 133 | 134 | 135 | <b>Microchip PIC Microcontrollers and other Devices</b><p> 136 | Based on the following sources : 137 | <ul> 138 | <li>Microchip Data Book, 1993 139 | <li>THE EMERGING WORLD STANDARD, 1995/1996 140 | <li>Microchip, Technical Library CD-ROM, June 1998 141 | <li>www.microchip.com 142 | </ul> 143 | <author>Created by librarian@cadsoft.de</author> 144 | 145 | 146 | <B>Dual In Line</B><p> 147 | package type P 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | >NAME 183 | >VALUE 184 | 185 | 186 | 187 | 188 | <b>Resistors, Capacitors, Inductors</b><p> 189 | Based on the previous libraries: 190 | <ul> 191 | <li>r.lbr 192 | <li>cap.lbr 193 | <li>cap-fe.lbr 194 | <li>captant.lbr 195 | <li>polcap.lbr 196 | <li>ipc-smd.lbr 197 | </ul> 198 | All SMD packages are defined according to the IPC specifications and CECC<p> 199 | <author>Created by librarian@cadsoft.de</author><p> 200 | <p> 201 | for Electrolyt Capacitors see also :<p> 202 | www.bccomponents.com <p> 203 | www.panasonic.com<p> 204 | www.kemet.com<p> 205 | <p> 206 | for trimmer refence see : <u>www.electrospec-inc.com/cross_references/trimpotcrossref.asp</u><p> 207 | 208 | <map name="nav_main"> 209 | <area shape="rect" coords="0,1,140,23" href="../military_specs.asp" title=""> 210 | <area shape="rect" coords="0,24,140,51" href="../about.asp" title=""> 211 | <area shape="rect" coords="1,52,140,77" href="../rfq.asp" title=""> 212 | <area shape="rect" coords="0,78,139,103" href="../products.asp" title=""> 213 | <area shape="rect" coords="1,102,138,128" href="../excess_inventory.asp" title=""> 214 | <area shape="rect" coords="1,129,138,150" href="../edge.asp" title=""> 215 | <area shape="rect" coords="1,151,139,178" href="../industry_links.asp" title=""> 216 | <area shape="rect" coords="0,179,139,201" href="../comments.asp" title=""> 217 | <area shape="rect" coords="1,203,138,231" href="../directory.asp" title=""> 218 | <area shape="default" nohref> 219 | </map> 220 | 221 | <html> 222 | 223 | <title></title> 224 | 225 | <LINK REL="StyleSheet" TYPE="text/css" HREF="style-sheet.css"> 226 | 227 | <body bgcolor="#ffffff" text="#000000" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"> 228 | <table border=0 cellspacing=0 cellpadding=0 width="100%" cellpaddding=0 height="55%"> 229 | <tr valign="top"> 230 | 231 | </td> 232 | <! <td width="10">&nbsp;</td> 233 | <td width="90%"> 234 | 235 | <b><font color="#0000FF" size="4">TRIM-POT CROSS REFERENCE</font></b> 236 | <P> 237 | <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2> 238 | <TR> 239 | <TD COLSPAN=8> 240 | <FONT SIZE=3 FACE=ARIAL><B>RECTANGULAR MULTI-TURN</B></FONT> 241 | </TD> 242 | </TR> 243 | <TR> 244 | <TD ALIGN=CENTER> 245 | <B> 246 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">BOURNS</FONT> 247 | </B> 248 | </TD> 249 | <TD ALIGN=CENTER> 250 | <B> 251 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">BI&nbsp;TECH</FONT> 252 | </B> 253 | </TD> 254 | <TD ALIGN=CENTER> 255 | <B> 256 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">DALE-VISHAY</FONT> 257 | </B> 258 | </TD> 259 | <TD ALIGN=CENTER> 260 | <B> 261 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">PHILIPS/MEPCO</FONT> 262 | </B> 263 | </TD> 264 | <TD ALIGN=CENTER> 265 | <B> 266 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">MURATA</FONT> 267 | </B> 268 | </TD> 269 | <TD ALIGN=CENTER> 270 | <B> 271 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">PANASONIC</FONT> 272 | </B> 273 | </TD> 274 | <TD ALIGN=CENTER> 275 | <B> 276 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">SPECTROL</FONT> 277 | </B> 278 | </TD> 279 | <TD ALIGN=CENTER> 280 | <B> 281 | <FONT SIZE=3 FACE=ARIAL color="#FF0000">MILSPEC</FONT> 282 | </B> 283 | </TD><TD>&nbsp;</TD> 284 | </TR> 285 | <TR> 286 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3 > 287 | 3005P<BR> 288 | 3006P<BR> 289 | 3006W<BR> 290 | 3006Y<BR> 291 | 3009P<BR> 292 | 3009W<BR> 293 | 3009Y<BR> 294 | 3057J<BR> 295 | 3057L<BR> 296 | 3057P<BR> 297 | 3057Y<BR> 298 | 3059J<BR> 299 | 3059L<BR> 300 | 3059P<BR> 301 | 3059Y<BR></FONT> 302 | </TD> 303 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 304 | -<BR> 305 | 89P<BR> 306 | 89W<BR> 307 | 89X<BR> 308 | 89PH<BR> 309 | 76P<BR> 310 | 89XH<BR> 311 | 78SLT<BR> 312 | 78L&nbsp;ALT<BR> 313 | 56P&nbsp;ALT<BR> 314 | 78P&nbsp;ALT<BR> 315 | T8S<BR> 316 | 78L<BR> 317 | 56P<BR> 318 | 78P<BR></FONT> 319 | </TD> 320 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 321 | -<BR> 322 | T18/784<BR> 323 | 783<BR> 324 | 781<BR> 325 | -<BR> 326 | -<BR> 327 | -<BR> 328 | 2199<BR> 329 | 1697/1897<BR> 330 | 1680/1880<BR> 331 | 2187<BR> 332 | -<BR> 333 | -<BR> 334 | -<BR> 335 | -<BR></FONT> 336 | </TD> 337 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 338 | -<BR> 339 | 8035EKP/CT20/RJ-20P<BR> 340 | -<BR> 341 | RJ-20X<BR> 342 | -<BR> 343 | -<BR> 344 | -<BR> 345 | 1211L<BR> 346 | 8012EKQ&nbsp;ALT<BR> 347 | 8012EKR&nbsp;ALT<BR> 348 | 1211P<BR> 349 | 8012EKJ<BR> 350 | 8012EKL<BR> 351 | 8012EKQ<BR> 352 | 8012EKR<BR></FONT> 353 | </TD> 354 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 355 | -<BR> 356 | 2101P<BR> 357 | 2101W<BR> 358 | 2101Y<BR> 359 | -<BR> 360 | -<BR> 361 | -<BR> 362 | -<BR> 363 | -<BR> 364 | -<BR> 365 | -<BR> 366 | -<BR> 367 | 2102L<BR> 368 | 2102S<BR> 369 | 2102Y<BR></FONT> 370 | </TD> 371 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 372 | -<BR> 373 | EVMCOG<BR> 374 | -<BR> 375 | -<BR> 376 | -<BR> 377 | -<BR> 378 | -<BR> 379 | -<BR> 380 | -<BR> 381 | -<BR> 382 | -<BR> 383 | -<BR> 384 | -<BR> 385 | -<BR> 386 | -<BR></FONT> 387 | </TD> 388 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 389 | -<BR> 390 | 43P<BR> 391 | 43W<BR> 392 | 43Y<BR> 393 | -<BR> 394 | -<BR> 395 | -<BR> 396 | -<BR> 397 | 40L<BR> 398 | 40P<BR> 399 | 40Y<BR> 400 | 70Y-T602<BR> 401 | 70L<BR> 402 | 70P<BR> 403 | 70Y<BR></FONT> 404 | </TD> 405 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 406 | -<BR> 407 | -<BR> 408 | -<BR> 409 | -<BR> 410 | -<BR> 411 | -<BR> 412 | -<BR> 413 | -<BR> 414 | RT/RTR12<BR> 415 | RT/RTR12<BR> 416 | RT/RTR12<BR> 417 | -<BR> 418 | RJ/RJR12<BR> 419 | RJ/RJR12<BR> 420 | RJ/RJR12<BR></FONT> 421 | </TD> 422 | </TR> 423 | <TR> 424 | <TD COLSPAN=8>&nbsp; 425 | </TD> 426 | </TR> 427 | <TR> 428 | <TD COLSPAN=8> 429 | <FONT SIZE=4 FACE=ARIAL><B>SQUARE MULTI-TURN</B></FONT> 430 | </TD> 431 | </TR> 432 | <TR> 433 | <TD ALIGN=CENTER> 434 | <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> 435 | </TD> 436 | <TD ALIGN=CENTER> 437 | <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> 438 | </TD> 439 | <TD ALIGN=CENTER> 440 | <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> 441 | </TD> 442 | <TD ALIGN=CENTER> 443 | <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> 444 | </TD> 445 | <TD ALIGN=CENTER> 446 | <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> 447 | </TD> 448 | <TD ALIGN=CENTER> 449 | <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> 450 | </TD> 451 | <TD ALIGN=CENTER> 452 | <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> 453 | </TD> 454 | <TD ALIGN=CENTER> 455 | <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> 456 | </TD> 457 | </TR> 458 | <TR> 459 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 460 | 3250L<BR> 461 | 3250P<BR> 462 | 3250W<BR> 463 | 3250X<BR> 464 | 3252P<BR> 465 | 3252W<BR> 466 | 3252X<BR> 467 | 3260P<BR> 468 | 3260W<BR> 469 | 3260X<BR> 470 | 3262P<BR> 471 | 3262W<BR> 472 | 3262X<BR> 473 | 3266P<BR> 474 | 3266W<BR> 475 | 3266X<BR> 476 | 3290H<BR> 477 | 3290P<BR> 478 | 3290W<BR> 479 | 3292P<BR> 480 | 3292W<BR> 481 | 3292X<BR> 482 | 3296P<BR> 483 | 3296W<BR> 484 | 3296X<BR> 485 | 3296Y<BR> 486 | 3296Z<BR> 487 | 3299P<BR> 488 | 3299W<BR> 489 | 3299X<BR> 490 | 3299Y<BR> 491 | 3299Z<BR></FONT> 492 | </TD> 493 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 494 | -<BR> 495 | 66P&nbsp;ALT<BR> 496 | 66W&nbsp;ALT<BR> 497 | 66X&nbsp;ALT<BR> 498 | 66P&nbsp;ALT<BR> 499 | 66W&nbsp;ALT<BR> 500 | 66X&nbsp;ALT<BR> 501 | -<BR> 502 | 64W&nbsp;ALT<BR> 503 | -<BR> 504 | 64P&nbsp;ALT<BR> 505 | 64W&nbsp;ALT<BR> 506 | 64X&nbsp;ALT<BR> 507 | 64P<BR> 508 | 64W<BR> 509 | 64X<BR> 510 | 66X&nbsp;ALT<BR> 511 | 66P&nbsp;ALT<BR> 512 | 66W&nbsp;ALT<BR> 513 | 66P<BR> 514 | 66W<BR> 515 | 66X<BR> 516 | 67P<BR> 517 | 67W<BR> 518 | 67X<BR> 519 | 67Y<BR> 520 | 67Z<BR> 521 | 68P<BR> 522 | 68W<BR> 523 | 68X<BR> 524 | 67Y&nbsp;ALT<BR> 525 | 67Z&nbsp;ALT<BR></FONT> 526 | </TD> 527 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 528 | 5050<BR> 529 | 5091<BR> 530 | 5080<BR> 531 | 5087<BR> 532 | -<BR> 533 | -<BR> 534 | -<BR> 535 | -<BR> 536 | -<BR> 537 | -<BR> 538 | -<BR> 539 | T63YB<BR> 540 | T63XB<BR> 541 | -<BR> 542 | -<BR> 543 | -<BR> 544 | 5887<BR> 545 | 5891<BR> 546 | 5880<BR> 547 | -<BR> 548 | -<BR> 549 | -<BR> 550 | T93Z<BR> 551 | T93YA<BR> 552 | T93XA<BR> 553 | T93YB<BR> 554 | T93XB<BR> 555 | -<BR> 556 | -<BR> 557 | -<BR> 558 | -<BR> 559 | -<BR></FONT> 560 | </TD> 561 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 562 | -<BR> 563 | -<BR> 564 | -<BR> 565 | -<BR> 566 | -<BR> 567 | -<BR> 568 | -<BR> 569 | -<BR> 570 | -<BR> 571 | -<BR> 572 | 8026EKP<BR> 573 | 8026EKW<BR> 574 | 8026EKM<BR> 575 | 8026EKP<BR> 576 | 8026EKB<BR> 577 | 8026EKM<BR> 578 | 1309X<BR> 579 | 1309P<BR> 580 | 1309W<BR> 581 | 8024EKP<BR> 582 | 8024EKW<BR> 583 | 8024EKN<BR> 584 | RJ-9P/CT9P<BR> 585 | RJ-9W<BR> 586 | RJ-9X<BR> 587 | -<BR> 588 | -<BR> 589 | -<BR> 590 | -<BR> 591 | -<BR> 592 | -<BR> 593 | -<BR></FONT> 594 | </TD> 595 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 596 | -<BR> 597 | -<BR> 598 | -<BR> 599 | -<BR> 600 | -<BR> 601 | -<BR> 602 | -<BR> 603 | -<BR> 604 | -<BR> 605 | -<BR> 606 | 3103P<BR> 607 | 3103Y<BR> 608 | 3103Z<BR> 609 | 3103P<BR> 610 | 3103Y<BR> 611 | 3103Z<BR> 612 | -<BR> 613 | -<BR> 614 | -<BR> 615 | -<BR> 616 | -<BR> 617 | -<BR> 618 | 3105P/3106P<BR> 619 | 3105W/3106W<BR> 620 | 3105X/3106X<BR> 621 | 3105Y/3106Y<BR> 622 | 3105Z/3105Z<BR> 623 | 3102P<BR> 624 | 3102W<BR> 625 | 3102X<BR> 626 | 3102Y<BR> 627 | 3102Z<BR></FONT> 628 | </TD> 629 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 630 | -<BR> 631 | -<BR> 632 | -<BR> 633 | -<BR> 634 | -<BR> 635 | -<BR> 636 | -<BR> 637 | -<BR> 638 | -<BR> 639 | -<BR> 640 | -<BR> 641 | -<BR> 642 | -<BR> 643 | -<BR> 644 | -<BR> 645 | -<BR> 646 | -<BR> 647 | -<BR> 648 | -<BR> 649 | -<BR> 650 | -<BR> 651 | -<BR> 652 | EVMCBG<BR> 653 | EVMCCG<BR> 654 | -<BR> 655 | -<BR> 656 | -<BR> 657 | -<BR> 658 | -<BR> 659 | -<BR> 660 | -<BR> 661 | -<BR></FONT> 662 | </TD> 663 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 664 | 55-1-X<BR> 665 | 55-4-X<BR> 666 | 55-3-X<BR> 667 | 55-2-X<BR> 668 | -<BR> 669 | -<BR> 670 | -<BR> 671 | -<BR> 672 | -<BR> 673 | -<BR> 674 | -<BR> 675 | -<BR> 676 | -<BR> 677 | -<BR> 678 | -<BR> 679 | -<BR> 680 | 50-2-X<BR> 681 | 50-4-X<BR> 682 | 50-3-X<BR> 683 | -<BR> 684 | -<BR> 685 | -<BR> 686 | 64P<BR> 687 | 64W<BR> 688 | 64X<BR> 689 | 64Y<BR> 690 | 64Z<BR> 691 | -<BR> 692 | -<BR> 693 | -<BR> 694 | -<BR> 695 | -<BR></FONT> 696 | </TD> 697 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 698 | RT/RTR22<BR> 699 | RT/RTR22<BR> 700 | RT/RTR22<BR> 701 | RT/RTR22<BR> 702 | RJ/RJR22<BR> 703 | RJ/RJR22<BR> 704 | RJ/RJR22<BR> 705 | RT/RTR26<BR> 706 | RT/RTR26<BR> 707 | RT/RTR26<BR> 708 | RJ/RJR26<BR> 709 | RJ/RJR26<BR> 710 | RJ/RJR26<BR> 711 | RJ/RJR26<BR> 712 | RJ/RJR26<BR> 713 | RJ/RJR26<BR> 714 | RT/RTR24<BR> 715 | RT/RTR24<BR> 716 | RT/RTR24<BR> 717 | RJ/RJR24<BR> 718 | RJ/RJR24<BR> 719 | RJ/RJR24<BR> 720 | RJ/RJR24<BR> 721 | RJ/RJR24<BR> 722 | RJ/RJR24<BR> 723 | -<BR> 724 | -<BR> 725 | -<BR> 726 | -<BR> 727 | -<BR> 728 | -<BR> 729 | -<BR></FONT> 730 | </TD> 731 | </TR> 732 | <TR> 733 | <TD COLSPAN=8>&nbsp; 734 | </TD> 735 | </TR> 736 | <TR> 737 | <TD COLSPAN=8> 738 | <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> 739 | </TD> 740 | </TR> 741 | <TR> 742 | <TD ALIGN=CENTER> 743 | <FONT SIZE=3 FACE=ARIAL><B>BOURN</B></FONT> 744 | </TD> 745 | <TD ALIGN=CENTER> 746 | <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> 747 | </TD> 748 | <TD ALIGN=CENTER> 749 | <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> 750 | </TD> 751 | <TD ALIGN=CENTER> 752 | <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> 753 | </TD> 754 | <TD ALIGN=CENTER> 755 | <FONT SIZE=3 FACE=ARIAL><B>MURATA</B></FONT> 756 | </TD> 757 | <TD ALIGN=CENTER> 758 | <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> 759 | </TD> 760 | <TD ALIGN=CENTER> 761 | <FONT SIZE=3 FACE=ARIAL><B>SPECTROL</B></FONT> 762 | </TD> 763 | <TD ALIGN=CENTER> 764 | <FONT SIZE=3 FACE=ARIAL><B>MILSPEC</B></FONT> 765 | </TD> 766 | </TR> 767 | <TR> 768 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 769 | 3323P<BR> 770 | 3323S<BR> 771 | 3323W<BR> 772 | 3329H<BR> 773 | 3329P<BR> 774 | 3329W<BR> 775 | 3339H<BR> 776 | 3339P<BR> 777 | 3339W<BR> 778 | 3352E<BR> 779 | 3352H<BR> 780 | 3352K<BR> 781 | 3352P<BR> 782 | 3352T<BR> 783 | 3352V<BR> 784 | 3352W<BR> 785 | 3362H<BR> 786 | 3362M<BR> 787 | 3362P<BR> 788 | 3362R<BR> 789 | 3362S<BR> 790 | 3362U<BR> 791 | 3362W<BR> 792 | 3362X<BR> 793 | 3386B<BR> 794 | 3386C<BR> 795 | 3386F<BR> 796 | 3386H<BR> 797 | 3386K<BR> 798 | 3386M<BR> 799 | 3386P<BR> 800 | 3386S<BR> 801 | 3386W<BR> 802 | 3386X<BR></FONT> 803 | </TD> 804 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 805 | 25P<BR> 806 | 25S<BR> 807 | 25RX<BR> 808 | 82P<BR> 809 | 82M<BR> 810 | 82PA<BR> 811 | -<BR> 812 | -<BR> 813 | -<BR> 814 | 91E<BR> 815 | 91X<BR> 816 | 91T<BR> 817 | 91B<BR> 818 | 91A<BR> 819 | 91V<BR> 820 | 91W<BR> 821 | 25W<BR> 822 | 25V<BR> 823 | 25P<BR> 824 | -<BR> 825 | 25S<BR> 826 | 25U<BR> 827 | 25RX<BR> 828 | 25X<BR> 829 | 72XW<BR> 830 | 72XL<BR> 831 | 72PM<BR> 832 | 72RX<BR> 833 | -<BR> 834 | 72PX<BR> 835 | 72P<BR> 836 | 72RXW<BR> 837 | 72RXL<BR> 838 | 72X<BR></FONT> 839 | </TD> 840 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 841 | -<BR> 842 | -<BR> 843 | -<BR> 844 | T7YB<BR> 845 | T7YA<BR> 846 | -<BR> 847 | -<BR> 848 | -<BR> 849 | -<BR> 850 | -<BR> 851 | -<BR> 852 | -<BR> 853 | -<BR> 854 | -<BR> 855 | -<BR> 856 | -<BR> 857 | -<BR> 858 | TXD<BR> 859 | TYA<BR> 860 | TYP<BR> 861 | -<BR> 862 | TYD<BR> 863 | TX<BR> 864 | -<BR> 865 | 150SX<BR> 866 | 100SX<BR> 867 | 102T<BR> 868 | 101S<BR> 869 | 190T<BR> 870 | 150TX<BR> 871 | 101<BR> 872 | -<BR> 873 | -<BR> 874 | 101SX<BR></FONT> 875 | </TD> 876 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 877 | ET6P<BR> 878 | ET6S<BR> 879 | ET6X<BR> 880 | RJ-6W/8014EMW<BR> 881 | RJ-6P/8014EMP<BR> 882 | RJ-6X/8014EMX<BR> 883 | TM7W<BR> 884 | TM7P<BR> 885 | TM7X<BR> 886 | -<BR> 887 | 8017SMS<BR> 888 | -<BR> 889 | 8017SMB<BR> 890 | 8017SMA<BR> 891 | -<BR> 892 | -<BR> 893 | CT-6W<BR> 894 | CT-6H<BR> 895 | CT-6P<BR> 896 | CT-6R<BR> 897 | -<BR> 898 | CT-6V<BR> 899 | CT-6X<BR> 900 | -<BR> 901 | -<BR> 902 | 8038EKV<BR> 903 | -<BR> 904 | 8038EKX<BR> 905 | -<BR> 906 | -<BR> 907 | 8038EKP<BR> 908 | 8038EKZ<BR> 909 | 8038EKW<BR> 910 | -<BR></FONT> 911 | </TD> 912 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 913 | -<BR> 914 | -<BR> 915 | -<BR> 916 | 3321H<BR> 917 | 3321P<BR> 918 | 3321N<BR> 919 | 1102H<BR> 920 | 1102P<BR> 921 | 1102T<BR> 922 | RVA0911V304A<BR> 923 | -<BR> 924 | RVA0911H413A<BR> 925 | RVG0707V100A<BR> 926 | RVA0607V(H)306A<BR> 927 | RVA1214H213A<BR> 928 | -<BR> 929 | -<BR> 930 | -<BR> 931 | -<BR> 932 | -<BR> 933 | -<BR> 934 | -<BR> 935 | -<BR> 936 | -<BR> 937 | 3104B<BR> 938 | 3104C<BR> 939 | 3104F<BR> 940 | 3104H<BR> 941 | -<BR> 942 | 3104M<BR> 943 | 3104P<BR> 944 | 3104S<BR> 945 | 3104W<BR> 946 | 3104X<BR></FONT> 947 | </TD> 948 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 949 | EVMQ0G<BR> 950 | EVMQIG<BR> 951 | EVMQ3G<BR> 952 | EVMS0G<BR> 953 | EVMQ0G<BR> 954 | EVMG0G<BR> 955 | -<BR> 956 | -<BR> 957 | -<BR> 958 | EVMK4GA00B<BR> 959 | EVM30GA00B<BR> 960 | EVMK0GA00B<BR> 961 | EVM38GA00B<BR> 962 | EVMB6<BR> 963 | EVLQ0<BR> 964 | -<BR> 965 | EVMMSG<BR> 966 | EVMMBG<BR> 967 | EVMMAG<BR> 968 | -<BR> 969 | -<BR> 970 | EVMMCS<BR> 971 | -<BR> 972 | -<BR> 973 | -<BR> 974 | -<BR> 975 | -<BR> 976 | EVMM1<BR> 977 | -<BR> 978 | -<BR> 979 | EVMM0<BR> 980 | -<BR> 981 | -<BR> 982 | EVMM3<BR></FONT> 983 | </TD> 984 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 985 | -<BR> 986 | -<BR> 987 | -<BR> 988 | 62-3-1<BR> 989 | 62-1-2<BR> 990 | -<BR> 991 | -<BR> 992 | -<BR> 993 | -<BR> 994 | -<BR> 995 | -<BR> 996 | -<BR> 997 | -<BR> 998 | -<BR> 999 | -<BR> 1000 | -<BR> 1001 | 67R<BR> 1002 | -<BR> 1003 | 67P<BR> 1004 | -<BR> 1005 | -<BR> 1006 | -<BR> 1007 | -<BR> 1008 | 67X<BR> 1009 | 63V<BR> 1010 | 63S<BR> 1011 | 63M<BR> 1012 | -<BR> 1013 | -<BR> 1014 | 63H<BR> 1015 | 63P<BR> 1016 | -<BR> 1017 | -<BR> 1018 | 63X<BR></FONT> 1019 | </TD> 1020 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1021 | -<BR> 1022 | -<BR> 1023 | -<BR> 1024 | RJ/RJR50<BR> 1025 | RJ/RJR50<BR> 1026 | RJ/RJR50<BR> 1027 | -<BR> 1028 | -<BR> 1029 | -<BR> 1030 | -<BR> 1031 | -<BR> 1032 | -<BR> 1033 | -<BR> 1034 | -<BR> 1035 | -<BR> 1036 | -<BR> 1037 | -<BR> 1038 | -<BR> 1039 | -<BR> 1040 | -<BR> 1041 | -<BR> 1042 | -<BR> 1043 | -<BR> 1044 | -<BR> 1045 | -<BR> 1046 | -<BR> 1047 | -<BR> 1048 | -<BR> 1049 | -<BR> 1050 | -<BR> 1051 | -<BR> 1052 | -<BR> 1053 | -<BR> 1054 | -<BR></FONT> 1055 | </TD> 1056 | </TR> 1057 | </TABLE> 1058 | <P>&nbsp;<P> 1059 | <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3> 1060 | <TR> 1061 | <TD COLSPAN=7> 1062 | <FONT color="#0000FF" SIZE=4 FACE=ARIAL><B>SMD TRIM-POT CROSS REFERENCE</B></FONT> 1063 | <P> 1064 | <FONT SIZE=4 FACE=ARIAL><B>MULTI-TURN</B></FONT> 1065 | </TD> 1066 | </TR> 1067 | <TR> 1068 | <TD> 1069 | <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> 1070 | </TD> 1071 | <TD> 1072 | <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> 1073 | </TD> 1074 | <TD> 1075 | <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> 1076 | </TD> 1077 | <TD> 1078 | <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> 1079 | </TD> 1080 | <TD> 1081 | <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> 1082 | </TD> 1083 | <TD> 1084 | <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> 1085 | </TD> 1086 | <TD> 1087 | <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> 1088 | </TD> 1089 | </TR> 1090 | <TR> 1091 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1092 | 3224G<BR> 1093 | 3224J<BR> 1094 | 3224W<BR> 1095 | 3269P<BR> 1096 | 3269W<BR> 1097 | 3269X<BR></FONT> 1098 | </TD> 1099 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1100 | 44G<BR> 1101 | 44J<BR> 1102 | 44W<BR> 1103 | 84P<BR> 1104 | 84W<BR> 1105 | 84X<BR></FONT> 1106 | </TD> 1107 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1108 | -<BR> 1109 | -<BR> 1110 | -<BR> 1111 | ST63Z<BR> 1112 | ST63Y<BR> 1113 | -<BR></FONT> 1114 | </TD> 1115 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1116 | -<BR> 1117 | -<BR> 1118 | -<BR> 1119 | ST5P<BR> 1120 | ST5W<BR> 1121 | ST5X<BR></FONT> 1122 | </TD> 1123 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1124 | -<BR> 1125 | -<BR> 1126 | -<BR> 1127 | -<BR> 1128 | -<BR> 1129 | -<BR></FONT> 1130 | </TD> 1131 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1132 | -<BR> 1133 | -<BR> 1134 | -<BR> 1135 | -<BR> 1136 | -<BR> 1137 | -<BR></FONT> 1138 | </TD> 1139 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1140 | -<BR> 1141 | -<BR> 1142 | -<BR> 1143 | -<BR> 1144 | -<BR> 1145 | -<BR></FONT> 1146 | </TD> 1147 | </TR> 1148 | <TR> 1149 | <TD COLSPAN=7>&nbsp; 1150 | </TD> 1151 | </TR> 1152 | <TR> 1153 | <TD COLSPAN=7> 1154 | <FONT SIZE=4 FACE=ARIAL><B>SINGLE TURN</B></FONT> 1155 | </TD> 1156 | </TR> 1157 | <TR> 1158 | <TD> 1159 | <FONT SIZE=3 FACE=ARIAL><B>BOURNS</B></FONT> 1160 | </TD> 1161 | <TD> 1162 | <FONT SIZE=3 FACE=ARIAL><B>BI&nbsp;TECH</B></FONT> 1163 | </TD> 1164 | <TD> 1165 | <FONT SIZE=3 FACE=ARIAL><B>DALE-VISHAY</B></FONT> 1166 | </TD> 1167 | <TD> 1168 | <FONT SIZE=3 FACE=ARIAL><B>PHILIPS/MEPCO</B></FONT> 1169 | </TD> 1170 | <TD> 1171 | <FONT SIZE=3 FACE=ARIAL><B>PANASONIC</B></FONT> 1172 | </TD> 1173 | <TD> 1174 | <FONT SIZE=3 FACE=ARIAL><B>TOCOS</B></FONT> 1175 | </TD> 1176 | <TD> 1177 | <FONT SIZE=3 FACE=ARIAL><B>AUX/KYOCERA</B></FONT> 1178 | </TD> 1179 | </TR> 1180 | <TR> 1181 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1182 | 3314G<BR> 1183 | 3314J<BR> 1184 | 3364A/B<BR> 1185 | 3364C/D<BR> 1186 | 3364W/X<BR> 1187 | 3313G<BR> 1188 | 3313J<BR></FONT> 1189 | </TD> 1190 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1191 | 23B<BR> 1192 | 23A<BR> 1193 | 21X<BR> 1194 | 21W<BR> 1195 | -<BR> 1196 | 22B<BR> 1197 | 22A<BR></FONT> 1198 | </TD> 1199 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1200 | ST5YL/ST53YL<BR> 1201 | ST5YJ/5T53YJ<BR> 1202 | ST-23A<BR> 1203 | ST-22B<BR> 1204 | ST-22<BR> 1205 | -<BR> 1206 | -<BR></FONT> 1207 | </TD> 1208 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1209 | ST-4B<BR> 1210 | ST-4A<BR> 1211 | -<BR> 1212 | -<BR> 1213 | -<BR> 1214 | ST-3B<BR> 1215 | ST-3A<BR></FONT> 1216 | </TD> 1217 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1218 | -<BR> 1219 | EVM-6YS<BR> 1220 | EVM-1E<BR> 1221 | EVM-1G<BR> 1222 | EVM-1D<BR> 1223 | -<BR> 1224 | -<BR></FONT> 1225 | </TD> 1226 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1227 | G4B<BR> 1228 | G4A<BR> 1229 | TR04-3S1<BR> 1230 | TRG04-2S1<BR> 1231 | -<BR> 1232 | -<BR> 1233 | -<BR></FONT> 1234 | </TD> 1235 | <TD BGCOLOR="#cccccc" ALIGN=CENTER><FONT FACE=ARIAL SIZE=3> 1236 | -<BR> 1237 | -<BR> 1238 | DVR-43A<BR> 1239 | CVR-42C<BR> 1240 | CVR-42A/C<BR> 1241 | -<BR> 1242 | -<BR></FONT> 1243 | </TD> 1244 | </TR> 1245 | </TABLE> 1246 | <P> 1247 | <FONT SIZE=4 FACE=ARIAL><B>ALT =&nbsp;ALTERNATE</B></FONT> 1248 | <P> 1249 | 1250 | &nbsp; 1251 | <P> 1252 | </td> 1253 | </tr> 1254 | </table> 1255 | </BODY></HTML> 1256 | 1257 | 1258 | <b>RESISTOR</b><p> 1259 | type 0207, grid 10 mm 1260 | 1261 | 1262 | 1263 | 1264 | 1265 | 1266 | 1267 | 1268 | 1269 | 1270 | 1271 | 1272 | 1273 | 1274 | 1275 | 1276 | 1277 | 1278 | 1279 | 1280 | >NAME 1281 | >VALUE 1282 | 1283 | 1284 | 1285 | 1286 | 1287 | 1288 | 1289 | 1290 | 1291 | 1292 | 1293 | 1294 | 1295 | 1296 | 1297 | 1298 | 1299 | 1300 | 1301 | 1302 | 1303 | 1304 | 1305 | 1306 | 1307 | 1308 | 1309 | 1310 | 1311 | 1312 | 1313 | 1314 | 1315 | 1316 | 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | 1324 | 1325 | 1326 | 1327 | 1328 | 1329 | 1330 | 1331 | 1332 | 1333 | 1334 | 1335 | 1336 | 1337 | 1338 | 1339 | 1340 | <B>Dual In Line</B><p> 1341 | package type P 1342 | 1343 | 1344 | 1345 | 1346 | 1347 | 1348 | 1349 | 1350 | 1351 | 1352 | 1353 | 1354 | 1355 | 1356 | 1357 | 1358 | 1359 | 1360 | 1361 | 1362 | 1363 | 1364 | 1365 | 1366 | >NAME 1367 | >VALUE 1368 | 1369 | 1370 | 1371 | 1372 | 1373 | 1374 | 1375 | 1376 | 1377 | 1378 | 1379 | 1380 | 1381 | 1382 | >NAME 1383 | >VALUE 1384 | 1385 | 1386 | 1387 | 1388 | 1389 | 1390 | 1391 | 1392 | 1393 | 1394 | <b>PIN HEADER</b> 1395 | 1396 | 1397 | 1398 | 1399 | 1400 | 1401 | 1402 | 1403 | 1404 | 1405 | 1406 | 1407 | 1408 | 1409 | 1410 | 1411 | 1412 | 1413 | 1414 | 1415 | 1416 | 1417 | 1418 | 1419 | 1420 | 1421 | 1422 | 1423 | 1424 | 1425 | 1426 | 1427 | 1428 | 1429 | 1430 | 1431 | 1432 | 1433 | 1434 | 1435 | 1436 | 1437 | 1438 | 1439 | 1440 | 1441 | 1442 | 1443 | 1444 | >NAME 1445 | >VALUE 1446 | 1447 | 1448 | 1449 | 1450 | 1451 | 1452 | 1453 | 1454 | 1455 | 1456 | <b>Potentiometers</b><p> 1457 | Beckman, Copal, Piher, Spectrol, Schukat<p> 1458 | <author>Created by librarian@cadsoft.de</author> 1459 | 1460 | 1461 | <b>POTENTIOMETER</b><p> 1462 | distributor Schukat 1463 | 1464 | 1465 | 1466 | 1467 | 1468 | 1469 | 1470 | 1471 | 1472 | 1473 | 1474 | 1475 | 1476 | 1477 | 1478 | 1479 | 1480 | 1481 | 1482 | 1483 | 1484 | 1485 | 1486 | 1487 | 1488 | 1489 | 1490 | 1491 | 1492 | 1493 | 1494 | 1495 | 1496 | 1497 | 1498 | 1499 | 1500 | 1501 | >NAME 1502 | >VALUE 1503 | 1504 | 1505 | 1506 | 1507 | 1508 | 1509 | 1510 | 1511 | 1512 | 1513 | <b>Female Headers etc.</b><p> 1514 | Naming:<p> 1515 | FE = female<p> 1516 | # contacts - # rows<p> 1517 | W = angled<p> 1518 | <author>Created by librarian@cadsoft.de</author> 1519 | 1520 | 1521 | <b>FEMALE HEADER</b> 1522 | 1523 | 1524 | 1525 | 1526 | 1527 | 1528 | 1529 | 1530 | 1531 | 1532 | 1533 | 1534 | 1535 | 1536 | 1537 | 1538 | 1539 | 1540 | 1541 | 1542 | 1543 | 1544 | 1545 | 1546 | 1547 | 1548 | 1549 | 1550 | 1551 | 1552 | 1553 | 1554 | 1555 | 1556 | 1557 | 1558 | 1559 | 1560 | 1561 | 1562 | 1563 | 1564 | 1565 | 1566 | 1567 | 1568 | 1569 | 1570 | 1571 | 1572 | 1573 | 1574 | 1575 | 1576 | 1577 | 1578 | 1579 | 1580 | 1581 | 1582 | 1583 | 1584 | 1585 | 1586 | 1587 | 1588 | 1589 | 1590 | 1591 | 1592 | 1593 | 1594 | 1595 | 1596 | 1597 | 1598 | 1599 | 1600 | 1601 | 1602 | 1603 | 1604 | 1605 | 1606 | 1607 | 1608 | >NAME 1609 | 1 1610 | 26 1611 | >VALUE 1612 | 1613 | 1614 | 1615 | 1616 | 1617 | 1618 | 1619 | 1620 | 1621 | 1622 | 1623 | 1624 | 1625 | <b>EAGLE Design Rules</b> 1626 | <p> 1627 | Die Standard-Design-Rules sind so gewählt, dass sie für 1628 | die meisten Anwendungen passen. Sollte ihre Platine 1629 | besondere Anforderungen haben, treffen Sie die erforderlichen 1630 | Einstellungen hier und speichern die Design Rules unter 1631 | einem neuen Namen ab. 1632 | <b>Laen's PCB Order Design Rules</b> 1633 | <p> 1634 | Please make sure your boards conform to these design rules. 1635 | 1636 | 1637 | 1638 | 1639 | 1640 | 1641 | 1642 | 1643 | 1644 | 1645 | 1646 | 1647 | 1648 | 1649 | 1650 | 1651 | 1652 | 1653 | 1654 | 1655 | 1656 | 1657 | 1658 | 1659 | 1660 | 1661 | 1662 | 1663 | 1664 | 1665 | 1666 | 1667 | 1668 | 1669 | 1670 | 1671 | 1672 | 1673 | 1674 | 1675 | 1676 | 1677 | 1678 | 1679 | 1680 | 1681 | 1682 | 1683 | 1684 | 1685 | 1686 | 1687 | 1688 | 1689 | 1690 | 1691 | 1692 | 1693 | 1694 | 1695 | 1696 | 1697 | 1698 | 1699 | 1700 | 1701 | 1702 | 1703 | 1704 | 1705 | 1706 | 1707 | 1708 | 1709 | 1710 | 1711 | 1712 | 1713 | 1714 | 1715 | 1716 | 1717 | 1718 | 1719 | 1720 | 1721 | 1722 | 1723 | 1724 | 1725 | 1726 | 1727 | 1728 | 1729 | 1730 | 1731 | 1732 | 1733 | 1734 | 1735 | 1736 | 1737 | 1738 | 1739 | 1740 | 1741 | 1742 | 1743 | 1744 | 1745 | 1746 | 1747 | 1748 | 1749 | 1750 | 1751 | 1752 | 1753 | 1754 | 1755 | 1756 | 1757 | 1758 | 1759 | 1760 | 1761 | 1762 | 1763 | 1764 | 1765 | 1766 | 1767 | 1768 | 1769 | 1770 | 1771 | 1772 | 1773 | 1774 | 1775 | 1776 | 1777 | 1778 | 1779 | 1780 | 1781 | 1782 | 1783 | 1784 | 1785 | 1786 | 1787 | 1788 | 1789 | 1790 | 1791 | 1792 | 1793 | 1794 | 1795 | 1796 | 1797 | 1798 | 1799 | 1800 | 1801 | 1802 | 1803 | 1804 | 1805 | 1806 | 1807 | 1808 | 1809 | 1810 | 1811 | 1812 | 1813 | 1814 | 1815 | 1816 | 1817 | 1818 | 1819 | 1820 | 1821 | 1822 | 1823 | 1824 | 1825 | 1826 | 1827 | 1828 | 1829 | 1830 | 1831 | 1832 | 1833 | 1834 | 1835 | 1836 | 1837 | 1838 | 1839 | 1840 | 1841 | 1842 | 1843 | 1844 | 1845 | 1846 | 1847 | 1848 | 1849 | 1850 | 1851 | 1852 | 1853 | 1854 | 1855 | 1856 | 1857 | 1858 | 1859 | 1860 | 1861 | 1862 | 1863 | 1864 | 1865 | 1866 | 1867 | 1868 | 1869 | 1870 | 1871 | 1872 | 1873 | 1874 | 1875 | 1876 | 1877 | 1878 | 1879 | 1880 | 1881 | 1882 | 1883 | 1884 | 1885 | 1886 | 1887 | 1888 | 1889 | 1890 | 1891 | 1892 | 1893 | 1894 | 1895 | 1896 | 1897 | 1898 | 1899 | 1900 | 1901 | 1902 | 1903 | 1904 | 1905 | 1906 | 1907 | 1908 | 1909 | 1910 | 1911 | 1912 | 1913 | 1914 | 1915 | 1916 | 1917 | 1918 | 1919 | 1920 | 1921 | 1922 | 1923 | 1924 | 1925 | 1926 | 1927 | 1928 | 1929 | 1930 | 1931 | 1932 | 1933 | 1934 | 1935 | 1936 | 1937 | 1938 | 1939 | 1940 | 1941 | 1942 | 1943 | 1944 | 1945 | 1946 | 1947 | 1948 | 1949 | 1950 | 1951 | 1952 | 1953 | 1954 | 1955 | 1956 | 1957 | 1958 | 1959 | 1960 | 1961 | 1962 | 1963 | 1964 | 1965 | 1966 | 1967 | 1968 | 1969 | 1970 | 1971 | 1972 | 1973 | 1974 | 1975 | 1976 | 1977 | 1978 | 1979 | 1980 | 1981 | 1982 | 1983 | 1984 | 1985 | 1986 | 1987 | 1988 | 1989 | 1990 | 1991 | 1992 | 1993 | 1994 | 1995 | 1996 | 1997 | 1998 | 1999 | 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | 2027 | 2028 | 2029 | 2030 | 2031 | 2032 | 2033 | 2034 | 2035 | 2036 | 2037 | 2038 | 2039 | 2040 | 2041 | 2042 | 2043 | 2044 | 2045 | 2046 | 2047 | 2048 | 2049 | 2050 | 2051 | 2052 | 2053 | 2054 | 2055 | 2056 | 2057 | 2058 | 2059 | 2060 | 2061 | 2062 | 2063 | 2064 | 2065 | 2066 | 2067 | 2068 | 2069 | 2070 | 2071 | 2072 | 2073 | 2074 | 2075 | 2076 | 2077 | 2078 | 2079 | 2080 | 2081 | 2082 | 2083 | 2084 | 2085 | 2086 | 2087 | 2088 | 2089 | 2090 | 2091 | 2092 | 2093 | 2094 | 2095 | 2096 | 2097 | 2098 | 2099 | 2100 | 2101 | 2102 | 2103 | 2104 | Since Version 6.2.2 text objects can contain more than one line, 2105 | which will not be processed correctly with this version. 2106 | 2107 | 2108 | 2109 | -------------------------------------------------------------------------------- /SwitchPi-v0.1.dru: -------------------------------------------------------------------------------- 1 | description[de] = EAGLE Design Rules\n

\nDie Standard-Design-Rules sind so gewählt, dass sie für \ndie meisten Anwendungen passen. Sollte ihre Platine \nbesondere Anforderungen haben, treffen Sie die erforderlichen\nEinstellungen hier und speichern die Design Rules unter \neinem neuen Namen ab. 2 | description[en] = Laen's PCB Order Design Rules\n

\nPlease make sure your boards conform to these design rules. 3 | layerSetup = (1*16) 4 | mtCopper = 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 0.0356mm 5 | mtIsolate = 1.5011mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 0.1499mm 0.2007mm 6 | mdWireWire = 6mil 7 | mdWirePad = 6mil 8 | mdWireVia = 6mil 9 | mdPadPad = 6mil 10 | mdPadVia = 6mil 11 | mdViaVia = 6mil 12 | mdSmdPad = 6mil 13 | mdSmdVia = 6mil 14 | mdSmdSmd = 6mil 15 | mdViaViaSameLayer = 8mil 16 | mnLayersViaInSmd = 2 17 | mdCopperDimension = 15mil 18 | mdDrill = 6mil 19 | mdSmdStop = 0mil 20 | msWidth = 6mil 21 | msDrill = 13mil 22 | msMicroVia = 13mil 23 | msBlindViaRatio = 0.500000 24 | rvPadTop = 0.250000 25 | rvPadInner = 0.250000 26 | rvPadBottom = 0.250000 27 | rvViaOuter = 0.250000 28 | rvViaInner = 0.250000 29 | rvMicroViaOuter = 0.250000 30 | rvMicroViaInner = 0.250000 31 | rlMinPadTop = 7mil 32 | rlMaxPadTop = 20mil 33 | rlMinPadInner = 7mil 34 | rlMaxPadInner = 20mil 35 | rlMinPadBottom = 7mil 36 | rlMaxPadBottom = 20mil 37 | rlMinViaOuter = 7mil 38 | rlMaxViaOuter = 20mil 39 | rlMinViaInner = 7mil 40 | rlMaxViaInner = 20mil 41 | rlMinMicroViaOuter = 4mil 42 | rlMaxMicroViaOuter = 20mil 43 | rlMinMicroViaInner = 4mil 44 | rlMaxMicroViaInner = 20mil 45 | psTop = -1 46 | psBottom = -1 47 | psFirst = -1 48 | psElongationLong = 100 49 | psElongationOffset = 100 50 | mvStopFrame = 1.000000 51 | mvCreamFrame = 0.000000 52 | mlMinStopFrame = 4mil 53 | mlMaxStopFrame = 4mil 54 | mlMinCreamFrame = 0mil 55 | mlMaxCreamFrame = 0mil 56 | mlViaStopLimit = 0mil 57 | srRoundness = 0.000000 58 | srMinRoundness = 0mil 59 | srMaxRoundness = 0mil 60 | slThermalGap = 0.500000 61 | slMinThermalGap = 20mil 62 | slMaxThermalGap = 100mil 63 | slAnnulusIsolate = 20mil 64 | slThermalIsolate = 10mil 65 | slAnnulusRestring = 0 66 | slThermalRestring = 1 67 | slThermalsForVias = 0 68 | checkGrid = 0 69 | checkAngle = 0 70 | checkFont = 1 71 | checkRestrict = 1 72 | useDiameter = 13 73 | maxErrors = 50 74 | -------------------------------------------------------------------------------- /SwitchPi-v0.1.pro: -------------------------------------------------------------------------------- 1 | EAGLE AutoRouter Statistics: 2 | 3 | Job : /Users/krice/Documents/eagle/switchpi/SwitchPi-v0.1.brd 4 | 5 | Start at : 10:55:44 (2/24/13) 6 | End at : 10:55:44 (2/24/13) 7 | Elapsed time : 00:00:00 8 | 9 | Signals : 31 RoutingGrid: 50 mil Layers: 2 10 | Connections : 51 predefined: 2 ( 0 Vias ) 11 | 12 | Router memory : 13936 13 | 14 | Passname : Busses Route Optimize1 Optimize2 Optimize3 Optimize4 15 | 16 | Time per pass : 00:00:00 00:00:00 00:00:00 00:00:00 00:00:00 00:00:00 17 | Number of Ripups : 0 0 0 0 0 0 18 | max. Level : 0 0 0 0 0 0 19 | max. Total : 0 0 0 0 0 0 20 | 21 | Routed : 18 49 49 49 49 49 22 | Vias : 0 38 8 6 6 6 23 | Resolution : 39.2 % 100.0 % 100.0 % 100.0 % 100.0 % 100.0 % 24 | 25 | Final : 100.0% finished 26 | -------------------------------------------------------------------------------- /SwitchPi-v0.1_DL.scr: -------------------------------------------------------------------------------- 1 | OPEN '/Users/krice/Documents/eagle/AdaKeyPad/drilegend.lbr'; 2 | Edit drilegend.pac 3 | LAYER 144 DrillLegend; 4 | Display none; 5 | Display 144; 6 | Set Wire_Bend 2; 7 | Grid mil 25 1 mil; 8 | Layer 1 Top; 9 | Layer 16 Bottom; 10 | Layer 17 Pads; 11 | Layer 18 Vias; 12 | Layer 20 Dimension; 13 | Layer 21 tPlace; 14 | Layer 23 tOrigins; 15 | Layer 25 tNames; 16 | Layer 27 tValues; 17 | Layer 29 tStop; 18 | Layer 30 bStop; 19 | Layer 43 vRestrict; 20 | Layer 44 Drills; 21 | Layer 45 Holes; 22 | Layer 51 tDocu; 23 | Layer 125 _tNames; 24 | Layer 144 DrillLegend; 25 | Change layer 144; 26 | Change Size 70.0000; 27 | Change Ratio 5; 28 | Change Font Vector; 29 | MARK; 30 | Text 'Sym' R0 (26 22); 31 | Wire 4 (0 0) (230 0) (230 115); 32 | Text 'N°' R0 (246 22); 33 | Wire 4 (230 0) (380 0) (380 115); 34 | Text 'MM' R0 (786 22); 35 | Wire 4 (690 0) (1000 0) (1000 115); 36 | Text 'Mils' R0 (416 22); 37 | Wire 4 (380 0) (690 0) (690 115); 38 | Text 'Qty' R0 (1026 22); 39 | Wire 4 (1000 0) (1230 0) (1230 115); 40 | Text 'Plated' R0 (1282 22); 41 | Wire 4 (1230 0) (1690 0) (1690 115); 42 | Wire 4 (R115 -38) (R115 -78); 43 | Wire 4 (R95 -58) (R135 -58); 44 | Wire 4 (0 -115) (230 -115) (230 115); 45 | Text '1' R0 (275 -93); 46 | Wire 4 (230 -115) (380 -115) (380 115); 47 | Text '0.61' R0 (726 -93); 48 | Wire 4 (690 -115) (1000 -115) (1000 115); 49 | Text '24' R0 (476 -93); 50 | Wire 4 (380 -115) (690 -115) (690 115); 51 | Text '40' R0 (1056 -93); 52 | Wire 4 (1000 -115) (1230 -115) (1230 115); 53 | Text 'YES' R0 (1371 -93); 54 | Wire 4 (1230 -115) (1690 -115) (1690 115); 55 | Wire 4 (R95 -153) (R135 -193); 56 | Wire 4 (R135 -153) (R95 -193); 57 | Wire 4 (0 -230) (230 -230) (230 115); 58 | Text '2' R0 (275 -208); 59 | Wire 4 (230 -230) (380 -230) (380 115); 60 | Text '0.81' R0 (726 -208); 61 | Wire 4 (690 -230) (1000 -230) (1000 115); 62 | Text '32' R0 (476 -208); 63 | Wire 4 (380 -230) (690 -230) (690 115); 64 | Text '52' R0 (1056 -208); 65 | Wire 4 (1000 -230) (1230 -230) (1230 115); 66 | Text 'YES' R0 (1371 -208); 67 | Wire 4 (1230 -230) (1690 -230) (1690 115); 68 | Wire 4 (R115 -288) (R115 -268) (R135 -268) (R135 -308) (R95 -308) (R95 -268) (R115 -268); 69 | Wire 4 (0 -345) (230 -345) (230 115); 70 | Text '3' R0 (275 -323); 71 | Wire 4 (230 -345) (380 -345) (380 115); 72 | Text '0.91' R0 (726 -323); 73 | Wire 4 (690 -345) (1000 -345) (1000 115); 74 | Text '36' R0 (476 -323); 75 | Wire 4 (380 -345) (690 -345) (690 115); 76 | Text '26' R0 (1056 -323); 77 | Wire 4 (1000 -345) (1230 -345) (1230 115); 78 | Text 'YES' R0 (1371 -323); 79 | Wire 4 (1230 -345) (1690 -345) (1690 115); 80 | Wire 4 (R115 -403) (R115 -383) (R135 -403) (R115 -423) (R95 -403) (R115 -383); 81 | Wire 4 (0 -460) (230 -460) (230 115); 82 | Text '4' R0 (275 -438); 83 | Wire 4 (230 -460) (380 -460) (380 115); 84 | Text '1.00' R0 (726 -438); 85 | Wire 4 (690 -460) (1000 -460) (1000 115); 86 | Text '39' R0 (476 -438); 87 | Wire 4 (380 -460) (690 -460) (690 115); 88 | Text '18' R0 (1056 -438); 89 | Wire 4 (1000 -460) (1230 -460) (1230 115); 90 | Text 'YES' R0 (1371 -438); 91 | Wire 4 (1230 -460) (1690 -460) (1690 115); 92 | Wire 4 (R95 -498) (R135 -498) (R95 -538) (R135 -538) (R95 -498); 93 | Wire 4 (0 -575) (230 -575) (230 115); 94 | Text '5' R0 (275 -553); 95 | Wire 4 (230 -575) (380 -575) (380 115); 96 | Text '1.02' R0 (726 -553); 97 | Wire 4 (690 -575) (1000 -575) (1000 115); 98 | Text '40' R0 (476 -553); 99 | Wire 4 (380 -575) (690 -575) (690 115); 100 | Text '31' R0 (1056 -553); 101 | Wire 4 (1000 -575) (1230 -575) (1230 115); 102 | Text 'YES' R0 (1371 -553); 103 | Wire 4 (1230 -575) (1690 -575) (1690 115); 104 | Wire 4 (R95 -613) (R135 -653) (R135 -613) (R95 -653) (R95 -613); 105 | Wire 4 (0 -690) (230 -690) (230 115); 106 | Text '6' R0 (275 -668); 107 | Wire 4 (230 -690) (380 -690) (380 115); 108 | Text '2.80' R0 (726 -668); 109 | Wire 4 (690 -690) (1000 -690) (1000 115); 110 | Text '110' R0 (446 -668); 111 | Wire 4 (380 -690) (690 -690) (690 115); 112 | Text '4' R0 (1085 -668); 113 | Wire 4 (1000 -690) (1230 -690) (1230 115); 114 | Text 'NOT' R0 (1371 -668); 115 | Wire 4 (1230 -690) (1690 -690) (1690 115); 116 | Wire 4 (0 0) (1690 0) (1690 115); 117 | Wire 4 (1690 115) (0 115) (0 0); 118 | Wire 8 (0 -690) (1690 -690) (1690 115); 119 | Wire 8 (1690 115) (0 115) (0 -690); 120 | WRITE '/Users/krice/Documents/eagle/AdaKeyPad/drilegend.lbr'; 121 | CLOSE; 122 | EDIT .brd; 123 | LAYER 144 DrillLegend; 124 | DISPLAY 23 44 45 144; 125 | GRID MIL 25 1 ; 126 | SET WIRE_BEND 2; 127 | USE '/Users/krice/Documents/eagle/AdaKeyPad/drilegend.lbr' 128 | ADD 'DRILEGEND' DRILEGEND R0 (-10.333 -150.000); 129 | LAYER 144 DrillLegend; 130 | TEXT 'LAYER-STACK' (-745.3333 -150.0000); 131 | LAYER 145 DrillLegend_01-16; 132 | SET FILL_LAYER 145 9; 133 | SET COLOR_LAYER 145 2; 134 | CHANGE SIZE 70.0000; 135 | TEXT '01-16' (-360.3333 -265.5000); 136 | MARK (450.0000 200.0000); 137 | Wire 4 (R0 20) (R0 -20); 138 | Wire 4 (R-20 0) (R20 0); 139 | MARK (1150.0000 1350.0000); 140 | Wire 4 (R0 20) (R0 -20); 141 | Wire 4 (R-20 0) (R20 0); 142 | MARK (1850.0000 1350.0000); 143 | Wire 4 (R0 20) (R0 -20); 144 | Wire 4 (R-20 0) (R20 0); 145 | MARK (1450.0000 650.0000); 146 | Wire 4 (R0 20) (R0 -20); 147 | Wire 4 (R-20 0) (R20 0); 148 | MARK (800.0000 2000.0000); 149 | Wire 4 (R0 20) (R0 -20); 150 | Wire 4 (R-20 0) (R20 0); 151 | MARK (800.0000 950.0000); 152 | Wire 4 (R0 20) (R0 -20); 153 | Wire 4 (R-20 0) (R20 0); 154 | MARK (900.0000 1350.0000); 155 | Wire 4 (R0 20) (R0 -20); 156 | Wire 4 (R-20 0) (R20 0); 157 | MARK (2150.0000 1450.0000); 158 | Wire 4 (R0 20) (R0 -20); 159 | Wire 4 (R-20 0) (R20 0); 160 | MARK (950.0000 1550.0000); 161 | Wire 4 (R0 20) (R0 -20); 162 | Wire 4 (R-20 0) (R20 0); 163 | MARK (2200.0000 1550.0000); 164 | Wire 4 (R0 20) (R0 -20); 165 | Wire 4 (R-20 0) (R20 0); 166 | MARK (2050.0000 800.0000); 167 | Wire 4 (R0 20) (R0 -20); 168 | Wire 4 (R-20 0) (R20 0); 169 | MARK (550.0000 1350.0000); 170 | Wire 4 (R0 20) (R0 -20); 171 | Wire 4 (R-20 0) (R20 0); 172 | MARK (2200.0000 1500.0000); 173 | Wire 4 (R0 20) (R0 -20); 174 | Wire 4 (R-20 0) (R20 0); 175 | MARK (250.0000 1700.0000); 176 | Wire 4 (R0 20) (R0 -20); 177 | Wire 4 (R-20 0) (R20 0); 178 | MARK (1650.0000 950.0000); 179 | Wire 4 (R0 20) (R0 -20); 180 | Wire 4 (R-20 0) (R20 0); 181 | MARK (300.0000 750.0000); 182 | Wire 4 (R0 20) (R0 -20); 183 | Wire 4 (R-20 0) (R20 0); 184 | MARK (1550.0000 1400.0000); 185 | Wire 4 (R0 20) (R0 -20); 186 | Wire 4 (R-20 0) (R20 0); 187 | MARK (500.0000 1350.0000); 188 | Wire 4 (R0 20) (R0 -20); 189 | Wire 4 (R-20 0) (R20 0); 190 | MARK (1450.0000 1650.0000); 191 | Wire 4 (R0 20) (R0 -20); 192 | Wire 4 (R-20 0) (R20 0); 193 | MARK (650.0000 750.0000); 194 | Wire 4 (R0 20) (R0 -20); 195 | Wire 4 (R-20 0) (R20 0); 196 | MARK (750.0000 950.0000); 197 | Wire 4 (R0 20) (R0 -20); 198 | Wire 4 (R-20 0) (R20 0); 199 | MARK (850.0000 1800.0000); 200 | Wire 4 (R0 20) (R0 -20); 201 | Wire 4 (R-20 0) (R20 0); 202 | MARK (1250.0000 1850.0000); 203 | Wire 4 (R0 20) (R0 -20); 204 | Wire 4 (R-20 0) (R20 0); 205 | MARK (1350.0000 300.0000); 206 | Wire 4 (R0 20) (R0 -20); 207 | Wire 4 (R-20 0) (R20 0); 208 | MARK (1900.0000 900.0000); 209 | Wire 4 (R0 20) (R0 -20); 210 | Wire 4 (R-20 0) (R20 0); 211 | MARK (1700.0000 1650.0000); 212 | Wire 4 (R0 20) (R0 -20); 213 | Wire 4 (R-20 0) (R20 0); 214 | MARK (700.0000 1700.0000); 215 | Wire 4 (R0 20) (R0 -20); 216 | Wire 4 (R-20 0) (R20 0); 217 | MARK (1000.0000 1300.0000); 218 | Wire 4 (R0 20) (R0 -20); 219 | Wire 4 (R-20 0) (R20 0); 220 | MARK (1550.0000 1300.0000); 221 | Wire 4 (R0 20) (R0 -20); 222 | Wire 4 (R-20 0) (R20 0); 223 | MARK (1150.0000 300.0000); 224 | Wire 4 (R0 20) (R0 -20); 225 | Wire 4 (R-20 0) (R20 0); 226 | MARK (700.0000 250.0000); 227 | Wire 4 (R0 20) (R0 -20); 228 | Wire 4 (R-20 0) (R20 0); 229 | MARK (600.0000 950.0000); 230 | Wire 4 (R0 20) (R0 -20); 231 | Wire 4 (R-20 0) (R20 0); 232 | MARK (1550.0000 1000.0000); 233 | Wire 4 (R0 20) (R0 -20); 234 | Wire 4 (R-20 0) (R20 0); 235 | MARK (350.0000 250.0000); 236 | Wire 4 (R0 20) (R0 -20); 237 | Wire 4 (R-20 0) (R20 0); 238 | MARK (650.0000 250.0000); 239 | Wire 4 (R0 20) (R0 -20); 240 | Wire 4 (R-20 0) (R20 0); 241 | MARK (1350.0000 650.0000); 242 | Wire 4 (R0 20) (R0 -20); 243 | Wire 4 (R-20 0) (R20 0); 244 | MARK (850.0000 1850.0000); 245 | Wire 4 (R0 20) (R0 -20); 246 | Wire 4 (R-20 0) (R20 0); 247 | MARK (500.0000 1850.0000); 248 | Wire 4 (R0 20) (R0 -20); 249 | Wire 4 (R-20 0) (R20 0); 250 | MARK (400.0000 1900.0000); 251 | Wire 4 (R0 20) (R0 -20); 252 | Wire 4 (R-20 0) (R20 0); 253 | MARK (800.0000 1950.0000); 254 | Wire 4 (R0 20) (R0 -20); 255 | Wire 4 (R-20 0) (R20 0); 256 | MARK (150.0000 550.0000); 257 | Wire 4 (R-20 20) (R20 -20); 258 | Wire 4 (R20 20) (R-20 -20); 259 | MARK (250.0000 550.0000); 260 | Wire 4 (R-20 20) (R20 -20); 261 | Wire 4 (R20 20) (R-20 -20); 262 | MARK (350.0000 550.0000); 263 | Wire 4 (R-20 20) (R20 -20); 264 | Wire 4 (R20 20) (R-20 -20); 265 | MARK (450.0000 550.0000); 266 | Wire 4 (R-20 20) (R20 -20); 267 | Wire 4 (R20 20) (R-20 -20); 268 | MARK (550.0000 550.0000); 269 | Wire 4 (R-20 20) (R20 -20); 270 | Wire 4 (R20 20) (R-20 -20); 271 | MARK (650.0000 550.0000); 272 | Wire 4 (R-20 20) (R20 -20); 273 | Wire 4 (R20 20) (R-20 -20); 274 | MARK (750.0000 550.0000); 275 | Wire 4 (R-20 20) (R20 -20); 276 | Wire 4 (R20 20) (R-20 -20); 277 | MARK (850.0000 550.0000); 278 | Wire 4 (R-20 20) (R20 -20); 279 | Wire 4 (R20 20) (R-20 -20); 280 | MARK (950.0000 550.0000); 281 | Wire 4 (R-20 20) (R20 -20); 282 | Wire 4 (R20 20) (R-20 -20); 283 | MARK (1050.0000 550.0000); 284 | Wire 4 (R-20 20) (R20 -20); 285 | Wire 4 (R20 20) (R-20 -20); 286 | MARK (1150.0000 550.0000); 287 | Wire 4 (R-20 20) (R20 -20); 288 | Wire 4 (R20 20) (R-20 -20); 289 | MARK (1250.0000 550.0000); 290 | Wire 4 (R-20 20) (R20 -20); 291 | Wire 4 (R20 20) (R-20 -20); 292 | MARK (1350.0000 550.0000); 293 | Wire 4 (R-20 20) (R20 -20); 294 | Wire 4 (R20 20) (R-20 -20); 295 | MARK (1450.0000 550.0000); 296 | Wire 4 (R-20 20) (R20 -20); 297 | Wire 4 (R20 20) (R-20 -20); 298 | MARK (1450.0000 850.0000); 299 | Wire 4 (R-20 20) (R20 -20); 300 | Wire 4 (R20 20) (R-20 -20); 301 | MARK (1350.0000 850.0000); 302 | Wire 4 (R-20 20) (R20 -20); 303 | Wire 4 (R20 20) (R-20 -20); 304 | MARK (1250.0000 850.0000); 305 | Wire 4 (R-20 20) (R20 -20); 306 | Wire 4 (R20 20) (R-20 -20); 307 | MARK (1150.0000 850.0000); 308 | Wire 4 (R-20 20) (R20 -20); 309 | Wire 4 (R20 20) (R-20 -20); 310 | MARK (1050.0000 850.0000); 311 | Wire 4 (R-20 20) (R20 -20); 312 | Wire 4 (R20 20) (R-20 -20); 313 | MARK (950.0000 850.0000); 314 | Wire 4 (R-20 20) (R20 -20); 315 | Wire 4 (R20 20) (R-20 -20); 316 | MARK (850.0000 850.0000); 317 | Wire 4 (R-20 20) (R20 -20); 318 | Wire 4 (R20 20) (R-20 -20); 319 | MARK (750.0000 850.0000); 320 | Wire 4 (R-20 20) (R20 -20); 321 | Wire 4 (R20 20) (R-20 -20); 322 | MARK (650.0000 850.0000); 323 | Wire 4 (R-20 20) (R20 -20); 324 | Wire 4 (R20 20) (R-20 -20); 325 | MARK (550.0000 850.0000); 326 | Wire 4 (R-20 20) (R20 -20); 327 | Wire 4 (R20 20) (R-20 -20); 328 | MARK (450.0000 850.0000); 329 | Wire 4 (R-20 20) (R20 -20); 330 | Wire 4 (R20 20) (R-20 -20); 331 | MARK (350.0000 850.0000); 332 | Wire 4 (R-20 20) (R20 -20); 333 | Wire 4 (R20 20) (R-20 -20); 334 | MARK (250.0000 850.0000); 335 | Wire 4 (R-20 20) (R20 -20); 336 | Wire 4 (R20 20) (R-20 -20); 337 | MARK (150.0000 850.0000); 338 | Wire 4 (R-20 20) (R20 -20); 339 | Wire 4 (R20 20) (R-20 -20); 340 | MARK (150.0000 100.0000); 341 | Wire 4 (R-20 20) (R20 -20); 342 | Wire 4 (R20 20) (R-20 -20); 343 | MARK (250.0000 100.0000); 344 | Wire 4 (R-20 20) (R20 -20); 345 | Wire 4 (R20 20) (R-20 -20); 346 | MARK (350.0000 100.0000); 347 | Wire 4 (R-20 20) (R20 -20); 348 | Wire 4 (R20 20) (R-20 -20); 349 | MARK (450.0000 100.0000); 350 | Wire 4 (R-20 20) (R20 -20); 351 | Wire 4 (R20 20) (R-20 -20); 352 | MARK (550.0000 100.0000); 353 | Wire 4 (R-20 20) (R20 -20); 354 | Wire 4 (R20 20) (R-20 -20); 355 | MARK (650.0000 100.0000); 356 | Wire 4 (R-20 20) (R20 -20); 357 | Wire 4 (R20 20) (R-20 -20); 358 | MARK (750.0000 100.0000); 359 | Wire 4 (R-20 20) (R20 -20); 360 | Wire 4 (R20 20) (R-20 -20); 361 | MARK (850.0000 100.0000); 362 | Wire 4 (R-20 20) (R20 -20); 363 | Wire 4 (R20 20) (R-20 -20); 364 | MARK (950.0000 100.0000); 365 | Wire 4 (R-20 20) (R20 -20); 366 | Wire 4 (R20 20) (R-20 -20); 367 | MARK (950.0000 400.0000); 368 | Wire 4 (R-20 20) (R20 -20); 369 | Wire 4 (R20 20) (R-20 -20); 370 | MARK (850.0000 400.0000); 371 | Wire 4 (R-20 20) (R20 -20); 372 | Wire 4 (R20 20) (R-20 -20); 373 | MARK (750.0000 400.0000); 374 | Wire 4 (R-20 20) (R20 -20); 375 | Wire 4 (R20 20) (R-20 -20); 376 | MARK (650.0000 400.0000); 377 | Wire 4 (R-20 20) (R20 -20); 378 | Wire 4 (R20 20) (R-20 -20); 379 | MARK (550.0000 400.0000); 380 | Wire 4 (R-20 20) (R20 -20); 381 | Wire 4 (R20 20) (R-20 -20); 382 | MARK (450.0000 400.0000); 383 | Wire 4 (R-20 20) (R20 -20); 384 | Wire 4 (R20 20) (R-20 -20); 385 | MARK (350.0000 400.0000); 386 | Wire 4 (R-20 20) (R20 -20); 387 | Wire 4 (R20 20) (R-20 -20); 388 | MARK (250.0000 400.0000); 389 | Wire 4 (R-20 20) (R20 -20); 390 | Wire 4 (R20 20) (R-20 -20); 391 | MARK (150.0000 400.0000); 392 | Wire 4 (R-20 20) (R20 -20); 393 | Wire 4 (R20 20) (R-20 -20); 394 | MARK (1600.0000 2500.0000); 395 | Wire 4 (R-20 20) (R20 -20); 396 | Wire 4 (R20 20) (R-20 -20); 397 | MARK (2000.0000 2500.0000); 398 | Wire 4 (R-20 20) (R20 -20); 399 | Wire 4 (R20 20) (R-20 -20); 400 | MARK (2150.0000 2500.0000); 401 | Wire 4 (R-20 20) (R20 -20); 402 | Wire 4 (R20 20) (R-20 -20); 403 | MARK (2550.0000 2500.0000); 404 | Wire 4 (R-20 20) (R20 -20); 405 | Wire 4 (R20 20) (R-20 -20); 406 | MARK (2700.0000 2500.0000); 407 | Wire 4 (R-20 20) (R20 -20); 408 | Wire 4 (R20 20) (R-20 -20); 409 | MARK (3100.0000 2500.0000); 410 | Wire 4 (R-20 20) (R20 -20); 411 | Wire 4 (R20 20) (R-20 -20); 412 | MARK (250.0000 2550.0000); 413 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 414 | MARK (250.0000 2450.0000); 415 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 416 | MARK (350.0000 2550.0000); 417 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 418 | MARK (350.0000 2450.0000); 419 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 420 | MARK (450.0000 2550.0000); 421 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 422 | MARK (450.0000 2450.0000); 423 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 424 | MARK (550.0000 2550.0000); 425 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 426 | MARK (550.0000 2450.0000); 427 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 428 | MARK (650.0000 2550.0000); 429 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 430 | MARK (650.0000 2450.0000); 431 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 432 | MARK (750.0000 2550.0000); 433 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 434 | MARK (750.0000 2450.0000); 435 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 436 | MARK (850.0000 2550.0000); 437 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 438 | MARK (850.0000 2450.0000); 439 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 440 | MARK (950.0000 2550.0000); 441 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 442 | MARK (950.0000 2450.0000); 443 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 444 | MARK (1050.0000 2550.0000); 445 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 446 | MARK (1050.0000 2450.0000); 447 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 448 | MARK (1150.0000 2550.0000); 449 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 450 | MARK (1150.0000 2450.0000); 451 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 452 | MARK (1250.0000 2550.0000); 453 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 454 | MARK (1250.0000 2450.0000); 455 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 456 | MARK (1350.0000 2550.0000); 457 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 458 | MARK (1350.0000 2450.0000); 459 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 460 | MARK (1450.0000 2550.0000); 461 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 462 | MARK (1450.0000 2450.0000); 463 | Wire 4 (R0 0) (R0 20) (R20 20) (R20 -20) (R-20 -20) (R-20 20) (R0 20); 464 | MARK (340.1575 2260.2362); 465 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 466 | MARK (440.1575 2260.2362); 467 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 468 | MARK (540.1575 2260.2362); 469 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 470 | MARK (640.1575 2260.2362); 471 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 472 | MARK (740.1575 2260.2362); 473 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 474 | MARK (840.1575 2260.2362); 475 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 476 | MARK (940.1575 2260.2362); 477 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 478 | MARK (1040.1575 2260.2362); 479 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 480 | MARK (1140.1575 2260.2362); 481 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 482 | MARK (1240.1575 2260.2362); 483 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 484 | MARK (1340.1575 2260.2362); 485 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 486 | MARK (1440.1575 2260.2362); 487 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 488 | MARK (1540.1575 2260.2362); 489 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 490 | MARK (1640.1575 2260.2362); 491 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 492 | MARK (1740.1575 2260.2362); 493 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 494 | MARK (1840.1575 2260.2362); 495 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 496 | MARK (1940.1575 2260.2362); 497 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 498 | MARK (2040.1575 2260.2362); 499 | Wire 4 (R0 0) (R0 20) (R20 0) (R0 -20) (R-20 0) (R0 20); 500 | MARK (2000.0000 200.0000); 501 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 502 | MARK (1900.0000 200.0000); 503 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 504 | MARK (1800.0000 200.0000); 505 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 506 | MARK (1700.0000 200.0000); 507 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 508 | MARK (1600.0000 200.0000); 509 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 510 | MARK (1500.0000 200.0000); 511 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 512 | MARK (1400.0000 200.0000); 513 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 514 | MARK (1300.0000 200.0000); 515 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 516 | MARK (1650.0000 600.0000); 517 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 518 | MARK (1850.0000 600.0000); 519 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 520 | MARK (1750.0000 800.0000); 521 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 522 | MARK (2422.0000 639.0000); 523 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 524 | MARK (2678.0000 639.0000); 525 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 526 | MARK (2422.0000 461.0000); 527 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 528 | MARK (2678.0000 461.0000); 529 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 530 | MARK (2822.0000 639.0000); 531 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 532 | MARK (3078.0000 639.0000); 533 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 534 | MARK (2822.0000 461.0000); 535 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 536 | MARK (3078.0000 461.0000); 537 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 538 | MARK (2422.0000 389.0000); 539 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 540 | MARK (2678.0000 389.0000); 541 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 542 | MARK (2422.0000 211.0000); 543 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 544 | MARK (2678.0000 211.0000); 545 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 546 | MARK (2422.0000 889.0000); 547 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 548 | MARK (2678.0000 889.0000); 549 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 550 | MARK (2422.0000 711.0000); 551 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 552 | MARK (2678.0000 711.0000); 553 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 554 | MARK (2022.0000 639.0000); 555 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 556 | MARK (2278.0000 639.0000); 557 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 558 | MARK (2022.0000 461.0000); 559 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 560 | MARK (2278.0000 461.0000); 561 | Wire 4 (R-20 20) (R20 20) (R-20 -20) (R20 -20) (R-20 20); 562 | LAYER 146 DrillLegend_01-20; 563 | SET FILL_LAYER 146 9; 564 | SET COLOR_LAYER 146 3; 565 | CHANGE SIZE 70.0000; 566 | TEXT '01-20' (-360.3333 -381.0000); 567 | MARK (123.6220 1039.7638); 568 | Wire 4 (R-20 20) (R20 -20) (R20 20) (R-20 -20) (R-20 20); 569 | MARK (123.6220 2260.2362); 570 | Wire 4 (R-20 20) (R20 -20) (R20 20) (R-20 -20) (R-20 20); 571 | MARK (3076.3780 2260.2362); 572 | Wire 4 (R-20 20) (R20 -20) (R20 20) (R-20 -20) (R-20 20); 573 | MARK (3076.3780 1039.7638); 574 | Wire 4 (R-20 20) (R20 -20) (R20 20) (R-20 -20) (R-20 20); 575 | DISPLAY -23 -44 -45; 576 | WIN FIT; 577 | GRID LAST; 578 | -------------------------------------------------------------------------------- /c_source/keypad: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swk/switchpi/adc1a357aacd97229f192a54638d9eab3ccb9b81/c_source/keypad -------------------------------------------------------------------------------- /c_source/keypad.c: -------------------------------------------------------------------------------- 1 | /* 2 | * keypad.c: quick keypad driver for i2c using wiringPi, MCP23017, and 3 | * 4x3 matrix Keypad 4 | *********************************************************************** 5 | * Copyright (c) 2013-2019 Ken Rice 6 | * 7 | * This code is based on and requires WiringPi the work of Gordon Henderson 8 | * for more info visit https://projects.drogon.net/raspberry-pi/wiringpi/ 9 | * 10 | * Version: MPL 1.1 11 | * 12 | * The contents of this file are subject to the Mozilla Public License Version 13 | * 1.1 (the "License"); you may not use this file except in compliance with 14 | * the License. You may obtain a copy of the License at 15 | * http://www.mozilla.org/MPL/ 16 | * 17 | * Software distributed under the License is distributed on an "AS IS" basis, 18 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 19 | * for the specific language governing rights and limitations under the 20 | * License. 21 | * 22 | * The Original Code is keypad.c 23 | * 24 | * The Initial Developer of the Original Code is 25 | * Ken Rice 26 | * Portions created by the Initial Developer are Copyright (C) 27 | * the Initial Developer. All Rights Reserved. 28 | * 29 | * Contributor(s): 30 | * 31 | * Ken Rice 32 | * 33 | * 34 | * keypad.c -- Main 35 | * 36 | * 37 | * to build: gcc -o keypad -lwiringPi keypad.c 38 | * see http://switchpi.org for schematics. 39 | * 40 | */ 41 | 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | 48 | #include 49 | #include 50 | 51 | // MCP23S17 Registers 52 | 53 | #define IOCON 0x0A 54 | 55 | #define IODIRA 0x00 56 | #define IPOLA 0x02 57 | #define GPINTENA 0x04 58 | #define DEFVALA 0x06 59 | #define INTCONA 0x08 60 | #define GPPUA 0x0C 61 | #define INTFA 0x0E 62 | #define INTCAPA 0x10 63 | #define GPIOA 0x12 64 | #define OLATA 0x14 65 | 66 | #define IODIRB 0x01 67 | #define IPOLB 0x03 68 | #define GPINTENB 0x05 69 | #define DEFVALB 0x07 70 | #define INTCONB 0x09 71 | #define GPPUB 0x0D 72 | #define INTFB 0x0F 73 | #define INTCAPB 0x11 74 | #define GPIOB 0x13 75 | #define OLATB 0x15 76 | 77 | // Bits in the IOCON register 78 | 79 | #define IOCON_BANK_MODE 0x80 80 | #define IOCON_MIRROR 0x40 81 | #define IOCON_SEQOP 0x20 82 | #define IOCON_DISSLW 0x10 83 | #define IOCON_HAEN 0x08 84 | #define IOCON_ODR 0x04 85 | #define IOCON_INTPOL 0x02 86 | #define IOCON_UNUSED 0x01 87 | 88 | // Default initialisation mode 89 | 90 | #define IOCON_INIT (IOCON_SEQOP) 91 | 92 | // GPIO Pins 93 | #define PIN1 (1 << 0) 94 | #define PIN2 (1 << 1) 95 | #define PIN3 (1 << 2) 96 | #define PIN4 (1 << 3) 97 | #define PIN5 (1 << 4) 98 | #define PIN6 (1 << 5) 99 | #define PIN7 (1 << 6) 100 | #define PIN8 (1 << 7) 101 | 102 | // Something to output bit batters to screen 103 | // exmaple: printf("input pins a "BYTETOBINARYPATTERN, BYTETOBINARY(single_byte_buffer)); 104 | #define BYTETOBINARYPATTERN "%d%d%d%d%d%d%d%d\n" 105 | #define BYTETOBINARY(byte) \ 106 | (byte & 0x80 ? 1 : 0), \ 107 | (byte & 0x40 ? 1 : 0), \ 108 | (byte & 0x20 ? 1 : 0), \ 109 | (byte & 0x10 ? 1 : 0), \ 110 | (byte & 0x08 ? 1 : 0), \ 111 | (byte & 0x04 ? 1 : 0), \ 112 | (byte & 0x02 ? 1 : 0), \ 113 | (byte & 0x01 ? 1 : 0) 114 | 115 | // couple of macros to help bit flipping 116 | #define SET_PIN_INPUT(x, y) (x |= y) 117 | #define SET_PIN_OUTPUT(x, y) (x &= (~y)) 118 | #define IS_SET(x,y) (x&y) 119 | 120 | /* 121 | ********************************************************************************* 122 | * The works 123 | ********************************************************************************* 124 | */ 125 | 126 | int main (int argc, char *argv []) 127 | { 128 | int q2w ; 129 | int foo = 0; 130 | int bar = 0; 131 | int oldfoo = 0; 132 | int shit = 0; 133 | int row = 0, col = 0; 134 | char output[3] = {0}; 135 | 136 | char *key[4] = { "123", "456", "789", "*0#" }; 137 | 138 | setbuf(stdout, NULL); //diable stdout buffer 139 | 140 | if ((q2w = wiringPiI2CSetup (0x24)) == -1) // 0x24 is the address of the MCP23017 141 | { fprintf (stderr, "q2w: Unable to initialise I2C: %s\n", strerror (errno)) ; return 1 ; } 142 | 143 | // Very simple direct control of the MCP23017: 144 | 145 | wiringPiI2CWriteReg8 (q2w, IOCON, IOCON_INIT) ; // Initialize the 23017 146 | wiringPiI2CWriteReg8 (q2w, IODIRA, 0xF0); // All On 147 | wiringPiI2CWriteReg8 (q2w, INTCONA, 0xF0); // Enable Int Contol on Pins 5-8 148 | wiringPiI2CWriteReg8 (q2w, DEFVALA, 0xF0); // Set Default high for pins 5-8 low for 1-4 149 | wiringPiI2CWriteReg8 (q2w, GPINTENA, 0xF0); // Enable Interrupt-On-Change on Pins 5-8 150 | wiringPiI2CWriteReg8 (q2w, GPPUA, 0x0F); // Set Internal Pull Ups on pins 1-4 (external Used on 5-8) 151 | wiringPiI2CWriteReg8 (q2w, GPIOA, 0xF0); // turn on output on Pins 5-8 152 | 153 | for (;;) 154 | { 155 | foo = wiringPiI2CReadReg8 (q2w, GPIOA) ; // Read Output 156 | if (oldfoo != foo) { // if output has changed do something 157 | oldfoo = foo; 158 | 159 | if (!IS_SET(foo, PIN8)) row=1; // Figure out the Row that was pressed 160 | else if (!IS_SET(foo, PIN7)) row=2; 161 | else if (!IS_SET(foo, PIN6)) row=3; 162 | else if (!IS_SET(foo, PIN5)) row=4; 163 | if (row > 0) { 164 | wiringPiI2CWriteReg8 (q2w, OLATA, 0x00) ; // Clear latching 165 | wiringPiI2CWriteReg8 (q2w, IODIRA, 0X0F) ; // Set Cols to Input, Rows to Output 166 | bar = wiringPiI2CReadReg8 (q2w, GPIOA) ; // Read the Inputs 167 | if (!IS_SET(bar, PIN4)) col = 1; // Figure out which Column 168 | if (!IS_SET(bar, PIN3)) col = 2; 169 | if (!IS_SET(bar, PIN2)) col = 3; 170 | wiringPiI2CWriteReg8 (q2w, IODIRA, 0XF0) ; // reset cols to output and rows to input 171 | } 172 | if (row && col) { 173 | snprintf(output, 2, "%c", key[row-1][col-1]); // convert Col/Row to standard DTMF pad chars 174 | printf("%s", output); 175 | if (strcmp(output, "#") == 0) printf("\n"); // if we got a # print a line feed 176 | row = 0; // Reset row and col to 0 for next time 177 | col = 0; 178 | } 179 | } 180 | delay(15); // delay 15ms... we dont need to hammer the bus 181 | } 182 | 183 | return 0 ; 184 | } 185 | -------------------------------------------------------------------------------- /drilegend.lbr: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | Sym 65 | 66 | 67 | 68 | 69 | 70 | MM 71 | 72 | Mils 73 | 74 | 75 | Qty 76 | 77 | 78 | Plated 79 | 80 | 81 | 82 | 83 | 84 | 1 85 | 86 | 87 | 0.61 88 | 89 | 24 90 | 91 | 92 | 93 | 40 94 | 95 | 96 | YES 97 | 98 | 99 | 100 | 101 | 102 | 103 | 2 104 | 105 | 106 | 0.81 107 | 108 | 32 109 | 110 | 111 | 112 | 52 113 | 114 | 115 | YES 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 3 127 | 128 | 129 | 0.91 130 | 131 | 36 132 | 133 | 134 | 135 | 26 136 | 137 | 138 | YES 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 4 149 | 150 | 151 | 1.00 152 | 153 | 39 154 | 155 | 156 | 157 | 18 158 | 159 | 160 | YES 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 5 170 | 171 | 172 | 1.02 173 | 174 | 40 175 | 176 | 177 | 178 | 31 179 | 180 | 181 | YES 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 6 191 | 192 | 193 | 2.80 194 | 195 | 110 196 | 197 | 198 | 199 | 4 200 | 201 | 202 | NOT 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | -------------------------------------------------------------------------------- /eagle.epf: -------------------------------------------------------------------------------- 1 | [Eagle] 2 | Version="06 04 00" 3 | Platform="Mac OS X" 4 | Serial="6E039A1D15-LSR-WLM-1EL" 5 | Globals="Globals" 6 | Desktop="Desktop" 7 | 8 | [Globals] 9 | AutoSaveProject=1 10 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/19inch.lbr" 11 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/40xx.lbr" 12 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/41xx.lbr" 13 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/45xx.lbr" 14 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/74ac-logic.lbr" 15 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/74ttl-din.lbr" 16 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/74xx-eu.lbr" 17 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/74xx-little-de.lbr" 18 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/74xx-little-us.lbr" 19 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/74xx-us.lbr" 20 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/751xx.lbr" 21 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/adafruit.lbr" 22 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/advanced-test-technologies.lbr" 23 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/agilent-technologies.lbr" 24 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/allegro.lbr" 25 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/altera-cyclone-II.lbr" 26 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/altera-cyclone-III.lbr" 27 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/altera-stratix-iv.lbr" 28 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/altera.lbr" 29 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/am29-memory.lbr" 30 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/amd-mach.lbr" 31 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/amd.lbr" 32 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/amis.lbr" 33 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/analog-devices.lbr" 34 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/ase.lbr" 35 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/atmel.lbr" 36 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/austriamicrosystems.lbr" 37 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/avago.lbr" 38 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/axis.lbr" 39 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/battery.lbr" 40 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/belton-engineering.lbr" 41 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/burr-brown.lbr" 42 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/busbar.lbr" 43 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/buzzer.lbr" 44 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/c-trimm.lbr" 45 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/california-micro-devices.lbr" 46 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/capacitor-wima.lbr" 47 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/chipcard-siemens.lbr" 48 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/cirrus-logic.lbr" 49 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-3m.lbr" 50 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-4ucon.lbr" 51 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-amp-champ.lbr" 52 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-amp-micromatch.lbr" 53 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-amp-mt.lbr" 54 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-amp-mt6.lbr" 55 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-amp-quick.lbr" 56 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-amp-te.lbr" 57 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-amp.lbr" 58 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-amphenol.lbr" 59 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-avx.lbr" 60 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-berg.lbr" 61 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-bosch.lbr" 62 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-chipcard-iso7816.lbr" 63 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-coax.lbr" 64 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-commcon.lbr" 65 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-conrad.lbr" 66 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-cpci.lbr" 67 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-cui.lbr" 68 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-cypressindustries.lbr" 69 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-deutsch.lbr" 70 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-dil.lbr" 71 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-ebyelectro.lbr" 72 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-elco.lbr" 73 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-erni.lbr" 74 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-faston.lbr" 75 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-fci.lbr" 76 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-friwo.lbr" 77 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-garry.lbr" 78 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-harting-h.lbr" 79 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-harting-ml.lbr" 80 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-harting-v.lbr" 81 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-harting.lbr" 82 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-hirose.lbr" 83 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-hirschmann.lbr" 84 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-jack.lbr" 85 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-jae.lbr" 86 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-jst.lbr" 87 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-kycon.lbr" 88 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-kyocera-elco.lbr" 89 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-lemo.lbr" 90 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-leotronics.lbr" 91 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-lsta.lbr" 92 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-lstb.lbr" 93 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-lumberg.lbr" 94 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-ml.lbr" 95 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-molex.lbr" 96 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-neutrik_ag.lbr" 97 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-omron.lbr" 98 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-panasonic.lbr" 99 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-panduit.lbr" 100 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-pc.lbr" 101 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-pc104.lbr" 102 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-phoenix-254.lbr" 103 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-phoenix-3.81.lbr" 104 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-phoenix-350.lbr" 105 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-phoenix-500.lbr" 106 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-phoenix-508.lbr" 107 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-phoenix-762.lbr" 108 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-phoenix-me_max.lbr" 109 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-phoenix-mkds_5.lbr" 110 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-phoenix-smkdsp.lbr" 111 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-ptr500.lbr" 112 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-pulse.lbr" 113 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-rib.lbr" 114 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-samtec.lbr" 115 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-shallin.lbr" 116 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-shiua-chyuan.lbr" 117 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-stewart.lbr" 118 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-stocko.lbr" 119 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-subd.lbr" 120 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-sullinselectronics.lbr" 121 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-thomas-betts.lbr" 122 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-tyco.lbr" 123 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-tycoelectronics.lbr" 124 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-vg.lbr" 125 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-wago-500.lbr" 126 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-wago-508.lbr" 127 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-wago.lbr" 128 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-wago255.lbr" 129 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-weidmueller-sl35.lbr" 130 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-wenzhou-yihua.lbr" 131 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-xmultiple.lbr" 132 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/con-yamaichi.lbr" 133 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/crystal.lbr" 134 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/csr.lbr" 135 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/cypress.lbr" 136 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/davicom.lbr" 137 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/dc-dc-converter.lbr" 138 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/dimensions.lbr" 139 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/diode.lbr" 140 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/discrete.lbr" 141 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/display-hp.lbr" 142 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/display-kingbright.lbr" 143 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/display-lcd.lbr" 144 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/docu-dummy.lbr" 145 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/eagle-ltspice.lbr" 146 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/ecl.lbr" 147 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/em-microelectronic.lbr" 148 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/etx-board.lbr" 149 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/exar.lbr" 150 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/fairchild-semic.lbr" 151 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/farnell.lbr" 152 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/fiber-optic-hp.lbr" 153 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/fiber-optic-siemens.lbr" 154 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/fifo.lbr" 155 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/flexipanel.lbr" 156 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/fox-electronics.lbr" 157 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/frames.lbr" 158 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/freescale.lbr" 159 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/ftdichip.lbr" 160 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/fujitsu.lbr" 161 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/fuse.lbr" 162 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/gennum.lbr" 163 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/halo-electronics.lbr" 164 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/heatsink.lbr" 165 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/holes.lbr" 166 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/holtek.lbr" 167 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/ic-package.lbr" 168 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/inductor-coilcraft.lbr" 169 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/inductor-neosid.lbr" 170 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/inductor-nkl.lbr" 171 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/inductors.lbr" 172 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/infineon-tricore.lbr" 173 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/infineon.lbr" 174 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/intersil-techwell.lbr" 175 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/intersil.lbr" 176 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/ir.lbr" 177 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/isd.lbr" 178 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/johanson-technology.lbr" 179 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/jump-0r-smd.lbr" 180 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/jumper.lbr" 181 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/lantronix.lbr" 182 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/lattice.lbr" 183 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/lc-filter.lbr" 184 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/led-7-segment.lbr" 185 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/led-citizen-electronics.lbr" 186 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/led-lumiled.lbr" 187 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/led.lbr" 188 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/lem.lbr" 189 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/linear-technology.lbr" 190 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/linear.lbr" 191 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/linx.lbr" 192 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/logo.lbr" 193 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/lprs.lbr" 194 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/lsi-computer-systems.lbr" 195 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/lumiled.lbr" 196 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/marks.lbr" 197 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/maxim.lbr" 198 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/maxstream.lbr" 199 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/melexis.lbr" 200 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/memory-hitachi.lbr" 201 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/memory-idt.lbr" 202 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/memory-micron.lbr" 203 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/memory-motorola-dram.lbr" 204 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/memory-nec.lbr" 205 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/memory-samsung.lbr" 206 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/memory-sram.lbr" 207 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/memory.lbr" 208 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/mems.lbr" 209 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micrel.lbr" 210 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-cyrod.lbr" 211 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-fujitsu.lbr" 212 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-harris.lbr" 213 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-hitachi.lbr" 214 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-infineon.lbr" 215 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-intel.lbr" 216 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-mc68000.lbr" 217 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-motorola.lbr" 218 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-philips.lbr" 219 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-renesas.lbr" 220 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-samsung.lbr" 221 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micro-siemens.lbr" 222 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/microchip.lbr" 223 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micron.lbr" 224 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/micronas.lbr" 225 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/microphon.lbr" 226 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/microwave.lbr" 227 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/midori-sensor.lbr" 228 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/minicircuits.lbr" 229 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/mitsubishi-semiconductor.lbr" 230 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/motorola-sensor-driver.lbr" 231 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/murata-filter.lbr" 232 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/murata-sensor.lbr" 233 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/nanotec.lbr" 234 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/national-instruments.lbr" 235 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/national-semiconductor.lbr" 236 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/nec-lqfp100-pack.lbr" 237 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/nec.lbr" 238 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/nrj-semiconductor.lbr" 239 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/omnivision.lbr" 240 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/on-semiconductor.lbr" 241 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/opto-honeywell-3000.lbr" 242 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/opto-honeywell-4000.lbr" 243 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/opto-honeywell.lbr" 244 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/opto-micro-linear.lbr" 245 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/opto-trans-siemens.lbr" 246 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/opto-transmittter-hp.lbr" 247 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/opto-vishay.lbr" 248 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/optocoupler.lbr" 249 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/pal.lbr" 250 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/philips-semiconductors.lbr" 251 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/photo-elements.lbr" 252 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/piher.lbr" 253 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/pinhead.lbr" 254 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/plcc-socket.lbr" 255 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/pld-intel.lbr" 256 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/plxtech.lbr" 257 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/pot-vitrohm.lbr" 258 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/pot-xicor.lbr" 259 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/pot.lbr" 260 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/ptc-ntc.lbr" 261 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/quantum-research-group.lbr" 262 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/rcl.lbr" 263 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/recom-international.lbr" 264 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/rectifier.lbr" 265 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/ref-packages-longpad.lbr" 266 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/ref-packages.lbr" 267 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/relay.lbr" 268 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/renesas.lbr" 269 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/resistor-bourns.lbr" 270 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/resistor-dil.lbr" 271 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/resistor-net.lbr" 272 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/resistor-power.lbr" 273 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/resistor-ruf.lbr" 274 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/resistor-shunt.lbr" 275 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/resistor-sil.lbr" 276 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/resistor.lbr" 277 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/rf-micro-devices.lbr" 278 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/rf-solutions.lbr" 279 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/rohm.lbr" 280 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/semicon-smd-ipc.lbr" 281 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/sensor-comus-group.lbr" 282 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/sensor-heraeus.lbr" 283 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/sensor-infratec.lbr" 284 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/sharp.lbr" 285 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/silabs.lbr" 286 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/sim-technology.lbr" 287 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/sipex.lbr" 288 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/smd-ipc.lbr" 289 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/smd-special.lbr" 290 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/solomon-systech.lbr" 291 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/solpad.lbr" 292 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/special-drill.lbr" 293 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/special.lbr" 294 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/st-microelectronics.lbr" 295 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/supertex.lbr" 296 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/supply1.lbr" 297 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/supply2.lbr" 298 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/switch-alps.lbr" 299 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/switch-coto.lbr" 300 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/switch-dil.lbr" 301 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/switch-misc.lbr" 302 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/switch-omron.lbr" 303 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/switch-raychem.lbr" 304 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/switch-reed.lbr" 305 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/switch.lbr" 306 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/telcom.lbr" 307 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/telecontrolli.lbr" 308 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/telefunken.lbr" 309 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/testpad.lbr" 310 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/texas-sn55-sn75.lbr" 311 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/texas.lbr" 312 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/toshiba.lbr" 313 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/traco-electronic.lbr" 314 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/trafo-bei.lbr" 315 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/trafo-hammondmfg.lbr" 316 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/trafo-siemens.lbr" 317 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/trafo-xicon.lbr" 318 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/trafo.lbr" 319 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/transformer-pulse.lbr" 320 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/transistor-fet.lbr" 321 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/transistor-neu-to92.lbr" 322 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/transistor-npn.lbr" 323 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/transistor-pnp.lbr" 324 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/transistor-power.lbr" 325 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/transistor-small-signal.lbr" 326 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/transistor.lbr" 327 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/triac.lbr" 328 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/trimble.lbr" 329 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/tripas.lbr" 330 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/u-blox.lbr" 331 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/uln-udn.lbr" 332 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/v-reg-micrel.lbr" 333 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/v-reg.lbr" 334 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/varistor.lbr" 335 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/wafer-scale-psd.lbr" 336 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/wirepad.lbr" 337 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/xicor.lbr" 338 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/xilinx-virtex-v5.lbr" 339 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/xilinx-xc18v.lbr" 340 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/xilinx-xc9.lbr" 341 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/xilinx-xcv.lbr" 342 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/zetex.lbr" 343 | UsedLibrary="/Applications/EAGLE-6.4.0/lbr/zilog.lbr" 344 | 345 | [Win_1] 346 | Type="Control Panel" 347 | Loc="1959 540 2558 939" 348 | State=2 349 | Number=0 350 | 351 | [Desktop] 352 | Screen="3600 1080" 353 | Window="Win_1" 354 | -------------------------------------------------------------------------------- /mod_switchpi/Makefile: -------------------------------------------------------------------------------- 1 | BASE=../../../.. 2 | 3 | LOCAL_CFLAGS=-lwiringPi 4 | 5 | include $(BASE)/build/modmake.rules 6 | 7 | -------------------------------------------------------------------------------- /mod_switchpi/mod_switchpi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application 3 | * Copyright (C) 2005-2019, Anthony Minessale II 4 | * 5 | * Version: MPL 1.1 6 | * 7 | * The contents of this file are subject to the Mozilla Public License Version 8 | * 1.1 (the "License"); you may not use this file except in compliance with 9 | * the License. You may obtain a copy of the License at 10 | * http://www.mozilla.org/MPL/ 11 | * 12 | * Software distributed under the License is distributed on an "AS IS" basis, 13 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 14 | * for the specific language governing rights and limitations under the 15 | * License. 16 | * 17 | * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application 18 | * 19 | * The Initial Developer of the Original Code is 20 | * Ken Rice 21 | * Portions created by the Initial Developer are Copyright (C) 22 | * the Initial Developer. All Rights Reserved. 23 | * 24 | * Contributor(s): 25 | * Ken Rice (C)2013-2018 26 | * 27 | * mod_switchpi.c -- DTMF Keypad, and hook switch driver for mod_portaudio 28 | * NOTE: this only works on the Raspberry Pi with the SwitchPI addon module 29 | * 30 | */ 31 | #include 32 | 33 | /* not sure which of these we actually need 34 | we'll comment them out later*/ 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | #include 42 | #include 43 | 44 | // MCP23S17 Registers 45 | 46 | #define IOCON 0x0A 47 | 48 | #define IODIRA 0x00 49 | #define IPOLA 0x02 50 | #define GPINTENA 0x04 51 | #define DEFVALA 0x06 52 | #define INTCONA 0x08 53 | #define GPPUA 0x0C 54 | #define INTFA 0x0E 55 | #define INTCAPA 0x10 56 | #define GPIOA 0x12 57 | #define OLATA 0x14 58 | 59 | #define IODIRB 0x01 60 | #define IPOLB 0x03 61 | #define GPINTENB 0x05 62 | #define DEFVALB 0x07 63 | #define INTCONB 0x09 64 | #define GPPUB 0x0D 65 | #define INTFB 0x0F 66 | #define INTCAPB 0x11 67 | #define GPIOB 0x13 68 | #define OLATB 0x15 69 | 70 | // Bits in the IOCON register 71 | 72 | #define IOCON_BANK_MODE 0x80 73 | #define IOCON_MIRROR 0x40 74 | #define IOCON_SEQOP 0x20 75 | #define IOCON_DISSLW 0x10 76 | #define IOCON_HAEN 0x08 77 | #define IOCON_ODR 0x04 78 | #define IOCON_INTPOL 0x02 79 | #define IOCON_UNUSED 0x01 80 | 81 | // Default initialisation mode 82 | 83 | #define IOCON_INIT (IOCON_SEQOP) 84 | 85 | // GPIO Pins 86 | #define PIN1 (1 << 0) 87 | #define PIN2 (1 << 1) 88 | #define PIN3 (1 << 2) 89 | #define PIN4 (1 << 3) 90 | #define PIN5 (1 << 4) 91 | #define PIN6 (1 << 5) 92 | #define PIN7 (1 << 6) 93 | #define PIN8 (1 << 7) 94 | 95 | // Something to output bit batters to screen 96 | // exmaple: printf("input pins a "BYTETOBINARYPATTERN, BYTETOBINARY(single_byte_buffer)); 97 | #define BYTETOBINARYPATTERN "%d%d%d%d%d%d%d%d\n" 98 | #define BYTETOBINARY(byte) \ 99 | (byte & 0x80 ? 1 : 0), \ 100 | (byte & 0x40 ? 1 : 0), \ 101 | (byte & 0x20 ? 1 : 0), \ 102 | (byte & 0x10 ? 1 : 0), \ 103 | (byte & 0x08 ? 1 : 0), \ 104 | (byte & 0x04 ? 1 : 0), \ 105 | (byte & 0x02 ? 1 : 0), \ 106 | (byte & 0x01 ? 1 : 0) 107 | 108 | // couple of macros to help bit flipping 109 | #define SET_PIN_INPUT(x, y) (x |= y) 110 | #define SET_PIN_OUTPUT(x, y) (x &= (~y)) 111 | #define IS_SET(x,y) (x&y) 112 | 113 | 114 | SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_switchpi_shutdown); 115 | SWITCH_MODULE_RUNTIME_FUNCTION(mod_switchpi_runtime); 116 | SWITCH_MODULE_LOAD_FUNCTION(mod_switchpi_load); 117 | SWITCH_MODULE_DEFINITION(mod_switchpi, mod_switchpi_load, mod_switchpi_shutdown, mod_switchpi_runtime); 118 | 119 | #define PD_QUEUE_LEN 200000 120 | 121 | static struct { 122 | switch_mutex_t *mutex; 123 | int done; 124 | int main_running; 125 | switch_memory_pool_t *pool; 126 | } globals; 127 | 128 | SWITCH_MODULE_LOAD_FUNCTION(mod_switchpi_load) 129 | { 130 | 131 | memset(&globals, 0, sizeof(globals)); 132 | 133 | *module_interface = switch_loadable_module_create_module_interface(pool, modname); 134 | switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, pool); 135 | 136 | globals.pool = pool; 137 | /* indicate that the module should continue to be loaded */ 138 | return SWITCH_STATUS_SUCCESS; 139 | } 140 | 141 | 142 | SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_switchpi_shutdown) 143 | { 144 | switch_mutex_lock(globals.mutex); 145 | globals.done = 1; 146 | globals.main_running = -1; 147 | switch_mutex_unlock(globals.mutex); 148 | 149 | while(globals.main_running) { 150 | switch_yield(500000); 151 | } 152 | 153 | return SWITCH_STATUS_SUCCESS; 154 | } 155 | 156 | 157 | SWITCH_MODULE_RUNTIME_FUNCTION(mod_switchpi_runtime) 158 | { 159 | // char *dynamic_string = NULL; 160 | 161 | int q2w ; 162 | int foo = 0; 163 | int bar = 0; 164 | int oldfoo = 0; 165 | // int shit = 0; 166 | int offhook = 0, calling = 0;// , answered = 0; 167 | int row = 0, col = 0; 168 | char output[3] = {0}; 169 | 170 | char buf[32] = {0}; 171 | char arg[64] = {0}; 172 | int x = 0; // counter for buf 173 | char *uuid = NULL; 174 | char *pa_channel_id = NULL; 175 | 176 | 177 | char *key[4] = { "123", "456", "789", "*0#" }; 178 | 179 | globals.main_running = 1; 180 | 181 | if ((q2w = wiringPiI2CSetup (0x24)) == -1) { 182 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "q2w: Unable to initialise Keypad (I2C): %s\n", strerror (errno)); 183 | return SWITCH_STATUS_FALSE; 184 | } 185 | 186 | // Very simple direct control of the MCP23017: 187 | 188 | wiringPiI2CWriteReg8 (q2w, IOCON, IOCON_INIT) ; // Initialize the 23017 189 | wiringPiI2CWriteReg8 (q2w, IODIRA, 0xF1); // Sset Input Pins 190 | wiringPiI2CWriteReg8 (q2w, INTCONA, 0xF0); // Enable Int Contol on Pins 5-8 191 | wiringPiI2CWriteReg8 (q2w, DEFVALA, 0xF0); // Set Default high for pins 5-8 low for 1-4 192 | wiringPiI2CWriteReg8 (q2w, GPINTENA, 0xF0); // Enable Interrupt-On-Change on Pins 5-8 193 | wiringPiI2CWriteReg8 (q2w, GPPUA, 0x0F); // Set Internal Pull Ups on pins 1-4 (external Used on 5-8) 194 | wiringPiI2CWriteReg8 (q2w, GPIOA, 0xF0); // turn on output on Pins 5-8 195 | 196 | while(globals.main_running == 1) { 197 | foo = wiringPiI2CReadReg8 (q2w, GPIOA) ; // Read Output 198 | if (oldfoo != foo) { // if output has changed do something 199 | oldfoo = foo; 200 | if (!IS_SET(foo, PIN1)) { 201 | if (offhook != 1) { 202 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,"hook went offhook\n"); 203 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,"sending dial tone\n"); 204 | } 205 | offhook = 1; 206 | } else { 207 | if (offhook != 0) { 208 | switch_stream_handle_t stream = { 0 }; 209 | char *reply; 210 | SWITCH_STANDARD_STREAM(stream); 211 | switch_api_execute("pa", "hangup", NULL, &stream); 212 | reply = (char *) stream.data; 213 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "pa hangup reply [%s]\n", reply); 214 | switch_safe_free(stream.data); 215 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,"hook went onhook\n"); 216 | // answered = 0; 217 | calling = 0; 218 | x = 0; 219 | memset(buf, 0, sizeof(buf)); 220 | memset(arg, 0, sizeof(arg)); 221 | } 222 | offhook = 0; 223 | 224 | } 225 | if (offhook) { 226 | if (!IS_SET(foo, PIN8)) row=1; // Figure out the Row that was pressed 227 | else if (!IS_SET(foo, PIN7)) row=2; 228 | else if (!IS_SET(foo, PIN6)) row=3; 229 | else if (!IS_SET(foo, PIN5)) row=4; 230 | if (row > 0) { 231 | wiringPiI2CWriteReg8 (q2w, OLATA, 0x00) ; // Clear latching 232 | wiringPiI2CWriteReg8 (q2w, IODIRA, 0X0F) ; // Set Cols to Input, Rows to Output 233 | bar = wiringPiI2CReadReg8 (q2w, GPIOA) ; // Read the Inputs 234 | if (!IS_SET(bar, PIN4)) col = 1; // Figure out which Column 235 | if (!IS_SET(bar, PIN3)) col = 2; 236 | if (!IS_SET(bar, PIN2)) col = 3; 237 | wiringPiI2CWriteReg8 (q2w, IODIRA, 0XF1) ; // reset cols to output and rows to input 238 | } 239 | if (row && col) { 240 | snprintf(output, 2, "%c", key[row-1][col-1]); // convert Col/Row to standard DTMF pad chars 241 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "KEYPRESS [%s]\n", output); 242 | 243 | if (strcmp(output, "#") == 0) { 244 | switch_stream_handle_t stream = { 0 }; 245 | 246 | char *reply; 247 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "make the call to [%s]\n", buf); 248 | SWITCH_STANDARD_STREAM(stream); 249 | snprintf(arg, sizeof(arg), "call %s", buf); 250 | switch_api_execute("pa", arg, NULL, &stream); 251 | reply = switch_strip_whitespace((char *) stream.data); 252 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "pa call reply [%s]\n", reply); 253 | if (!strncasecmp(reply, "success", 7)) { 254 | char *argv[4] = { 0 }; 255 | int argc; 256 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "strncasecmp matched \n"); 257 | if ((argc = switch_separate_string(reply, ':', argv, (sizeof(argv) / sizeof(argv[0]))))) { 258 | if (argc == 3) { 259 | pa_channel_id = argv[1]; 260 | uuid = argv[2]; 261 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "pa callid [%s] uuid [%s]\n", pa_channel_id, uuid); 262 | } 263 | } 264 | } 265 | 266 | 267 | calling = 1; 268 | // answered = 1; 269 | 270 | x = 0; 271 | memset(buf, 0, sizeof(buf)); 272 | memset(arg, 0, sizeof(arg)); 273 | switch_safe_free(stream.data); 274 | } else { 275 | if (!calling) { 276 | buf[x++] = key[row-1][col-1]; 277 | } else { 278 | switch_stream_handle_t stream = { 0 }; 279 | char *reply; 280 | buf[x] = key[row-1][col-1]; 281 | SWITCH_STANDARD_STREAM(stream); 282 | snprintf(arg, sizeof(arg), "dtmf %s", buf); 283 | switch_api_execute("pa", arg, NULL, &stream); 284 | reply = switch_strip_whitespace((char *) stream.data); 285 | switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "pa dmtf reply [%s]\n", reply); 286 | switch_safe_free(stream.data); 287 | } 288 | } 289 | 290 | row = 0; // Reset row and col to 0 for next time 291 | col = 0; 292 | } 293 | } 294 | } 295 | 296 | switch_yield(15000); 297 | 298 | } 299 | 300 | globals.main_running = 0; 301 | 302 | return SWITCH_STATUS_TERM; 303 | } 304 | 305 | 306 | /* For Emacs: 307 | * Local Variables: 308 | * mode:c 309 | * indent-tabs-mode:t 310 | * tab-width:4 311 | * c-basic-offset:4 312 | * End: 313 | * For VIM: 314 | * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: 315 | */ 316 | --------------------------------------------------------------------------------