Hi, > Calibration of the internal oscillator is optional. So it would have to be > an option of the compiler or the device file. > > Setting OSCCAL by the device file would violate a design rule of Jallib, or > must be accepted as exception to the rules.
The design rule is there to provide consistency and predictability. It is the way we do things and at the time we did not expect it would limit us. If it turns out it makes certain functionality impossible or predictability complex/large, we should consider an exeption IMO. As for this specific case: we (well... ask you, Rob ;) could add the required code to the device file with conditional compile dependent on a a constant like SET_OSCCAL. So the device file is still compliant to the design rule unless you tell it otherwise. For consistency reasons, we should consider to add this for all devices that support *and* require setting OSCCAL, even if setup is not required as the first action. In these cases a procedure set_oscccal() could be created, but should be called based on the constant. On the other hand: is it possible to add code to the device file to store the W value in a variable at startup for later use? If so, the user can set osccal in the application. And if not, the variable is removed by the optimiser, isn't it? Joep -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
