Improved clock_time on the (timerless) Apple2 in several ways:
- The Contiki timer code does not check for clock_time overflows. Therefore it is desirable to have as little overflows as possible to reduce the unwanted side effects. On the other hand one certainly doesn't want clock_time_t to be 32 bit as this would pull in lots of stuff from the cc65 runtime library. But looking at the usage of the Contiki timers it turns out that the maximum resolution needed is a half second. So CLOCK_CONF_SECOND is now set to 2 which reduces clock_time overflows to once after running Contiki for more that 9 hours ;-) An internal 16 bit counter is used to determine when half a second has passed.
- Adjusted the internal counter to have clock_time work quite accurately at least with Contiki sitting at the empty desktop and an Ethernet driver loaded.
- Added detection of an Apple IIgs running at 2.8 MHz instead of the ordinary 1.0 MHz.
5 files changed
tree: 51a5c09c623bca754d3df9837d30627d8d00eb83
  1. contiki-apple2/