qPort->PIN0CTRL = (qPort->PIN0CTRL & ~(PORT_ISC_gm | PORT_INVEN_bm )) | PORT_ISC_BOTHEDGES_gc | (invIO ? PORT_INVEN_bm : 0);