When the device is still uninitialized, it is possible that the values in the registers result in invalid input data for the chrono data types. In these cases, chrono methods panic:
This applies at least to methods get_date(), get_time() and get_datetime().
This can be solved by adding a new error variant named something similar to InvalidDeviceState and using the _opt variants of the methods to create chrono data types.
When the device is still uninitialized, it is possible that the values in the registers result in invalid input data for the
chrono
data types. In these cases,chrono
methods panic:This applies at least to methods
get_date()
,get_time()
andget_datetime()
. This can be solved by adding a new error variant named something similar toInvalidDeviceState
and using the_opt
variants of the methods to createchrono
data types.