improved circle buffer and added modes (DATA and CONFIG) to UARTS