hpltda5250config.nc
来自「tinyos-2.x.rar」· NC 代码 · 共 502 行 · 第 1/2 页
NC
502 行
/*
* Copyright (c) 2004, Technische Universitaet Berlin
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the Technische Universitaet Berlin nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* - Revision -------------------------------------------------------------
* $Revision: 1.4 $
* $Date: 2006/12/12 18:23:13 $
* @author: Kevin Klues (klues@tkn.tu-berlin.de)
* ========================================================================
*/
#include "tda5250Const.h"
/**
* This interface provides commands and events for configureing the radio modes.
*
* @author Kevin Klues
*/
interface HplTda5250Config {
/**
* Resets all Radio Registers to default values.
* The default values can be found in tda5250RegDefaults.h
*/
async command void reset();
/**
* Set the data slicer to use the RC integrator.
* The data slicer is an analog-to-digital converter for the radio data.
* When using RC integrator the mean value of the analog data is used
* to convert the analog data to a Bit.
*/
async command void UseRCIntegrator();
/**
* Set the data slicer to use the Peak Detector.
* The data slicer is an analog-to-digital converter for the radio data.
* When using peak detector the peak value of the analog data is used
* to convert the analog data to a Bit.
*/
async command void UsePeakDetector();
/**
* Powers the radio down.
*/
async command void PowerDown();
/**
* Powers the radio up.
*/
async command void PowerUp();
/**
* Switch radio to test operation.
* FIXME: Whatever this means...
*/
async command void RunInTestMode();
/**
* Switches the radio to normal operation.
*/
async command void RunInNormalMode();
/**
* Control the radio Tx and Rx mode externally.
*/
async command void ControlRxTxExternally();
/**
* Control the radio Tx and Rx mode internally.
*/
async command void ControlRxTxInternally();
/**
* Use FSK modulation.
*
* @param pos_shift Capacitor value for positive shift.
* @param neg_shift Capacitor value for negative shift.
*/
async command void UseFSK(tda5250_cap_vals_t pos_shift, tda5250_cap_vals_t neg_shift);
/**
* Use ASK mosulation.
*
* @param pos_shift Capacitor value for positive shift. (FIXME: makes sense?)
*/
async command void UseASK(tda5250_cap_vals_t pos_shift);
/**
* Disables internal clock during power down.
*/
async command void SetClockOffDuringPowerDown();
/**
* Enables internal clock during power down.
*/
async command void SetClockOnDuringPowerDown();
/**
* Enables inverting the radio data.
*/
async command void InvertData();
/**
* Disables inverting radio data.
*/
async command void DontInvertData();
/**
* Use the RSSI data valid detection.
* For the data valid detection 3 thresholds must be defined.
* The data is only considered valid if the RSSI is greater than RSSI threshold
* and the data rate is between the lower and upper data rate threshold.
*
* @param value The RSSI threshold for valid data.
* @param lower_bound Lower data rate threshold.
* @param upper_bound Upper data rate threshold.
*/
async command void UseRSSIDataValidDetection(uint8_t value, uint16_t lower_bound, uint16_t upper_bound);
/**
* Use the Vcc data valid detection.
* For the data valid detection 3 thresholds must be defined.
* The data is only considered valid if the voltage is greater than voltage threshold
* and the data rate is between the lower and upper data rate threshold.
*
* @param value The voltage threshold for valid data.
* @param lower_bound Lower data rate threshold.
* @param upper_bound Upper data rate threshold.
*/
async command void UseVCCDataValidDetection(uint8_t value, uint16_t lower_bound, uint16_t upper_bound);
/**
* Use the data valid detection.
* This means that the receiving data is checked either by RSSI data valid detection or
* by Vcc data valid detection if it is actual data and no noise.
*/
async command void UseDataValidDetection();
/** Do not use data valid detection.
* This means that it is assumed that the receiving data is
* always valid data.
* It is absolutely necessary to
* set the RSSI-ADC (and the Window counter) into continuous mode.
*/
async command void UseDataAlwaysValid();
/**
* Sets the ADC to continious mode.
* Analog sampling data is taken continously.
*/
async command void ADCContinuousMode();
/**
* Sets the ADC to one shot mode.
* The sampling data is taken in one shot.
*/
async command void ADCOneShotMode();
/**
* Sets the data calid detection in continous mode.
*/
async command void DataValidContinuousMode();
/**
* Sets the data calid detection in one shot mode.
*/
async command void DataValidOneShotMode();
/**
* Sets the low noise amplifier to high gain
*/
async command void HighLNAGain();
/**
* Sets the low noise amplifier to low gain
*/
async command void LowLNAGain();
/**
* Enables the receiver when in TIMER_MODE or SELF_POLLING_MODE.
*/
async command void EnableReceiverInTimedModes();
/**
* Disables the receiver when in TIMER_MODE or SELF_POLLING_MODE.
*/
async command void DisableReceiverInTimedModes();
/**
* Use high transmit power.
*/
async command void UseHighTxPower();
/**
* Use low transmit power.
*/
async command void UseLowTxPower();
/**
* Tune the nominal frequency with a Bipolar FET.
*
* @param ramp_time Ramp time.
* @param cap_val Capacitor value.
*/
async command void TuneNomFreqWithBipolarFET(tda5250_bipolar_fet_ramp_times_t ramp_time, tda5250_cap_vals_t cap_val);
/**
* Tune the nominal frequency with a FET
*
* @param cap_val Capacitor value.
*/
async command void TuneNomFreqWithFET(tda5250_cap_vals_t cap_val);
/**
* Set the mode of the radio to SlaveMode.
*/
async command void SetSlaveMode();
/**
* Set the mode of the radio to TimerMode.
*
* @param on_time The time (ms) the radio is on.
* @param off_time The time (ms) the radio is off.
*/
async command void SetTimerMode(float on_time, float off_time);
/**
* Resets the timers set in SetTimerMode().
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?