func (e DriverError) Error() string {
	switch e {
	case ErrBufOverflow:
		return "uart: buffer overflow"
	case ErrTimeout:
		return "uart: timeout"
	}
	return ""
}
Error implements error interface.
package uart
import (
	"embedded/rtos"
	"sync/atomic"
	"time"
)
type DriverError uint8
const (
	ErrBufOverflow DriverError = iota + 1
	ErrTimeout
)