Subject: Re: PROPOSAL: API for environmental sensors
To: NetBSD Kernel Technical Discussion List <tech-kern@netbsd.org>
From: Greywolf <greywolf@starwolf.com>
List: tech-kern
Date: 11/21/1999 11:19:57
On Sun, 21 Nov 1999, Greg A. Woods wrote:

# [ On Tuesday, November 16, 1999 at 10:40:47 (+0100), eric.delcamp@legrand.fr wrote: ]

# I'm beginning to find that one-bit bit-fields
# are much more elegant and make my code very easy to understand.

...and slower to use.  You can only set one bit at a time instead of
32 in parallel, if that's what's needed.

# Bit-fields of course are not usually appropriate when trying to map
# hardware register values into data structures, but that's not what this
# API is doing anyway.
# 
# If I were to re-write my LM78 driver with a more generic API then I
# would most certainly avoid bit-flags using #define.

So use enum. :-)

...hasn't this horse been killed before?

				--*greywolf;
--
NetBSD: Feed The Computer.