[riot-commits] [RIOT-OS/RIOT] d6ca7c: prevent rounding 0 if HWTIMER_SPEED > 1000000L

Oleg Hahm oleg at hobbykeller.org
Thu Dec 4 19:00:39 CET 2014


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: d6ca7c44c280bebc21b93dc142719d3cb51a1176
      https://github.com/RIOT-OS/RIOT/commit/d6ca7c44c280bebc21b93dc142719d3cb51a1176
  Author: Benjamin Valentin <benjamin.valentin at volatiles.de>
  Date:   2014-10-06 (Mon, 06 Oct 2014)

  Changed paths:
    M core/include/hwtimer.h

  Log Message:
  -----------
  prevent rounding 0 if HWTIMER_SPEED > 1000000L

The current macros in hwtimer.h expect HWTIMER_SPEED to be < 1000000L, otherwise integer arithmetic will round the result down to 0.
Add a case to prevent that.


  Commit: 07fe5bcc9fc6c084b652ee4fa1ddc6609f81ad2b
      https://github.com/RIOT-OS/RIOT/commit/07fe5bcc9fc6c084b652ee4fa1ddc6609f81ad2b
  Author: Oleg Hahm <oleg at hobbykeller.org>
  Date:   2014-12-04 (Thu, 04 Dec 2014)

  Changed paths:
    M core/include/hwtimer.h

  Log Message:
  -----------
  Merge pull request #1709 from benpicco/hwtimer_fix

allow HWTIMER_SPEED > 1000000


Compare: https://github.com/RIOT-OS/RIOT/compare/000450c894bd...07fe5bcc9fc6


More information about the commits mailing list