Write data from IR directly to the data struct instead of keeping a copy (volatility problems?)
Move Max packet size constant to global scope