Being pedantic, but I think I remember @tylrtrmbl wanting the buffer being the first argument of the function. Also, passing by value vs. reference. We're not using interrupts so data consistency isn't a problem, but won't copying the entire array give a performance hit?