transformIllegalValue method
Method to return a legal value from an illegal one.
Only applicable for fields with CsrFieldAccess.readWriteLegal access. This is a default implementation that simply takes the first legal value but can be overridden in a derived class.
Implementation
int transformIllegalValue() => legalValues[0];