The documentation from the datasheet is pretty thin but if you search all 11 times RS485 is found you will find that the SAMD51 has hardware support for controlling the TE (Transmit Enable) pin of the RS485 driver chip.
How do I set this up in the Arduino environment?
To use RS485 hardware support you need to set RXPO = 0x01 (Use SERCOM_PAD for RxD)
and set TXPO = 0x03 for TxD on SERCOM_PAD and TE on SERCOM_PAD.
RXPO is almost always 1, so how do I set TXPO?
I'm so close but haven't found anything in the code or the forums.
I found REG_SERCOMx_USART_CTRLA to read or write the whole 32 bit register. Is there a simpler way?