From c280e441a80d2ff10ae1765ba6fff245bb5dee1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Ji=C5=99i=C5=A1t=C4=9B?= Date: Sun, 15 Dec 2024 18:57:20 +0100 Subject: [PATCH] Swap functionality of p- and n-channel FETs I probably got confused when assigning the functionality. We can be generous and say I'm switching the MOSFETS from depletion mode to enhancement mode. --- src/sim_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sim_main.c b/src/sim_main.c index 54e35f2..19c8253 100644 --- a/src/sim_main.c +++ b/src/sim_main.c @@ -3,7 +3,7 @@ int should_open(t_type type, t_state state) { - return ((type == p && state == on) || (type == n && state == off)); + return ((type == p && state == off) || (type == n && state == on)); } // Maybe an error should be return when gate is NULL -- 2.30.2