#include "xstatus.h"
#include "warpphy.h"
Go to the source code of this file.
Data Structures | |
| struct | Macframe |
| Structure contains the header contents of a packet. More... | |
| struct | Maccontrol |
| Structure of miscellaneous control bits needed for correct operation of the MAC. More... | |
Defines | |
| #define | FIRST_RADIO RADIO2_ADDR |
| #define | SECOND_RADIO RADIO3_ADDR |
| #define | MY_XEM_MAX_FRAME_SIZE 2000 |
| #define | PING 0 |
| #define | PONG 1 |
| #define | NONE 0 |
| #define | ONE 0x1 |
| #define | TWO 0x2 |
| #define | THREE 0x4 |
| #define | FOUR 0x8 |
| #define | BPSK 1 |
| #define | QPSK 2 |
| #define | QAM_16 4 |
| #define | QAM_64 6 |
| #define | HDR_FULLRATE_BPSK (BPSK | (BPSK<<4)) |
| #define | HDR_FULLRATE_QPSK (QPSK | (QPSK<<4)) |
| #define | HDR_FULLRATE_QAM_16 (QAM_16 | (QAM_16<<4)) |
| #define | HDR_FULLRATE_QAM_64 (QAM_64 | (QAM_64<<4)) |
| #define | GHZ_5 0 |
| #define | GHZ_2 1 |
| #define | TMA_INTERRUPT 3 |
| #define | RX_INTERRUPT 2 |
| #define | BADRX_INTERRUPT 1 |
| #define | PB_INTERRUPT 0 |
| #define | TIMEOUT 0 |
| #define | BACKOFF 1 |
| #define | XEmacLite_mGetReceiveDataLength(BaseAddress) ((XEmacLite_mReadReg((BaseAddress), XEL_HEADER_OFFSET + XEL_RXBUFF_OFFSET) >> XEL_HEADER_SHIFT) & (XEL_RPLR_LENGTH_MASK_HI | XEL_RPLR_LENGTH_MASK_LO)) |
| #define | EMACLITE_DEVICE_ID XPAR_EMACLITE_0_DEVICE_ID |
| #define | INTC_DEVICE_ID XPAR_INTC_0_DEVICE_ID |
| #define | DMA_CTRL_DEVICE_ID XPAR_DMACENTRAL_0_DEVICE_ID |
| #define | DMADIR_IDLE 0 |
| #define | DMADIR_EMAC_TO_PHY 1 |
| #define | DMADIR_PHY_TO_EMAC 2 |
| #define | NUM_HEADER_BYTES 24 |
| #define | NUM_PAYLOAD_CRC_BYTES 4 |
| #define | NUM_PAYLOAD_TAIL_BYTES 1 |
| #define | NUM_BASERATE_SYMBOLS 4 |
| #define | NUM_TRAINING_SYMBOLS 2 |
| #define | warpmac_stopTimer() ofdm_timer_stop() |
| Halts a currently running timer. | |
Functions | |
| void | nullCallback (void *param) |
| void | warpmac_init () |
| Initializes the framework and all hardware peripherals. | |
| void | phyRx_goodHeader_int_handler () |
| "Good Header" Interrupt handler for the PHY layer. | |
| void | phyRx_badHeader_int_handler () |
| "Bad" Interrupt handler for the PHY layer. | |
| void | timer_int_handler () |
| Interrupt handler for the timer peripheral. | |
| int | warpmac_clearTimer () |
| This function stops the timer. | |
| void | warpmac_setTimerVal (Xuint32 clocks) |
| This function sets the timer to countdown for a given number of clock cycles. | |
| void | warpmac_startTimer (unsigned char mode) |
| This function starts the timer in either a CSMA or non-CSMA mode. | |
| unsigned int | randNum (unsigned int N) |
| Generates a uniform random value between [0,(2^N - 1)], where N is a positive integer. | |
| unsigned int | warpmac_carrierSense () |
| Returns a value corresponding to the instantaneous channel condition {busy or idle}. | |
| void | warpmac_setTimer (int type) |
| Function is responsible for high-level MAC timing. | |
| int | warpmac_startEmacXmit (Macframe *packet) |
| Pushes the given Macframe over ethernet - must come after warpmac_prepEmacForXmit. | |
| void | warpmac_prepEmacForXmit (Macframe *packet) |
| Starts a DMA transfer from the RX PHY to the EMAC for Ethernet transmission. | |
| void | warpmac_setUpButtonCallback (void(*handler)()) |
| Attaches user callback to up button. | |
| void | warpmac_setLeftButtonCallback (void(*handler)()) |
| Attaches user callback to left button. | |
| void | warpmac_setRightButtonCallback (void(*handler)()) |
| Attaches user callback to right button. | |
| void | warpmac_setMiddleButtonCallback (void(*handler)()) |
| Attaches user callback to middle button. | |
| void | warpmac_setTimerCallback (void(*handler)()) |
| Attaches user callback to timer. | |
| void | warpmac_setEmacCallback (void(*handler)()) |
| Attaches user callback to the Emac. | |
| void | warpmac_setGoodHeaderCallback (void(*handler)()) |
| Attaches user callback to PHY's good header interrupt. | |
| void | warpmac_setRxDoneCallback (void(*handler)()) |
| void | userIO_int_handler (void *InstancePtr) |
| Interrupt handler for the User I/O. | |
| void | warpmac_incrementLEDLow () |
| Alternates the bottom two LEDs on the WARP board. | |
| void | warpmac_incrementLEDHigh () |
| Alternates the top two LEDs on the WARP board. | |
| void | warpmac_setBaseRate (unsigned char rate) |
| Sets the base rate modulation order. | |
| void | warpmac_setFullRate (unsigned char rate) |
| void | warpmac_prepPhyForXmit (Macframe *packet, unsigned char buffer) |
| Loads a header into the PHY, but does not immediately transmit. | |
| void | warpmac_startPhyXmit (unsigned char buffer) |
| Sends the current txBuffer's content. | |
| void | warpmac_setRxBuffer (Macframe *packet, unsigned int rxBuff) |
| Tells the PHY which piece of memory to receive to. | |
| void | warpmac_setTxBuffer (unsigned int txBuff) |
| Tells the PHY which piece of memory to send from. | |
| int | warpmac_getRxBuffer () |
| Returns which buffer PHY is set to receive to. | |
| int | warpmac_getTxBuffer () |
| Returns which buffer PHY is set to send from. | |
| int | warpmac_incrementResend (Macframe *packet) |
| Increments the resend counter for the given Macframe. | |
| int | warpmac_addressedToMe (Macframe *packet) |
| Returns a value corresponding to whether the packet was destined for this particular node. | |
| int | warpmac_addressedFromThem (Macframe *packet, unsigned char *addr) |
| Returns a value corresponding to whether the packet was sourced from a given node. | |
| int | warpmac_addressedToThem (Macframe *packet, unsigned char *addr) |
| Returns a value corresponding to whether the packet was destined for a given node. | |
| void | warpmac_setMaxResend (unsigned int c) |
| Sets the maximum number of resends. | |
| void | warpmac_setMaxCW (unsigned int c) |
| Sets the maximum contention window. | |
| void | warpmac_setMacAddr (unsigned char *addr) |
| Sets wireless MAC address of this node. | |
| void | warpmac_setTimeout (unsigned int time) |
| Sets the amount of time the node is willing to wait for an acknowledgement. | |
| void | warpmac_setSlotTime (unsigned int time) |
| Sets the smallest backoff window. | |
| int | warpmac_inTimeout () |
| Returns a value corresponding to whether or not the node is in timeout. | |
| int | warpmac_getMyId () |
| Reads the value from the user dip switches for use as node identification. | |
| void | warpmac_enableCSMA () |
| Lowers carrier sense threshold such that CSMA state is enabled. | |
| void | warpmac_disableCSMA () |
| Raises carrier sense threshold such that CSMA state is disabled. | |
| unsigned char | sevenSegmentMap (unsigned char x) |
| Maps character to the seven segment display. | |
| void | warpmac_leftHex (unsigned char x) |
| Displays the input character on the left hex display. | |
| void | warpmac_rightHex (unsigned char x) |
| Displays the input character on the right hex display. | |
| void | warpmac_setDebugGPIO (unsigned char val) |
| Raises a signal that is routed out to the debug header on the board. | |
| void | warpmac_enableEthernet () |
| Enabled the Ethernet. | |
| void | warpmac_disableEthernet () |
| Disables the Ethernet. | |
| void | ErrorTrap (char *Message) |
| ErrorTrap This is a wrapper around a print statement. The purpose of this function is provide a single line to comment in or out to disable or enable debug messages. | |
| void | warpmac_finishPhyXmit () |
| Blocks on PHY transmission. | |
| void | warpmac_pollEthernet () |
| Polls the Ethernet. | |
| void | warpmac_enableSisoMode () |
| void | warpmac_enableMimoMode () |
| void | warpmac_enableMisoMode () |
| void | warpmac_disableMisoMode () |
| void | warpmac_uartRecvHandler (void *CallBackRef) |
| void | warpmac_setUartRecvCallback (void(*handler)()) |
| Attaches user callback to UART receive interrupt. | |
| int | warpmac_sendRawEthernetPacket (void *packet, unsigned int numBytes) |
Definition in file warpmac.h.
| #define warpmac_stopTimer | ( | ) | ofdm_timer_stop() |
Halts a currently running timer.
NOTE: This is a macro wrapper around ofdm_timer_stop()
Definition at line 180 of file warpmac.h.
Referenced by phyRx_goodHeader_callback(), timerExpire(), and up().
| void phyRx_badHeader_int_handler | ( | ) |
"Bad" Interrupt handler for the PHY layer.
This function is the ISR for the RX physical layer peripheral. This function is only called if the packet fails CRC. The received packet is passed to the user's callback, and the PHY is reset.
Definition at line 329 of file warpmac.c.
References usr_badHeaderCallback, usr_rxDoneCallback, and warpphy_clearRxInterrupts().
Referenced by warpmac_init().
| void phyRx_goodHeader_int_handler | ( | ) |
"Good Header" Interrupt handler for the PHY layer.
This function is the ISR for the RX physical layer peripheral. This function is only called if the packet header has no bit errors (i.e., the packet header passes CRCs in the PHY). This interrupt will be asserted *before* the packet is fully received. This function assumes the user's callback will poll the PHY to determine if the packet is eventually good or bad
Definition at line 278 of file warpmac.c.
References controlStruct, Macframe::header, INCOMPLETE, phyHeader::length, MY_XEM_MAX_FRAME_SIZE, NUM_HEADER_BYTES, NUM_PAYLOAD_CRC_BYTES, NUM_PAYLOAD_TAIL_BYTES, Maccontrol::rxBuffIndex, rxPacket, state, usr_goodHeaderCallback, usr_rxDoneCallback, warpphy_clearRxInterrupts(), warpphy_getBuffAddr, and warpphy_pollRxStatus().
Referenced by warpmac_init().
| unsigned int randNum | ( | unsigned int | N | ) |
| unsigned char sevenSegmentMap | ( | unsigned char | x | ) |
| void timer_int_handler | ( | ) |
Interrupt handler for the timer peripheral.
The timer interrupt handler gets called when a hardware timer set by the user expires. The user's callback is called upon the completion of this event
Definition at line 541 of file warpmac.c.
References controlStruct, timerIntStatus, Maccontrol::timerType, usr_timerCallback, warp_timer_getInterrupts(), and warp_timer_resetInterrupts().
Referenced by warpmac_init().
| void userIO_int_handler | ( | void * | InstancePtr | ) |
Interrupt handler for the User I/O.
This is a low-priority interrupt because it is primarily used for debugging purposes. The various user callbacks are executed, depending upon which button was depressed. Additionally, the board's dip switches also trigger this ISR, though the framework does not currently call user code in this event. We assume that dipswitches are currently only used for beginning-of-time state assignments. This will change in future releases.
Definition at line 501 of file warpmac.c.
References dipswState, usr_leftbutton, usr_middlebutton, usr_rightbutton, and usr_upbutton.
Referenced by warpmac_init().
| int warpmac_addressedFromThem | ( | Macframe * | packet, | |
| unsigned char * | addr | |||
| ) |
Returns a value corresponding to whether the packet was sourced from a given node.
| packet | Pointer to user's Macframe | |
| addr | Pointer to char array containing MAC address to compare against |
Definition at line 1060 of file warpmac.c.
References Macframe::header, and phyHeader::srcAddr.
| int warpmac_addressedToMe | ( | Macframe * | packet | ) |
Returns a value corresponding to whether the packet was destined for this particular node.
| packet | Pointer to user's Macframe |
Definition at line 1039 of file warpmac.c.
References controlStruct, phyHeader::destAddr, Macframe::header, and Maccontrol::selfAddr.
| int warpmac_addressedToThem | ( | Macframe * | packet, | |
| unsigned char * | addr | |||
| ) |
Returns a value corresponding to whether the packet was destined for a given node.
| packet | Pointer to user's Macframe | |
| addr | Pointer to char array containing MAC address to compare against |
Definition at line 1079 of file warpmac.c.
References phyHeader::destAddr, and Macframe::header.
| unsigned int warpmac_carrierSense | ( | ) |
Returns a value corresponding to the instantaneous channel condition {busy or idle}.
Definition at line 593 of file warpmac.c.
References OFDM_BASEADDR.
| int warpmac_clearTimer | ( | ) |
This function stops the timer.
Additionally it will return the amount of time remaining before expiration.
Definition at line 556 of file warpmac.c.
References controlStruct, Maccontrol::currBackoff, warp_timer_stop(), and warp_timer_timeLeft().
| void warpmac_finishPhyXmit | ( | ) |
Blocks on PHY transmission.
This function waits for the PHY to finish transmitting, then re-enables wireless reception and sets packet buffers back to their default values.
Definition at line 969 of file warpmac.c.
References controlStruct, Maccontrol::rxBuffIndex, Maccontrol::txBuffIndex, warpphy_setBuffs(), and warpphy_waitForTx().
Referenced by emacRx_callback(), initTX(), phyRx_goodHeader_callback(), rtsmac_phyRx_goodHeader_callback(), sendBCD(), sendCTS(), sendDAT(), switchChannels(), and timer_callback().
| int warpmac_getMyId | ( | ) |
Reads the value from the user dip switches for use as node identification.
Definition at line 1142 of file warpmac.c.
References dipswState, and warpmac_rightHex().
| int warpmac_getRxBuffer | ( | ) |
Returns which buffer PHY is set to receive to.
Definition at line 999 of file warpmac.c.
References controlStruct, and Maccontrol::rxBuffIndex.
| int warpmac_getTxBuffer | ( | ) |
Returns which buffer PHY is set to send from.
Definition at line 1007 of file warpmac.c.
References controlStruct, and Maccontrol::txBuffIndex.
| int warpmac_incrementResend | ( | Macframe * | packet | ) |
Increments the resend counter for the given Macframe.
Also, it returns whether or not the counter has wrapped around the maximum number of retransmits
| packet | Pointer to user's Macframe |
Definition at line 1018 of file warpmac.c.
References controlStruct, Maccontrol::currBackoff, phyHeader::currReSend, Macframe::header, and Maccontrol::maxReSend.
| void warpmac_init | ( | ) |
Initializes the framework and all hardware peripherals.
This function sets reasonable default values for many of the parameters of the MAC, configures interrupts and exceptions, configures Ethernet, and finally initializes the custom peripherals such as the radio controller, the PHY, the packet detector, and the automatic gain control block.
Definition at line 109 of file warpmac.c.
References controlStruct, Maccontrol::currBackoff, currentEmacBuff, DMA_CTRL_DEVICE_ID, EMACLITE_DEVICE_ID, ErrorTrap(), INTC_DEVICE_ID, LEDHEX_Outputs, ledStates, ledStatesHigh, ledStatesIndexHigh, ledStatesIndexLow, ledStatesLow, leftHex, Maccontrol::maxBackoff, Maccontrol::maxReSend, nullCallback(), phyRx_badHeader_int_handler(), phyRx_goodHeader_int_handler(), PING, rightHex, Maccontrol::rxBuffIndex, timer_int_handler(), Maccontrol::txBuffIndex, userIO_int_handler(), usr_badHeaderCallback, usr_goodHeaderCallback, usr_leftbutton, usr_middlebutton, usr_rightbutton, usr_rxDoneCallback, usr_timerCallback, usr_uartRecvCallback, usr_upbutton, warpmac_sisoMode, warpmac_uartRecvHandler(), warpphy_clearRxInterrupts(), warpphy_init(), and warpphy_setBuffs().
| int warpmac_inTimeout | ( | ) |
Returns a value corresponding to whether or not the node is in timeout.
Definition at line 1135 of file warpmac.c.
References controlStruct, TIMEOUT, and Maccontrol::timerType.
| void warpmac_leftHex | ( | unsigned char | x | ) |
Displays the input character on the left hex display.
| x | Character to display |
Definition at line 1191 of file warpmac.c.
References LEDHEX_Outputs, ledStatesHigh, ledStatesIndexHigh, ledStatesIndexLow, ledStatesLow, leftHex, rightHex, and sevenSegmentMap().
| void warpmac_pollEthernet | ( | ) |
Polls the Ethernet.
Function checks the status of the ping and pong Emac buffers and calls the effective-ISR when either is filled.
Definition at line 1250 of file warpmac.c.
References controlStruct, emacRx_int_handler(), and Maccontrol::enableEthernetInt.
| void warpmac_prepEmacForXmit | ( | Macframe * | packet | ) |
Starts a DMA transfer from the RX PHY to the EMAC for Ethernet transmission.
| packet | Pointer to user's Macframe |
Definition at line 722 of file warpmac.c.
References controlStruct, ErrorTrap(), Macframe::header, phyHeader::length, NUM_HEADER_BYTES, Maccontrol::rxBuffIndex, and warpphy_getBuffAddr.
Referenced by phyRx_goodHeader_callback(), and rtsmac_phyRx_goodHeader_callback().
| void warpmac_prepPhyForXmit | ( | Macframe * | packet, | |
| unsigned char | buffer | |||
| ) |
Loads a header into the PHY, but does not immediately transmit.
This function performs the conversion from the packet structure to the byte array but does not send the packet over the air. This is used to "preload" and ACK into the PHY while the data packet is still being received. This extra pipelining saves on turn-around time.
| packet | Pointer to user's Macframe | |
| buffer | Packet buffer to send from |
Definition at line 839 of file warpmac.c.
References CODE_RATE_12, CODE_RATE_23, CODE_RATE_34, phyHeader::codeRate, phyHeader::fullRate, Macframe::header, phyHeader::length, NUM_BASERATE_SYMBOLS, NUM_HEADER_BYTES, NUM_PAYLOAD_CRC_BYTES, NUM_PAYLOAD_TAIL_BYTES, numBaseRate, numTrainingSyms, warpmac_sisoMode, warpphy_getBuffAddr, and warpphy_setNumSyms.
Referenced by emacRx_callback(), initTX(), phyRx_goodHeader_callback(), rtsmac_emacRx_callback(), rtsmac_phyRx_goodHeader_callback(), sendCTS(), switchChannels(), and timer_callback().
| void warpmac_rightHex | ( | unsigned char | x | ) |
Displays the input character on the right hex display.
| x | Character to display |
Definition at line 1209 of file warpmac.c.
References LEDHEX_Outputs, ledStatesHigh, ledStatesIndexHigh, ledStatesIndexLow, ledStatesLow, leftHex, rightHex, and sevenSegmentMap().
| void warpmac_setBaseRate | ( | unsigned char | rate | ) |
Sets the base rate modulation order.
The base rate symbols (i.e. the header) must have an agreed upon rate between the transmitter and receiver. This function sets that rate.
Definition at line 826 of file warpmac.c.
References warpphy_set_modulation().
| void warpmac_setDebugGPIO | ( | unsigned char | val | ) |
| void warpmac_setEmacCallback | ( | void(*)() | handler | ) |
Attaches user callback to the Emac.
| handler | pointer to user's callback |
Definition at line 774 of file warpmac.c.
References usr_emacCallback.
Referenced by main().
| void warpmac_setGoodHeaderCallback | ( | void(*)() | handler | ) |
Attaches user callback to PHY's good header interrupt.
| handler | pointer to user's callback |
Definition at line 781 of file warpmac.c.
References usr_goodHeaderCallback.
Referenced by main().
| void warpmac_setLeftButtonCallback | ( | void(*)() | handler | ) |
Attaches user callback to left button.
| handler | pointer to user's callback |
Definition at line 749 of file warpmac.c.
References usr_leftbutton.
Referenced by main().
| void warpmac_setMacAddr | ( | unsigned char * | addr | ) |
Sets wireless MAC address of this node.
| addr | Pointer to char array containing MAC address |
Definition at line 1109 of file warpmac.c.
References controlStruct, and Maccontrol::selfAddr.
| void warpmac_setMaxCW | ( | unsigned int | c | ) |
Sets the maximum contention window.
| c | Maximum contention window |
Definition at line 1102 of file warpmac.c.
References controlStruct, and Maccontrol::maxBackoff.
| void warpmac_setMaxResend | ( | unsigned int | c | ) |
Sets the maximum number of resends.
| c | Integer maximum number of resends |
Definition at line 1095 of file warpmac.c.
References controlStruct, and Maccontrol::maxReSend.
| void warpmac_setMiddleButtonCallback | ( | void(*)() | handler | ) |
Attaches user callback to middle button.
| handler | pointer to user's callback |
Definition at line 761 of file warpmac.c.
References usr_middlebutton.
Referenced by main().
| void warpmac_setRightButtonCallback | ( | void(*)() | handler | ) |
Attaches user callback to right button.
| handler | pointer to user's callback |
Definition at line 755 of file warpmac.c.
References usr_rightbutton.
Referenced by main().
| void warpmac_setRxBuffer | ( | Macframe * | packet, | |
| unsigned int | rxBuff | |||
| ) |
Tells the PHY which piece of memory to receive to.
Also, it updates the global struct element Maccontrol::rxBuffIndex to keep track of that information
Definition at line 980 of file warpmac.c.
References controlStruct, Maccontrol::rxBuffIndex, rxPacket, Maccontrol::txBuffIndex, and warpphy_setBuffs().
| void warpmac_setSlotTime | ( | unsigned int | time | ) |
Sets the smallest backoff window.
| time | Slot time duration (in microseconds) |
Definition at line 1128 of file warpmac.c.
References controlStruct, and Maccontrol::slotTime.
| void warpmac_setTimeout | ( | unsigned int | time | ) |
Sets the amount of time the node is willing to wait for an acknowledgement.
| time | Timeout duration (in microseconds) |
Definition at line 1121 of file warpmac.c.
References controlStruct, and Maccontrol::timeout.
| void warpmac_setTimer | ( | int | type | ) |
Function is responsible for high-level MAC timing.
This function is used by user code, and in turn calls the other timer functions. It is capable of initiating either a deterministic timeout, or a random backoff.
Definition at line 610 of file warpmac.c.
References BACKOFF, controlStruct, Maccontrol::currBackoff, Maccontrol::maxBackoff, randNum(), Maccontrol::slotTime, Maccontrol::timeout, TIMEOUT, Maccontrol::timerType, usr_timerCallback, warpmac_setTimerVal(), and warpmac_startTimer().
| void warpmac_setTimerCallback | ( | void(*)() | handler | ) |
Attaches user callback to timer.
| handler | pointer to user's callback |
Definition at line 767 of file warpmac.c.
References usr_timerCallback.
Referenced by main().
| void warpmac_setTimerVal | ( | Xuint32 | clocks | ) |
This function sets the timer to countdown for a given number of clock cycles.
| clocks | Number of 40MHz clock cycles to countdown from |
Definition at line 566 of file warpmac.c.
References warp_timer_setVal().
| void warpmac_setTxBuffer | ( | unsigned int | txBuff | ) |
Tells the PHY which piece of memory to send from.
Also, it updates the global struct element Maccontrol::txBuffIndex to keep track of that information
Definition at line 990 of file warpmac.c.
References controlStruct, Maccontrol::rxBuffIndex, Maccontrol::txBuffIndex, and warpphy_setBuffs().
| void warpmac_setUartRecvCallback | ( | void(*)() | handler | ) |
Attaches user callback to UART receive interrupt.
| handler | pointer to user's callback |
Definition at line 1341 of file warpmac.c.
References usr_uartRecvCallback.
Referenced by main().
| void warpmac_setUpButtonCallback | ( | void(*)() | handler | ) |
Attaches user callback to up button.
| handler | pointer to user's callback |
Definition at line 743 of file warpmac.c.
References usr_upbutton.
Referenced by main().
| int warpmac_startEmacXmit | ( | Macframe * | packet | ) |
Pushes the given Macframe over ethernet - must come after warpmac_prepEmacForXmit.
| packet | Pointer to user's Macframe |
Definition at line 646 of file warpmac.c.
References Macframe::header, and phyHeader::length.
Referenced by phyRx_goodHeader_callback(), and rtsmac_phyRx_goodHeader_callback().
| void warpmac_startPhyXmit | ( | unsigned char | buffer | ) |
Sends the current txBuffer's content.
This function sends an existing Macframe over the air. This existing Macframe comes from the warpmac_prepPhyForXmit function.
Definition at line 942 of file warpmac.c.
References controlStruct, ErrorTrap(), Maccontrol::rxBuffIndex, TXNOBLOCK, warpphy_pktTx(), and warpphy_setBuffs().
Referenced by emacRx_callback(), initTX(), phyRx_goodHeader_callback(), rtsmac_phyRx_goodHeader_callback(), sendBCD(), sendCTS(), sendDAT(), switchChannels(), and timer_callback().
| void warpmac_startTimer | ( | unsigned char | mode | ) |
This function starts the timer in either a CSMA or non-CSMA mode.
| mode | ENABLECSMA if automatic carrier-sense pausing is desired. DISABLECSMA if received energy is to be ignored. |
Definition at line 574 of file warpmac.c.
References warp_timer_setMode(), and warp_timer_start().
| Updated on Sat Oct 11 00:50:53 2008 | |