There is a slight chance (when connected device is slow) that
an interrupt event will be generated immediately after interrups
are enabled for the serial peripheral.
This will run the interrupt routine that already expects all
buffers to be initialized.
Also make sure the compiler knows that buffer counters cannot be
optimized, because they are accessed from interrupt handlers.
There is a slight chance (when connected device is slow) that an interrupt event will be generated immediately after interrups are enabled for the serial peripheral.
This will run the interrupt routine that already expects all buffers to be initialized.
Also make sure the compiler knows that buffer counters cannot be optimized, because they are accessed from interrupt handlers.
Signed-off-by: Martin Sivak mars@montik.net