Would be much nicer if the error counters would be in a struct which is then used for each uart peripheral separately, similar to how it's done for i2c.