I suppose it came with a manual (or there is an online one). Although for something as simple as this, it's just plain silly to ask for a function.
If not, since it's AVR based, you do it exactly like on an AVR (change port direction, read PINx, respectively, change port direction, write to PORTx)