Have you looked at the DMAChannel class that comes with the Teensy core?