Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/sparc Add macro to convert a counter register...



details:   https://anonhg.NetBSD.org/src/rev/3152a5ca1543
branches:  trunk
changeset: 508330:3152a5ca1543
user:      pk <pk%NetBSD.org@localhost>
date:      Mon Apr 09 21:17:33 2001 +0000

description:
Add macro to convert a counter register value to microseconds.

diffstat:

 sys/arch/sparc/sparc/timerreg.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 41537ac8ca14 -r 3152a5ca1543 sys/arch/sparc/sparc/timerreg.h
--- a/sys/arch/sparc/sparc/timerreg.h   Mon Apr 09 21:15:42 2001 +0000
+++ b/sys/arch/sparc/sparc/timerreg.h   Mon Apr 09 21:17:33 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: timerreg.h,v 1.6 1996/10/28 00:20:32 abrown Exp $ */
+/*     $NetBSD: timerreg.h,v 1.7 2001/04/09 21:17:33 pk Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -127,3 +127,6 @@
 /*efine        TMR_SHIFT4M     9               -* shift to obtain microseconds */
 /*efine tmr_ustolim4m(n)       (((2*(n)) + 1) << TMR_SHIFT4M)*/
 #define tmr_ustolim4m(n)       ((n) << TMR_SHIFT)
+
+/* The number of microseconds represented by a counter register value */
+#define tmr_cnttous(c) ((((c) >> TMR_SHIFT) & TMR_MASK) - 1)



Home | Main Index | Thread Index | Old Index