2 pins at the same time

Have you though about passing an array of pin numbers instead of a single pin number to the function?