Here is my multi-port driver for the PIC32MZ series of processors... by changing the registers definitions to the PIC32MX795, it will also work fine there with the PIC32MX6xx-7xx series... It will NOT work on some of the smaller parts without the 8 deep fifo without some minor changes to the Tx interrupt code.
I was going to add a section at the top defining the register for each processor type, but have not had time...
if you make any changes, please send me a copy
lafleur @ lafleur . us
PIC32MZ Serial Drivers FreeRTOS.zip