From a82dc79ea851ecc9c5e5041fc83d13ce150411ae Mon Sep 17 00:00:00 2001 From: Steffen Pohle Date: Sun, 23 Jan 2022 16:12:07 +0100 Subject: [PATCH] PINC is not used, missed to setup PINB - should work now --- z21emu/atmega32_detect/gleiserkennung-v4.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/z21emu/atmega32_detect/gleiserkennung-v4.c b/z21emu/atmega32_detect/gleiserkennung-v4.c index 5d124f3..dd49451 100644 --- a/z21emu/atmega32_detect/gleiserkennung-v4.c +++ b/z21emu/atmega32_detect/gleiserkennung-v4.c @@ -200,14 +200,14 @@ int main( void ) { offdelay = i2c_system[I2C_SREG_DIOFFDELAY] << 8; // S1 - S8 - i = 0; if (!(PINC & (1 << 0))) cnt[i] = offdelay; - i++; if (!(PINC & (1 << 1))) cnt[i] = offdelay; - i++; if (!(PINC & (1 << 2))) cnt[i] = offdelay; - i++; if (!(PINC & (1 << 3))) cnt[i] = offdelay; - i++; if (!(PINC & (1 << 4))) cnt[i] = offdelay; - i++; if (!(PINC & (1 << 5))) cnt[i] = offdelay; - i++; if (!(PINC & (1 << 6))) cnt[i] = offdelay; - i++; if (!(PINC & (1 << 7))) cnt[i] = offdelay; + i = 0; if (!(PINB & (1 << 0))) cnt[i] = offdelay; + i++; if (!(PINB & (1 << 1))) cnt[i] = offdelay; + i++; if (!(PINB & (1 << 2))) cnt[i] = offdelay; + i++; if (!(PINB & (1 << 3))) cnt[i] = offdelay; + i++; if (!(PINB & (1 << 4))) cnt[i] = offdelay; + i++; if (!(PINB & (1 << 5))) cnt[i] = offdelay; + i++; if (!(PINB & (1 << 6))) cnt[i] = offdelay; + i++; if (!(PINB & (1 << 7))) cnt[i] = offdelay; // S9 - S16 i++; if (!(PINA & (1 << 0))) cnt[i] = offdelay;