From e0e6c33bc4e6869b38534295961b6f77e6d605a8 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 12 Jul 2015 10:15:38 +0200 Subject: [PATCH] pinio.c: introduce PS_INVERT_ON. Some non-ATX PSUs require the pin to go high for turning it on. --- pinio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pinio.c b/pinio.c index 45f2736..db4f72a 100644 --- a/pinio.c +++ b/pinio.c @@ -119,7 +119,11 @@ void power_on() { if (ps_is_on == 0) { #ifdef PS_ON_PIN SET_OUTPUT(PS_ON_PIN); - WRITE(PS_ON_PIN, 0); + #ifdef PS_INVERT_ON + WRITE(PS_ON_PIN, 1); + #else + WRITE(PS_ON_PIN, 0); + #endif delay_ms(500); #endif #ifdef PS_MOSFET_PIN