Coolquest, Inc. | Home | Products | Support | About | Contact | |||
|
<< File View >> | Class View | Parts Library | Examples Home |
// This File Generated by: pt_to_h.exe // Source File: switches.pt // Destination File: switches.h #ifndef _switches_h_ #define _switches_h_ // AR_OFF -- auto registration is not needed // THIS FILE IS IN THE PUBLIC DOMAIN. // IT IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT // NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. class CP_LATCH_SWITCH : public TPart { // switch actuated by front-panel latch public: port COM; // common port OPEN; // connected to COM when latch is open port CLOSED; // connected to COM when latch is closed CP_LATCH_SWITCH() { SetPackage( "LATCH_SW", 3 ); SetReferencePrefix( "SW" ); } virtual void Register() { reg( COM ); COM.SetPin( "1" ); reg( OPEN ); OPEN.SetPin( "2" ); reg( CLOSED ); CLOSED.SetPin( "3" ); } }; class CP_DIPSW5 : public TPart { // 5-position DIP switch public: port A; // AR_BUS(4,0) // same pin layout as DIP port B; // AR_BUS(4,0) CP_DIPSW5() { SetPackage( "DIP10", 10 ); // standard DIP footprint SetReferencePrefix( "SW" ); } virtual void Register() { regb( A, 4, 0 ); A.AddPin( 4, "5" ); A.AddPin( 3, "4" ); A.AddPin( 2, "3" ); A.AddPin( 1, "2" ); A.AddPin( 0, "1" ); regb( B, 4, 0 ); B.AddPin( 4, "6" ); B.AddPin( 3, "7" ); B.AddPin( 2, "8" ); B.AddPin( 1, "9" ); B.AddPin( 0, "10" ); } }; #endif
<< File View >> | Class View | Parts Library | Examples Home |
Legal | Copyright © 2007 by Coolquest, Inc. | Contact |