This follows the pattern of other peripherals (I2C, SPI) to specify the pins using pin objects instead of a pair of GPIO port and pin number. It makes it easier to customise the UART pins for a particular board.