Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Use bit defines to create bit groups for SL11_EPSTAT



details:   https://anonhg.NetBSD.org/src/rev/b5ccbf1a07e1
branches:  trunk
changeset: 818078:b5ccbf1a07e1
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Sep 24 14:55:16 2016 +0000

description:
Use bit defines to create bit groups for SL11_EPSTAT

diffstat:

 sys/dev/ic/sl811hsreg.h |  21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r a4fca4a477e3 -r b5ccbf1a07e1 sys/dev/ic/sl811hsreg.h
--- a/sys/dev/ic/sl811hsreg.h   Sat Sep 24 13:40:55 2016 +0000
+++ b/sys/dev/ic/sl811hsreg.h   Sat Sep 24 14:55:16 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sl811hsreg.h,v 1.4 2013/09/22 06:54:35 skrll Exp $     */
+/*     $NetBSD: sl811hsreg.h,v 1.5 2016/09/24 14:55:16 skrll Exp $     */
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -76,8 +76,23 @@
 #define SL11_EPSTAT_OVERFLOW   (0x20)
 #define SL11_EPSTAT_NAK                (0x40)
 #define SL11_EPSTAT_STALL      (0x80)
-#define SL11_EPSTAT_STATBITS   (0xf7)
-#define SL11_EPSTAT_ERRBITS    (0xf6)
+#define SL11_EPSTAT_STATBITS   ( \
+    SL11_EPSTAT_ACK | \
+    SL11_EPSTAT_ERROR | \
+    SL11_EPSTAT_TIMEOUT | \
+    SL11_EPSTAT_SETUP | \
+    SL11_EPSTAT_OVERFLOW | \
+    SL11_EPSTAT_NAK | \
+    SL11_EPSTAT_STALL \
+    )
+#define SL11_EPSTAT_ERRBITS    ( \
+    SL11_EPSTAT_ERROR | \
+    SL11_EPSTAT_TIMEOUT | \
+    SL11_EPSTAT_SETUP | \
+    SL11_EPSTAT_OVERFLOW | \
+    SL11_EPSTAT_NAK | \
+    SL11_EPSTAT_STALL \
+    )
 
 #define SL11_CTRL_ENABLESOF    (0x01)
 /* #define SL11_CTRL_EOF2              (0x04) XXX ? Reserved in 1.5 */



Home | Main Index | Thread Index | Old Index