# Schmitt trigger representation in CircuiTikZ

I'm designing some electrical circuit schematic with CircuitTikZ, and I must insert the symbol of a Schmitt trigger. But CircuitTikZ doesn't offer such a component.

How can I create such a new component, so that it behaves like every other component in CircuitTikZ ? What would be the best way to do this ?

(It would be nice if it behaves like an op amp - it also has input, output, and up/downs - and that one can change the (non-)inverting characteristic.)

Thanks in advance !

Link to the Wikipedia article : Schmitt trigger

(Sorry for my not-so-good english.)

I created a new length to be able to adjust the symbol size and set it relative to the bipole length. This is not quite as thorough as using actual component width and height, but is better than using \schmitt=.25mm.

\documentclass[border=1pt]{standalone}
\usepackage{circuitikz}

\newlength{\schmitt}

\begin{document}
\tikzset{pics/schmitt/.style={code={\schmitt = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}%
\schmitt = 0.2\schmitt
\draw[xshift=-.5\schmitt] (-\schmitt,0.5\schmitt)--(0pt,0.5\schmitt) -- (0.5\schmitt,-0.5\schmitt)
(\schmitt,-0.5\schmitt)--(0pt,-0.5\schmitt) -- (-0.5\schmitt,0.5\schmitt);}}}

\tikzset{pics/notschmitt/.style={code={\schmitt = \pgfkeysvalueof{/tikz/circuitikz/bipoles/length}%
\schmitt = 0.15\schmitt
\draw[xshift=-.7\schmitt] (\schmitt,0.5\schmitt)--(0pt,0.5\schmitt) -- (-0.5\schmitt,-0.5\schmitt)
(-\schmitt,-0.5\schmitt)--(0pt,-0.5\schmitt) -- (0.5\schmitt,0.5\schmitt);}}}

\begin{circuitikz}
\node (A) [buffer] at (0,0) {};
\draw (A.center) pic{schmitt};
\node (B) [american not port] at (2,0) {};
\draw (B.center) pic{notschmitt};
\end{circuitikz}
\end{document}