Hi Seb, > I know, pragma clock can be defined only once. But is this only about > _usec_delay ? I can't anothe issue, but I may be wrong. Otherwise it could > be possible to re-define _usec_delay in some way (...) and have multiple > implementation depending on selected speed.
_usec_delay() generates inline code loop for the delay specified, based on the clock pragma. Very valuable for accurate timing or to base libs on. But a bit bulky to use each time a user need some delay. So that is why I have adviced before to use delay.jal in jallib samples and not _usec_delay unless you have a real good reason to. Use of delay.jal is what is most efficient for most users and thus good to show. But so far the off-topic part ;) If there is a serious request for support of different clock speeds, libraries could be adapted for this. Longer delays from delay.jal could be based on an configurable delay of - say - 100us at a modest cost of accuracy. Serial_common could use an alternative constant/variable in case it is defined. Same applies for MSSP routines (i2c, spi). It does take some work though. 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.
