User`s guide
Aironet Wireless Communications, Inc. 7-32 Confidential and Proprietary
Memory (FID/RID) Access
The PC4500/4800 provides two sets of 3 I/O registers for reading and writing receive and transmit
packets and statistics and configuration information. It is suggested that one set be used in an interrupt
context and the other in a non-interrupt context. These registers are collectively known as the "BAP"
registers. (also see section "Basic FID Access" on page 7-14 for more information)
Transmit and receive packets are accessed using the Frame Identifiers (FID) that are passed to the host in
the RxFid, TxComplFid and TxAllocFid registers.
Configuration, statistics and status information are accessed using a predefined Resource Identifier (RID)
number.
Details on the contents of the FIDs and RIDs are available in later sections. This section explains the
general mechanism for reading and writing FIDs and RIDs.
FID/RID are accessed using three I/O registers: Selector, Offset, Data.
The Selector register must be written first to choose the desired FID/RID. A selector value of zero is
never used. The Offset register is written second to select the position within the FID/RID. Since only
16-bit accesses are supported, only even offsets are allowed -- the least significant bit must be zero. The
third register is the Data register which allows reads and writes to the FID/RID. Successive reads and
writes advance to the next sequential location within the FID/RID.
The following is sample code for reading/writing FID/RIDs:
bap0_setup(u16 rid, u16 offset)
{
// this example uses SELECT0/OFFSET0/DATA0
OUT4500(SELECT0, rid);
OUT4500(OFFSET0, offset);
while (1) {
status = INPORT(OFFSET0);
if (status & BAP_BUSY) {
if (timeout) {
// suggested timeout of 500 usec minimum
push_interrupt_enable_state(); // save interrupt enable state
disable_interrupts(); // disable interrupts
OUT4500(SELECT0, rid);
OUT4500(OFFSET0, offset);
pop_interrupt_enable_state(); // restore interrupt enable state
restart_timeout();
}
continue;
}
if (status & BAP_ERR) {
// invalid rid or offset
return ERROR;
}
if (status & BAP_DONE) {
// success
return SUCCESS;
}