KiCad PCB EDA Suite
pin_type.cpp File Reference

Electrical pin type handling. More...

#include "pin_type.h"
#include <macros.h>

Go to the source code of this file.

Functions

wxString GetText (ELECTRICAL_PINTYPE aType)
 
BITMAP_DEF GetBitmap (ELECTRICAL_PINTYPE aType)
 

Detailed Description

Electrical pin type handling.

Definition in file pin_type.cpp.

Function Documentation

BITMAP_DEF GetBitmap ( ELECTRICAL_PINTYPE  aType)

Definition at line 76 of file pin_type.cpp.

References PIN_BIDI, PIN_INPUT, PIN_NC, PIN_OPENCOLLECTOR, PIN_OPENEMITTER, PIN_OUTPUT, PIN_PASSIVE, PIN_POWER_IN, PIN_POWER_OUT, PIN_TRISTATE, and PIN_UNSPECIFIED.

77 {
78  switch( aType )
79  {
80  case PIN_INPUT:
81  return pintype_input_xpm;
82 
83  case PIN_OUTPUT:
84  return pintype_output_xpm;
85 
86  case PIN_BIDI:
87  return pintype_bidi_xpm;
88 
89  case PIN_TRISTATE:
90  return pintype_3states_xpm;
91 
92  case PIN_PASSIVE:
93  return pintype_passive_xpm;
94 
95  case PIN_UNSPECIFIED:
96  return pintype_notspecif_xpm;
97 
98  case PIN_POWER_IN:
99  return pintype_powerinput_xpm;
100 
101  case PIN_POWER_OUT:
102  return pintype_poweroutput_xpm;
103 
104  case PIN_OPENCOLLECTOR:
105  return pintype_opencoll_xpm;
106 
107  case PIN_OPENEMITTER:
108  return pintype_openemit_xpm;
109 
110  case PIN_NC:
111  return pintype_noconnect_xpm;
112  };
113 
114  assert( !"invalid pin type" );
115  return NULL;
116 }
wxString GetText ( ELECTRICAL_PINTYPE  aType)

Definition at line 33 of file pin_type.cpp.

References PIN_BIDI, PIN_INPUT, PIN_NC, PIN_OPENCOLLECTOR, PIN_OPENEMITTER, PIN_OUTPUT, PIN_PASSIVE, PIN_POWER_IN, PIN_POWER_OUT, PIN_TRISTATE, and PIN_UNSPECIFIED.

34 {
35  switch( aType )
36  {
37  case PIN_INPUT:
38  return _( "Input" );
39 
40  case PIN_OUTPUT:
41  return _( "Output" );
42 
43  case PIN_BIDI:
44  return _( "Bidirectional" );
45 
46  case PIN_TRISTATE:
47  return _( "Tri-state" );
48 
49  case PIN_PASSIVE:
50  return _( "Passive" );
51 
52  case PIN_UNSPECIFIED:
53  return _( "Unspecified" );
54 
55  case PIN_POWER_IN:
56  return _( "Power input" );
57 
58  case PIN_POWER_OUT:
59  return _( "Power output" );
60 
61  case PIN_OPENCOLLECTOR:
62  return _( "Open collector" );
63 
64  case PIN_OPENEMITTER:
65  return _( "Open emitter" );
66 
67  case PIN_NC:
68  return _( "Not connected" );
69  };
70 
71  assert( !"invalid pin type" );
72  return wxT( "???" );
73 }