Contiki 3.x
|
Copyright (c) 2014, Analog Devices, Inc. More...
Go to the source code of this file.
Enumerations | |
enum | RIE_BaseConfigs { DR_1_0kbps_Dev10_0kHz = 0x0, DR_38_4kbps_Dev20kHz = 0x1, DR_300_0kbps_Dev75_0kHz = 0x2 } |
enum | RIE_ModulationTypes { FSK_Modulation = 0, GFSK_Modulation = 1 } |
enum | RIE_PATypes { DifferentialPA = 0, SingleEndedPA = 1 } |
enum | RIE_BOOL { RIE_FALSE = 0, RIE_TRUE = !RIE_FALSE } |
enum | RIE_Responses { RIE_Success = 0x0, RIE_RadioSPICommsFail = 0x1, RIE_UnsupportedRadioConfig = 0x2, RIE_Unimplemented = 0x3, RIE_InvalidParamter = 0x4 } |
Functions | |
RIE_Responses | RadioGetAPIVersion (RIE_U32 *pVersion) |
Return the Radio Interface Engine API Version. More... | |
RIE_Responses | RadioInit (RIE_BaseConfigs BaseConfig) |
Initialise the Radio, using specified configuration. More... | |
RIE_Responses | RadioPowerOff (void) |
Shutdown the radio and place it in its lowest power sleep mode. More... | |
RIE_Responses | RadioTerminateRadioOp (void) |
Terminate a currently running radio RX or TX operation. More... | |
RIE_Responses | RadioSetFrequency (RIE_U32 Frequency) |
Set frequency for radio communications. More... | |
RIE_Responses | RadioSetModulationType (RIE_ModulationTypes ModulationType) |
Set the Radio Transmitter Modulation Type. More... | |
RIE_Responses | RadioPayldManchesterEncode (RIE_BOOL bEnable) |
Enable or Disable Manchester Encoding of payload data. More... | |
RIE_Responses | RadioPayldDataWhitening (RIE_BOOL bEnable) |
Enable or Disable Data Whitening of payload data. More... | |
RIE_Responses | RadioTxPacketFixedLen (RIE_U8 Len, RIE_U8 *pData) |
Transmit a fixed length packet. More... | |
RIE_BOOL | RadioTxPacketComplete (void) |
Checks if a packet has finished transmitting. More... | |
RIE_Responses | RadioTxSetPA (RIE_PATypes PAType, RIE_PAPowerLevel Power) |
Set PA Type and the Transmit Power Level for Radio Transmission. More... | |
RIE_Responses | RadioTxCarrier (void) |
Transmit a carrier tone using the current radio configuration. More... | |
RIE_Responses | RadioTxPreamble (void) |
Transmit a pre-amble (alternating ones and zeros) using the current radio configuration. More... | |
RIE_Responses | RadioRxPacketFixedLen (RIE_U8 Len) |
Enter receive mode and wait for a packet to be received. More... | |
RIE_BOOL | RadioRxPacketAvailable (void) |
Checks if a packet has been received. More... | |
RIE_Responses | RadioRxPacketRead (RIE_U8 BufferLen, RIE_U8 *pPktLen, RIE_U8 *pData, RIE_S8 *pRSSIdBm) |
Read the packet that was received by the radio. More... | |
RIE_Responses | RadioRxBERTestMode (void) |
Enter receiver Bit Error Rate (BER) test mode where the clock and data appear on GPIO pins. More... | |
RIE_Responses | RadioSwitchConfig (RIE_BaseConfigs BaseConfig) |
Change the Radio to using specified configuration. More... | |
RIE_Responses | RadioRadioGetRSSI (RIE_S8 *pRSSIdBm) |
Return a Received Signal Strength Indicator value. More... | |
RIE_Responses | RadioTxSetPower (RIE_PAPowerLevel Power) |
Set the Transmit Power Level for Radio Transmission. More... | |
RIE_Responses | RadioTxPacketVariableLen (RIE_U8 Len, RIE_U8 *pData) |
Transmit a Variable length packet. More... | |
RIE_Responses | RadioRxPacketVariableLen (void) |
Enter receive mode and wait for a packet to be received. More... | |
RIE_Responses | RadioDeInit (void) |
Deinitialise the Radio, and power it down. More... | |
Copyright (c) 2014, Analog Devices, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. 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.
Radio Interface Engine Functions
Definition in file radioeng.h.
enum RIE_BaseConfigs |
Variables of this type are used to define the Base Configuration
Definition at line 62 of file radioeng.h.
enum RIE_BOOL |
Variables of this type are used to define a TRUE or FALSE condition
Enumerator | |
---|---|
RIE_FALSE |
FALSE condition |
RIE_TRUE |
TRUE condition |
Definition at line 110 of file radioeng.h.
enum RIE_ModulationTypes |
Variables of this type are used to define a tx modulation type
Enumerator | |
---|---|
FSK_Modulation |
FSK Modulation |
GFSK_Modulation |
GFSK Modulation |
Definition at line 79 of file radioeng.h.
enum RIE_PATypes |
Variables of this type are used to define a PA type
Enumerator | |
---|---|
DifferentialPA |
Differential PA |
SingleEndedPA |
Single Ended PA |
Definition at line 90 of file radioeng.h.
enum RIE_Responses |
Variables of this type are used to define the return value from functions
Definition at line 131 of file radioeng.h.
RIE_Responses RadioDeInit | ( | void | ) |
Deinitialise the Radio, and power it down.
Definition at line 472 of file radioeng.c.
References NVIC_DisableIRQ(), RIE_Success, and UHFTRX_IRQn.
RIE_Responses RadioGetAPIVersion | ( | RIE_U32 * | pVersion | ) |
Return the Radio Interface Engine API Version.
pVersion | :{} pVersion Storage for Radio Interface Engine API version. RIE_U32 Version;
Response = RadioGetAPIVersion(&Version);
|
Definition at line 347 of file radioeng.c.
References RIE_Success.
RIE_Responses RadioInit | ( | RIE_BaseConfigs | BaseConfig | ) |
Initialise the Radio, using specified configuration.
BaseConfig | :{DR_1_0kbps_Dev10_0kHz , DR_38_4kbps_Dev20kHz ,DR_300_0kbps_Dev75_0kHz }
|
Definition at line 396 of file radioeng.c.
References NVIC_ClearPendingIRQ(), NVIC_DisableIRQ(), NVIC_EnableIRQ(), NVIC_SetPriority(), RadioPowerOff(), RIE_Success, and UHFTRX_IRQn.
RIE_Responses RadioPayldDataWhitening | ( | RIE_BOOL | bEnable | ) |
Enable or Disable Data Whitening of payload data.
Data whitening can be employed to avoid long runs of 1s or 0s in the transmitted data stream. This ensures sufficient bit transitions in the packet, which aids in receiver clock and data recovery because the encoding breaks up long runs of 1s or 0s in the transmit packet. The data, excluding the preamble and sync word, is automatically whitened before transmission by XORing the data with an 8-bit pseudorandom sequence. At the receiver, the data is XORed with the same pseudorandom sequence, thereby reversing the whitening. The linear feedback shift register polynomial used is x7 + x1 + 1.
bEnable | :{RIE_FALSE, RIE_TRUE}
|
Definition at line 729 of file radioeng.c.
References RIE_FALSE, RIE_Success, RIE_TRUE, and RIE_UnsupportedRadioConfig.
RIE_Responses RadioPayldManchesterEncode | ( | RIE_BOOL | bEnable | ) |
Enable or Disable Manchester Encoding of payload data.
Manchester encoding can be used to ensure a dc-free (zero mean) transmission. A Binary 0 is mapped to 10, and a Binary 1 is mapped to 01. Manchester encoding and decoding are applied to the payload data and the CRC.
bEnable | :{RIE_FALSE,RIE_TRUE}
|
Definition at line 670 of file radioeng.c.
References RIE_FALSE, RIE_Success, RIE_TRUE, and RIE_UnsupportedRadioConfig.
RIE_Responses RadioPowerOff | ( | void | ) |
Shutdown the radio and place it in its lowest power sleep mode.
Definition at line 521 of file radioeng.c.
References RIE_Success.
Referenced by RadioInit().
RIE_Responses RadioRadioGetRSSI | ( | RIE_S8 * | pRSSIdBm | ) |
Return a Received Signal Strength Indicator value.
pRSSIdBm | :{} detected RSSI in dBm. |
Definition at line 1692 of file radioeng.c.
References RIE_Success.
RIE_Responses RadioRxBERTestMode | ( | void | ) |
Enter receiver Bit Error Rate (BER) test mode where the clock and data appear on GPIO pins.
Clock on P0.6 and Data on P2.6
Definition at line 1185 of file radioeng.c.
References RIE_Success, and RIE_TRUE.
RIE_BOOL RadioRxPacketAvailable | ( | void | ) |
Checks if a packet has been received.
Definition at line 1092 of file radioeng.c.
Referenced by RadioRxPacketRead().
RIE_Responses RadioRxPacketFixedLen | ( | RIE_U8 | Len | ) |
Enter receive mode and wait for a packet to be received.
Radio will stay in Receive Mode until 1) A packet is received. 2) User manually exits Receive Mode with a call to RadioTerminateRadioOp()
Len | :{1-240} Fixed Length of packet to be received. |
Definition at line 1017 of file radioeng.c.
References RIE_FALSE, RIE_InvalidParamter, and RIE_Success.
RIE_Responses RadioRxPacketRead | ( | RIE_U8 | BufferLen, |
RIE_U8 * | pPktLen, | ||
RIE_U8 * | pData, | ||
RIE_S8 * | pRSSIdBm | ||
) |
Read the packet that was received by the radio.
BufferLen | :{1-240} Size of passed in buffer |
pPktLen | :{1-240} Storage for size of actual received packet |
pData | :{} Received Packet will be stored here. |
pRSSIdBm | :{} RSSI of received packet in dBm. |
Definition at line 1125 of file radioeng.c.
References RadioRxPacketAvailable(), and RIE_Success.
RIE_Responses RadioRxPacketVariableLen | ( | void | ) |
Enter receive mode and wait for a packet to be received.
Radio will stay in Receive Mode until 1) A packet is received. 2) User manually exits Receive Mode with a call to RadioTerminateRadioOp()
Definition at line 1050 of file radioeng.c.
References RIE_FALSE, and RIE_Success.
RIE_Responses RadioSetFrequency | ( | RIE_U32 | Frequency | ) |
Set frequency for radio communications.
Frequency | :{431000000-928000000}
|
Definition at line 574 of file radioeng.c.
References RIE_Success, and RIE_TRUE.
RIE_Responses RadioSetModulationType | ( | RIE_ModulationTypes | ModulationType | ) |
Set the Radio Transmitter Modulation Type.
Can be FSK_Modulation or GFSK_Modulation.
ModulationType | :{DR_1_0kbps_Dev10_0kHz , DR_38_4kbps_Dev20kHz ,DR_300_0kbps_Dev75_0kHz }
|
Definition at line 612 of file radioeng.c.
References FSK_Modulation, GFSK_Modulation, RIE_Success, RIE_TRUE, and RIE_UnsupportedRadioConfig.
RIE_Responses RadioSwitchConfig | ( | RIE_BaseConfigs | BaseConfig | ) |
Change the Radio to using specified configuration.
BaseConfig | :{DR_1_0kbps_Dev10_0kHz, DR_38_4kbps_Dev20kHz, DR_300_0kbps_Dev75_0kHz}
|
Definition at line 369 of file radioeng.c.
References RIE_Success.
RIE_Responses RadioTerminateRadioOp | ( | void | ) |
Terminate a currently running radio RX or TX operation.
Definition at line 551 of file radioeng.c.
References RIE_Success.
RIE_Responses RadioTxCarrier | ( | void | ) |
Transmit a carrier tone using the current radio configuration.
Definition at line 959 of file radioeng.c.
References RIE_Success, and RIE_TRUE.
RIE_BOOL RadioTxPacketComplete | ( | void | ) |
Checks if a packet has finished transmitting.
Definition at line 858 of file radioeng.c.
RIE_Responses RadioTxPacketFixedLen | ( | RIE_U8 | Len, |
RIE_U8 * | pData | ||
) |
Transmit a fixed length packet.
Len | :{1-240} Length of packet to be transmitted. |
pData | :{} Data bytes to be transmitted. |
Definition at line 772 of file radioeng.c.
References RIE_FALSE, RIE_InvalidParamter, and RIE_Success.
RIE_Responses RadioTxPacketVariableLen | ( | RIE_U8 | Len, |
RIE_U8 * | pData | ||
) |
Transmit a Variable length packet.
Len | :{1-240} Length of packet to be transmitted. |
pData | :{} Data bytes to be transmitted. |
Definition at line 813 of file radioeng.c.
References RIE_FALSE, RIE_InvalidParamter, and RIE_Success.
RIE_Responses RadioTxPreamble | ( | void | ) |
Transmit a pre-amble (alternating ones and zeros) using the current radio configuration.
Definition at line 987 of file radioeng.c.
References RIE_Success, and RIE_TRUE.
RIE_Responses RadioTxSetPA | ( | RIE_PATypes | PAType, |
RIE_PAPowerLevel | Power | ||
) |
Set PA Type and the Transmit Power Level for Radio Transmission.
PAType | :{DifferentialPA, SingleEndedPA} Select Single Ended or Differential PA Type |
Power | :{PowerLevel0 ,PowerLevel1 ,PowerLevel2 ,PowerLevel3, PowerLevel4 ,PowerLevel5 ,PowerLevel6 ,PowerLevel7, PowerLevel8 ,PowerLevel9 ,PowerLevel10,PowerLevel11, PowerLevel12,PowerLevel13,PowerLevel14,PowerLevel15} |
Definition at line 879 of file radioeng.c.
References DifferentialPA, RIE_Success, RIE_TRUE, RIE_UnsupportedRadioConfig, and SingleEndedPA.
RIE_Responses RadioTxSetPower | ( | RIE_PAPowerLevel | Power | ) |
Set the Transmit Power Level for Radio Transmission.
Power | :{PowerLevel0 ,PowerLevel1 ,PowerLevel2 ,PowerLevel3, PowerLevel4 ,PowerLevel5 ,PowerLevel6 ,PowerLevel7, PowerLevel8 ,PowerLevel9 ,PowerLevel10,PowerLevel11, PowerLevel12,PowerLevel13,PowerLevel14,PowerLevel15} |
Definition at line 1727 of file radioeng.c.
References RIE_Success, and RIE_UnsupportedRadioConfig.