| History log of /src/sys/dev/ic/max2820reg.h |
| Revision | | Date | Author | Comments |
| 1.8 |
| 19-Oct-2009 |
rmind | Drop 3rd and 4th clauses from David Young's license. Reviewed and approved by dyoung@ (copyright holder).
|
| 1.7 |
| 31-Aug-2006 |
dyoung | branches: 1.7.56; Per discussion on tech-kern and tech-userlevel, move the bit-twiddling macros, __BIT, __BITS, SHIFTIN, SHIFTOUT, and __arraycount() from lib/libkern/libkern.h to sys/cdefs.h. Add a __-prefix to SHIFTIN and SHIFTOUT, and add a manual page for the bit-twiddling macros, bits(3).
Make the __BIT and __BITS macros "widthless," as best I can, by changing their type to uintmax_t from uint32_t. XXX The manual page lags this change by a bit.
Define __PRIxBIT and __PRIxBITS printf(3) format strings.
|
| 1.6 |
| 14-May-2006 |
elad | integrate kauth.
|
| 1.5 |
| 08-Mar-2006 |
dyoung | Change macro names to avoid collisions:
BIT -> __BIT BITS -> __BITS
|
| 1.4 |
| 08-Mar-2006 |
dyoung | Move my bit-twiddling macros to libkern.h from my drivers, where I had duplicated them. Improve the macros' names. Simplify their implementation.
A brief description of each macro is below.
BIT(n): Return a bitmask with bit m set, where the least significant bit is bit 0.
BITS(m, n): Return a bitmask with bits m through n, inclusive, set. It does not matter whether m>n or m<=n. The least significant bit is bit 0.
A "bitfield" is a span of consecutive bits defined by a bitmask, where 1s select the bits in the bitfield. SHIFTIN, SHIFTOUT, and SHIFTOUT_MASK help read and write bitfields from device registers.
SHIFTIN(v, mask): Left-shift bits `v' into the bitfield defined by `mask', and return them. No side-effects.
SHIFTOUT(v, mask): Extract and return the bitfield selected by `mask' from `v', right-shifting the bits so that the rightmost selected bit is at bit 0. No side-effects.
SHIFTOUT_MASK(mask): Right-shift the bits in `mask' so that the rightmost non-zero bit is at bit 0. This is useful for finding the greatest unsigned value that a bitfield can hold. No side-effects. Note that SHIFTOUT_MASK(m) = SHIFTOUT(m, m).
Examples:
/* * Register definitions taken from the RFMD RF3000 manual. */ #define RF3000_GAINCTL 0x11 /* TX variable gain control */ #define RF3000_GAINCTL_TXVGC_MASK BITS(7, 2) #define RF3000_GAINCTL_SCRAMBLER BIT(1)
/* * Shift the transmit power into the transmit-power field of the * gain-control register and write it to the baseband processor. */ atw_rf3000_write(sc, RF3000_GAINCTL, SHIFTIN(txpower, RF3000_GAINCTL_TXVGC_MASK));
/* * Register definitions taken from the ADMtek ADM8211 manual. * */ #define ATW_RXSTAT_OWN BIT(31) /* 1: NIC may fill descriptor */ /* ... */ #define ATW_RXSTAT_DA1 BIT(17) /* DA bit 1, admin'd address */ #define ATW_RXSTAT_DA0 BIT(16) /* DA bit 0, group address */ #define ATW_RXSTAT_RXDR_MASK BITS(15,12) /* RX data rate */ #define ATW_RXSTAT_FL_MASK BITS(11,0) /* RX frame length, last * descriptor only */
/* Extract the frame length from the Rx descriptor's * status field. */ len = SHIFTOUT(rxstat, ATW_RXSTAT_FL_MASK);
|
| 1.3 |
| 11-Dec-2005 |
christos | branches: 1.3.4; 1.3.6; 1.3.8; 1.3.10; merge ktrace-lwp.
|
| 1.2 |
| 27-Feb-2005 |
perry | branches: 1.2.4; nuke trailing whitespace
|
| 1.1 |
| 26-Sep-2004 |
dyoung | branches: 1.1.2; 1.1.6; 1.1.8; Add work-in-progress driver rtw(4) for Realtek RTL8180 MAC/baseband.
Add register definitions for Maxim MAX2820 and Philips SA2400 radio front-ends.
|
| 1.1.8.1 |
| 19-Mar-2005 |
yamt | sync with head. xen and whitespace. xen part is not finished.
|
| 1.1.6.1 |
| 29-Apr-2005 |
kent | sync with -current
|
| 1.1.2.3 |
| 04-Mar-2005 |
skrll | Sync with HEAD.
Hi Perry!
|
| 1.1.2.2 |
| 19-Oct-2004 |
skrll | Sync with HEAD
|
| 1.1.2.1 |
| 26-Sep-2004 |
skrll | file max2820reg.h was added on branch ktrace-lwp on 2004-10-19 15:56:55 +0000
|
| 1.2.4.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
| 1.2.4.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
| 1.3.10.1 |
| 19-Apr-2006 |
elad | sync with head.
|
| 1.3.8.2 |
| 03-Sep-2006 |
yamt | sync with head.
|
| 1.3.8.1 |
| 13-Mar-2006 |
yamt | sync with head.
|
| 1.3.6.1 |
| 22-Apr-2006 |
simonb | Sync with head.
|
| 1.3.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
| 1.7.56.1 |
| 11-Mar-2010 |
yamt | sync with head
|