Permalink
Browse files

Replaced spaces with tabs.

  • Loading branch information...
1 parent 16c05b8 commit 08f8ad500528224cf9cae58a013502c3ac1693ee @DavidEGrayson DavidEGrayson committed Mar 23, 2011
Showing with 19 additions and 19 deletions.
  1. +3 −3 libraries/include/dma.h
  2. +16 −16 libraries/src/radio_link/radio_link.c
View
@@ -23,9 +23,9 @@ void dmaInit();
* for DMA channels 1-4. */
typedef struct DMA14_CONFIG
{
- /*! This is the DMA configuration struct for DMA channel 1,
- * which we have chosen to use for transmitting and receiving
- * radio packets. */
+ /*! This is the DMA configuration struct for DMA channel 1,
+ * which we have chosen to use for transmitting and receiving
+ * radio packets. */
volatile DMA_CONFIG radio;
/*! Config struct for DMA channel 2 (unassigned) */
@@ -233,12 +233,12 @@ static void txDataPacket(uint8 packetType)
static void takeInitiative()
{
- if (sendingReset)
- {
+ if (sendingReset)
+ {
// Try to send a reset packet.
txResetPacket();
- }
- else if (radioLinkTxInterruptIndex != radioLinkTxMainLoopIndex)
+ }
+ else if (radioLinkTxInterruptIndex != radioLinkTxMainLoopIndex)
{
// Try to send the next data packet.
txDataPacket(PACKET_TYPE_PING);
@@ -281,11 +281,11 @@ void radioMacEventHandler(uint8 event) // called by the MAC in an ISR
if ((currentRxPacket[RADIO_LINK_PACKET_TYPE_OFFSET] & PACKET_TYPE_MASK) == PACKET_TYPE_RESET)
{
- // The other Wixel sent a Reset packet, which means the next packet it sends will have a sequence bit of 0.
- // So this Wixel should set its "previously received" sequence bit to 1 so it expects a 0 next.
- rxSequenceBit = 1;
+ // The other Wixel sent a Reset packet, which means the next packet it sends will have a sequence bit of 0.
+ // So this Wixel should set its "previously received" sequence bit to 1 so it expects a 0 next.
+ rxSequenceBit = 1;
- // Send an ACK
+ // Send an ACK
shortTxPacket[RADIO_LINK_PACKET_LENGTH_OFFSET] = 1;
shortTxPacket[RADIO_LINK_PACKET_TYPE_OFFSET] = PACKET_TYPE_ACK;
radioMacTx(shortTxPacket);
@@ -297,18 +297,18 @@ void radioMacEventHandler(uint8 event) // called by the MAC in an ISR
{
// The packet we received contained an acknowledgment.
- if (sendingReset)
- {
- // If we were sending a Reset packet, stop trying to resend it.
- sendingReset = 0;
+ if (sendingReset)
+ {
+ // If we were sending a Reset packet, stop trying to resend it.
+ sendingReset = 0;
// Reset the transmission counter.
radioLinkTxCurrentPacketTries = 0;
// Make sure the next packet we transmit has a sequence bit of 0.
txSequenceBit = 0;
- }
- else if (radioLinkTxInterruptIndex != radioLinkTxMainLoopIndex)
+ }
+ else if (radioLinkTxInterruptIndex != radioLinkTxMainLoopIndex)
{
// Check to see if there is actually any TX packet that we were sending that
// can be acknowledged. This check should return true unless there is a bug
@@ -359,8 +359,8 @@ void radioMacEventHandler(uint8 event) // called by the MAC in an ISR
// We can accept this packet and send an ACK!
// Set rxSequenceBit to match the sequence bit in the received packet
- rxSequenceBit = (currentRxPacket[RADIO_LINK_PACKET_TYPE_OFFSET] & 1);
- acceptAnySequenceBit = 0;
+ rxSequenceBit = (currentRxPacket[RADIO_LINK_PACKET_TYPE_OFFSET] & 1);
+ acceptAnySequenceBit = 0;
// Set length byte that will be read by the higher-level code.
// (This overrides the 1-byte header.)

0 comments on commit 08f8ad5

Please sign in to comment.