Fix USART total bytes waiting when tx/rx buffer sizes are not equal.
Avoid using % operator.  Allow buffer sizes that are not powers of two.