Fixing more possible out of date files.
This commit is contained in:
parent
15ba03fea5
commit
a73ed65dac
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @file
|
||||
* @brief This file contains the register definitions for the AT86RF230.
|
||||
* $Id: at86rf230_registermap.h,v 1.1 2008/10/14 09:43:40 adamdunkels Exp $
|
||||
* $Id: at86rf230_registermap.h,v 1.2 2008/10/14 18:37:28 c_oflynn Exp $
|
||||
*/
|
||||
/* Copyright (c) 2008, Swedish Institute of Computer Science
|
||||
All rights reserved.
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: frame.c,v 1.1 2008/10/14 09:43:40 adamdunkels Exp $
|
||||
* $Id: frame.c,v 1.2 2008/10/14 18:37:28 c_oflynn Exp $
|
||||
*/
|
||||
/*
|
||||
* \brief This file is where the main functions that relate to frame
|
||||
|
@ -77,7 +77,7 @@
|
|||
#include "radio.h"
|
||||
#include "frame.h"
|
||||
//#include "mac_event.h"
|
||||
#include "mac.h"
|
||||
#include "zmac.h"
|
||||
#include "process.h"
|
||||
#include "sicslowmac.h"
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
* This file converts to and from a structure to a packed 802.15.4
|
||||
* frame.
|
||||
*
|
||||
* $Id: frame.h,v 1.1 2008/10/14 09:43:40 adamdunkels Exp $
|
||||
* $Id: frame.h,v 1.2 2008/10/14 18:37:28 c_oflynn Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -173,28 +173,6 @@ typedef struct{
|
|||
} frame_create_params_t;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief 802.15.4 frame structure, including the LQI, RSSI, and frame time
|
||||
* fields.
|
||||
*/
|
||||
/* typedef struct{ */
|
||||
/* fcf_t fcf; /\**< The FCF of the frame. *\/ */
|
||||
/* uint8_t seqNum; /\**< The sequence number of the frame. *\/ */
|
||||
/* uint16_t dest_pid; /\**< Destination PAN ID. *\/ */
|
||||
/* addr_t dest_addr; /\**< Destination address. *\/ */
|
||||
/* uint16_t src_pid; /\**< PAN ID *\/ */
|
||||
/* addr_t src_addr; /\**< Source address *\/ */
|
||||
/* uint8_t aux_sec_hdr[14]; /\**< 802.15.4 Aux security header *\/ */
|
||||
/* uint8_t payload_length; /\**< Length of payload section of frame *\/ */
|
||||
/* uint8_t payload[118]; /\**< Frame payload *\/ */
|
||||
/* uint8_t lqi; /\**< Link quality indication value *\/ */
|
||||
/* uint8_t rssi; /\**< Received signal strength indication value *\/ */
|
||||
/* uint32_t time; /\**< Time stamp of received frame *\/ */
|
||||
/* bool fcs:1; /\**< True if checksum has passed *\/ */
|
||||
/* bool in_use:1; /\**< Is this frame struct being used? *\/ */
|
||||
/* }FRAME_t; */
|
||||
|
||||
typedef struct{
|
||||
fcf_t * fcf; /**< The FCF of the frame. */
|
||||
uint8_t * seqNum; /**< The sequence number of the frame. */
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: hal.c,v 1.1 2008/10/14 09:43:40 adamdunkels Exp $
|
||||
* $Id: hal.c,v 1.2 2008/10/14 18:37:28 c_oflynn Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
* \file
|
||||
* \brief This file contains low-level radio driver code.
|
||||
*
|
||||
* $Id: hal.h,v 1.1 2008/10/14 09:43:40 adamdunkels Exp $
|
||||
* $Id: hal.h,v 1.2 2008/10/14 18:37:28 c_oflynn Exp $
|
||||
*/
|
||||
|
||||
#ifndef HAL_AVR_H
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: radio.c,v 1.1 2008/10/14 09:43:40 adamdunkels Exp $
|
||||
* $Id: radio.c,v 1.2 2008/10/14 18:37:28 c_oflynn Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -113,8 +113,7 @@ static uint8_t rssi_val;
|
|||
static uint8_t rx_mode;
|
||||
uint8_t rxMode = RX_AACK_ON;
|
||||
static hal_rx_frame_t rx_frame;
|
||||
parsed_frame_t parsed_frame;
|
||||
|
||||
static parsed_frame_t parsed_frame;
|
||||
|
||||
/*============================ PROTOTYPES ====================================*/
|
||||
bool radio_is_sleeping(void);
|
||||
|
@ -202,6 +201,19 @@ radio_init(bool cal_rc_osc,
|
|||
return init_status;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
uint8_t *
|
||||
radio_frame_data(void)
|
||||
{
|
||||
return rx_frame.data;
|
||||
}
|
||||
|
||||
uint8_t
|
||||
radio_frame_length(void)
|
||||
{
|
||||
return rx_frame.length;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
radio_rx_start_event(uint32_t const isr_timestamp, uint8_t const frame_length)
|
||||
|
@ -776,6 +788,8 @@ bool radio_is_sleeping(void)
|
|||
radio_status_t
|
||||
radio_set_trx_state(uint8_t new_state)
|
||||
{
|
||||
uint8_t original_state;
|
||||
|
||||
/*Check function paramter and current state of the radio transceiver.*/
|
||||
if (!((new_state == TRX_OFF) ||
|
||||
(new_state == RX_ON) ||
|
||||
|
@ -789,19 +803,22 @@ radio_set_trx_state(uint8_t new_state)
|
|||
return RADIO_WRONG_STATE;
|
||||
}
|
||||
|
||||
uint8_t original_state = radio_get_trx_state();
|
||||
|
||||
if ((original_state == BUSY_RX) ||
|
||||
(original_state == BUSY_TX) ||
|
||||
(original_state == BUSY_RX_AACK) ||
|
||||
(original_state == BUSY_TX_ARET)){
|
||||
return RADIO_BUSY_STATE;
|
||||
// Wait for radio to finish previous operation
|
||||
for(;;)
|
||||
{
|
||||
original_state = radio_get_trx_state();
|
||||
if (original_state != BUSY_TX_ARET &&
|
||||
original_state != BUSY_RX_AACK &&
|
||||
original_state != BUSY_RX &&
|
||||
original_state != BUSY_TX)
|
||||
break;
|
||||
}
|
||||
|
||||
if (new_state == original_state){
|
||||
return RADIO_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* At this point it is clear that the requested new_state is: */
|
||||
/* TRX_OFF, RX_ON, PLL_ON, RX_AACK_ON or TX_ARET_ON. */
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
* \file
|
||||
* \brief This file contains radio driver code.
|
||||
*
|
||||
* $Id: radio.h,v 1.1 2008/10/14 09:43:40 adamdunkels Exp $
|
||||
* $Id: radio.h,v 1.2 2008/10/14 18:37:28 c_oflynn Exp $
|
||||
*/
|
||||
|
||||
#ifndef RADIO_H
|
||||
|
@ -212,6 +212,8 @@ void radio_set_extended_address( uint8_t *extended_address );
|
|||
radio_status_t radio_configure_csma( uint8_t seed0, uint8_t be_csma_seed1 );
|
||||
bool calibrate_rc_osc_clkm(void);
|
||||
void calibrate_rc_osc_32k(void);
|
||||
uint8_t * radio_frame_data(void);
|
||||
uint8_t radio_frame_length(void);
|
||||
#define delay_us( us ) ( _delay_loop_2( ( F_CPU / 4000000UL ) * ( us ) ) )
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue