diff --git a/newcode/main.c b/newcode/main.c index a111ff8..56a2f5f 100644 --- a/newcode/main.c +++ b/newcode/main.c @@ -34,6 +34,15 @@ void init_timer_100us(){ TCC0.INTCTRLA |= TC_OVFINTLVL_HI_gc; } +void io_setup(void){ + // LED + PORTD.DIRSET = 1 << 5; + + // pullups for address switch + PORTCFG.MPCMASK = 0xFF; + PORTC.PIN1CTRL = PORT_OPC_PULLUP_gc; +} + void modbusGet(void) { if (modbusGetBusState() & (1<