NXP / Mbed 2 deprecated mcr20_wireless_uart

Dependencies:   fsl_phy_mcr20a fsl_smac mbed-rtos mbed

Fork of mcr20_wireless_uart by Freescale

By default, the application uses broadcast addresses for OTA communication. This way, the application can be directly downloaded and run without any user intervention. The following use case assumes no changes have been done to the project.

  • Two (or more) MCR20A platforms (plugged into the FRDM-K64F Freescale Freedom Development platform) have to be connected to the PC using the mini/micro-USB cables.
  • The code must be downloaded on the platforms via CMSIS-DAP (or other means).
  • After that, two or more TERM applications must be opened, and the serial ports must be configured with the same baud rate as the one in the project (default baud rate is 115200). Other necessary serial configurations are 8 bit, no parity, and 1 stop bit.
  • To start the setup, each platform must be reset, and one of the (user) push buttons found on the MCR20A platform must be pressed. The user can press any of the non-reset buttons on the FRDM-K64F Freescale Freedom Development platform as well. *This initiates the state machine of the application so user can start.

Documentation

SMAC Demo Applications User Guide

Committer:
FSL\B36402
Date:
Sun Mar 15 00:56:28 2015 -0500
Revision:
15:990a8b5664e1
Integrated PHY version from the official K64F+MCR20A package

Who changed what in which revision?

UserRevisionLine numberNew contents of line
FSL\B36402 15:990a8b5664e1 1 /*!
FSL\B36402 15:990a8b5664e1 2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
FSL\B36402 15:990a8b5664e1 3 * All rights reserved.
FSL\B36402 15:990a8b5664e1 4 *
FSL\B36402 15:990a8b5664e1 5 * \file ASP.h
FSL\B36402 15:990a8b5664e1 6 * This is a header file for the ASP module.
FSL\B36402 15:990a8b5664e1 7 *
FSL\B36402 15:990a8b5664e1 8 * Redistribution and use in source and binary forms, with or without modification,
FSL\B36402 15:990a8b5664e1 9 * are permitted provided that the following conditions are met:
FSL\B36402 15:990a8b5664e1 10 *
FSL\B36402 15:990a8b5664e1 11 * o Redistributions of source code must retain the above copyright notice, this list
FSL\B36402 15:990a8b5664e1 12 * of conditions and the following disclaimer.
FSL\B36402 15:990a8b5664e1 13 *
FSL\B36402 15:990a8b5664e1 14 * o Redistributions in binary form must reproduce the above copyright notice, this
FSL\B36402 15:990a8b5664e1 15 * list of conditions and the following disclaimer in the documentation and/or
FSL\B36402 15:990a8b5664e1 16 * other materials provided with the distribution.
FSL\B36402 15:990a8b5664e1 17 *
FSL\B36402 15:990a8b5664e1 18 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
FSL\B36402 15:990a8b5664e1 19 * contributors may be used to endorse or promote products derived from this
FSL\B36402 15:990a8b5664e1 20 * software without specific prior written permission.
FSL\B36402 15:990a8b5664e1 21 *
FSL\B36402 15:990a8b5664e1 22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
FSL\B36402 15:990a8b5664e1 23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
FSL\B36402 15:990a8b5664e1 24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
FSL\B36402 15:990a8b5664e1 25 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
FSL\B36402 15:990a8b5664e1 26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
FSL\B36402 15:990a8b5664e1 27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
FSL\B36402 15:990a8b5664e1 28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
FSL\B36402 15:990a8b5664e1 29 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
FSL\B36402 15:990a8b5664e1 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
FSL\B36402 15:990a8b5664e1 31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FSL\B36402 15:990a8b5664e1 32 */
FSL\B36402 15:990a8b5664e1 33
FSL\B36402 15:990a8b5664e1 34 #ifndef __ASP_H__
FSL\B36402 15:990a8b5664e1 35 #define __ASP_H__
FSL\B36402 15:990a8b5664e1 36
FSL\B36402 15:990a8b5664e1 37 /************************************************************************************
FSL\B36402 15:990a8b5664e1 38 *************************************************************************************
FSL\B36402 15:990a8b5664e1 39 * Include
FSL\B36402 15:990a8b5664e1 40 *************************************************************************************
FSL\B36402 15:990a8b5664e1 41 ************************************************************************************/
FSL\B36402 15:990a8b5664e1 42
FSL\B36402 15:990a8b5664e1 43 #include "EmbeddedTypes.h"
FSL\B36402 15:990a8b5664e1 44 //#include "fsl_os_abstraction.h"
FSL\B36402 15:990a8b5664e1 45 #include "PhyInterface.h"
FSL\B36402 15:990a8b5664e1 46 #include "MpmInterface.h"
FSL\B36402 15:990a8b5664e1 47
FSL\B36402 15:990a8b5664e1 48 /************************************************************************************
FSL\B36402 15:990a8b5664e1 49 *************************************************************************************
FSL\B36402 15:990a8b5664e1 50 * Public macros
FSL\B36402 15:990a8b5664e1 51 *************************************************************************************
FSL\B36402 15:990a8b5664e1 52 ************************************************************************************/
FSL\B36402 15:990a8b5664e1 53 /* Enable/Disable the ASP module */
FSL\B36402 15:990a8b5664e1 54 #ifndef gAspCapability_d
FSL\B36402 15:990a8b5664e1 55 #ifndef gPHY_802_15_4g_d
FSL\B36402 15:990a8b5664e1 56 #define gAspCapability_d (1)
FSL\B36402 15:990a8b5664e1 57 #else
FSL\B36402 15:990a8b5664e1 58 #define gAspCapability_d (0)
FSL\B36402 15:990a8b5664e1 59 #endif // gPHY_802_15_4g_d
FSL\B36402 15:990a8b5664e1 60 #endif // gAspCapability_d
FSL\B36402 15:990a8b5664e1 61
FSL\B36402 15:990a8b5664e1 62 #define gAspInterfaceId (0)
FSL\B36402 15:990a8b5664e1 63
FSL\B36402 15:990a8b5664e1 64 /* Allowed ASP Power Levels */
FSL\B36402 15:990a8b5664e1 65 #define gAspPowerLevel_m40dBm_c (uint8_t)gAspPowerLevel_m40dBm
FSL\B36402 15:990a8b5664e1 66 #define gAspPowerLevel_m38dBm_c (uint8_t)gAspPowerLevel_m38dBm
FSL\B36402 15:990a8b5664e1 67 #define gAspPowerLevel_m36dBm_c (uint8_t)gAspPowerLevel_m36dBm
FSL\B36402 15:990a8b5664e1 68 #define gAspPowerLevel_m34dBm_c (uint8_t)gAspPowerLevel_m34dBm
FSL\B36402 15:990a8b5664e1 69 #define gAspPowerLevel_m32dBm_c (uint8_t)gAspPowerLevel_m32dBm
FSL\B36402 15:990a8b5664e1 70 #define gAspPowerLevel_m30dBm_c (uint8_t)gAspPowerLevel_m30dBm
FSL\B36402 15:990a8b5664e1 71 #define gAspPowerLevel_m28dBm_c (uint8_t)gAspPowerLevel_m28dBm
FSL\B36402 15:990a8b5664e1 72 #define gAspPowerLevel_m26dBm_c (uint8_t)gAspPowerLevel_m26dBm
FSL\B36402 15:990a8b5664e1 73 #define gAspPowerLevel_m24dBm_c (uint8_t)gAspPowerLevel_m24dBm
FSL\B36402 15:990a8b5664e1 74 #define gAspPowerLevel_m22dBm_c (uint8_t)gAspPowerLevel_m22dBm
FSL\B36402 15:990a8b5664e1 75 #define gAspPowerLevel_m20dBm_c (uint8_t)gAspPowerLevel_m20dBm
FSL\B36402 15:990a8b5664e1 76 #define gAspPowerLevel_m18dBm_c (uint8_t)gAspPowerLevel_m18dBm
FSL\B36402 15:990a8b5664e1 77 #define gAspPowerLevel_m16dBm_c (uint8_t)gAspPowerLevel_m16dBm
FSL\B36402 15:990a8b5664e1 78 #define gAspPowerLevel_m14dBm_c (uint8_t)gAspPowerLevel_m14dBm
FSL\B36402 15:990a8b5664e1 79 #define gAspPowerLevel_m12dBm_c (uint8_t)gAspPowerLevel_m12dBm
FSL\B36402 15:990a8b5664e1 80 #define gAspPowerLevel_m10dBm_c (uint8_t)gAspPowerLevel_m10dBm
FSL\B36402 15:990a8b5664e1 81 #define gAspPowerLevel_m8dBm_c (uint8_t)gAspPowerLevel_m8dBm
FSL\B36402 15:990a8b5664e1 82 #define gAspPowerLevel_m6dBm_c (uint8_t)gAspPowerLevel_m6dBm
FSL\B36402 15:990a8b5664e1 83 #define gAspPowerLevel_m4dBm_c (uint8_t)gAspPowerLevel_m4dBm
FSL\B36402 15:990a8b5664e1 84 #define gAspPowerLevel_m2dBm_c (uint8_t)gAspPowerLevel_m2dBm
FSL\B36402 15:990a8b5664e1 85 #define gAspPowerLevel_0dBm_c (uint8_t)gAspPowerLevel_0dBm
FSL\B36402 15:990a8b5664e1 86 #define gAspPowerLevel_2dBm_c (uint8_t)gAspPowerLevel_2dBm
FSL\B36402 15:990a8b5664e1 87 #define gAspPowerLevel_4dBm_c (uint8_t)gAspPowerLevel_4dBm
FSL\B36402 15:990a8b5664e1 88 #define gAspPowerLevel_6dBm_c (uint8_t)gAspPowerLevel_6dBm
FSL\B36402 15:990a8b5664e1 89 #define gAspPowerLevel_8dBm_c (uint8_t)gAspPowerLevel_8dBm
FSL\B36402 15:990a8b5664e1 90 #define gAspPowerLevel_10dBm_c (uint8_t)gAspPowerLevel_10dBm
FSL\B36402 15:990a8b5664e1 91 #define gAspPowerLevel_12dBm_c (uint8_t)gAspPowerLevel_12dBm
FSL\B36402 15:990a8b5664e1 92 #define gAspPowerLevel_14dBm_c (uint8_t)gAspPowerLevel_14dBm
FSL\B36402 15:990a8b5664e1 93 #define gAspPowerLevel_16dBm_c (uint8_t)gAspPowerLevel_16dBm
FSL\B36402 15:990a8b5664e1 94
FSL\B36402 15:990a8b5664e1 95 /* OpGroup codes used with FSCI */
FSL\B36402 15:990a8b5664e1 96 #define gFSCI_AspAppOpcodeGroup_c 0x94 /* ASP_APP_SapHandler */
FSL\B36402 15:990a8b5664e1 97 #define gFSCI_AppAspOpcodeGroup_c 0x95 /* APP_ASP_SapHandler */
FSL\B36402 15:990a8b5664e1 98
FSL\B36402 15:990a8b5664e1 99 /************************************************************************************
FSL\B36402 15:990a8b5664e1 100 *************************************************************************************
FSL\B36402 15:990a8b5664e1 101 * Public type definitions
FSL\B36402 15:990a8b5664e1 102 *************************************************************************************
FSL\B36402 15:990a8b5664e1 103 ************************************************************************************/
FSL\B36402 15:990a8b5664e1 104 /* ASP status messages */
FSL\B36402 15:990a8b5664e1 105 typedef enum{
FSL\B36402 15:990a8b5664e1 106 gAspSuccess_c = 0x00,
FSL\B36402 15:990a8b5664e1 107 gAspInvalidRequest_c = 0xC2,
FSL\B36402 15:990a8b5664e1 108 gAspDenied_c = 0xE2,
FSL\B36402 15:990a8b5664e1 109 gAspTooLong_c = 0xE5,
FSL\B36402 15:990a8b5664e1 110 gAspInvalidParameter_c = 0xE8
FSL\B36402 15:990a8b5664e1 111 }AspStatus_t;
FSL\B36402 15:990a8b5664e1 112
FSL\B36402 15:990a8b5664e1 113 /* Supported Power Levels */
FSL\B36402 15:990a8b5664e1 114 enum {
FSL\B36402 15:990a8b5664e1 115 gAspPowerLevel_m40dBm = 0x03,
FSL\B36402 15:990a8b5664e1 116 gAspPowerLevel_m38dBm = 0x04,
FSL\B36402 15:990a8b5664e1 117 gAspPowerLevel_m36dBm = 0x05,
FSL\B36402 15:990a8b5664e1 118 gAspPowerLevel_m34dBm = 0x06,
FSL\B36402 15:990a8b5664e1 119 gAspPowerLevel_m32dBm = 0x07,
FSL\B36402 15:990a8b5664e1 120 gAspPowerLevel_m30dBm = 0x08,
FSL\B36402 15:990a8b5664e1 121 gAspPowerLevel_m28dBm = 0x09,
FSL\B36402 15:990a8b5664e1 122 gAspPowerLevel_m26dBm = 0x0A,
FSL\B36402 15:990a8b5664e1 123 gAspPowerLevel_m24dBm = 0x0B,
FSL\B36402 15:990a8b5664e1 124 gAspPowerLevel_m22dBm = 0x0C,
FSL\B36402 15:990a8b5664e1 125 gAspPowerLevel_m20dBm = 0x0D,
FSL\B36402 15:990a8b5664e1 126 gAspPowerLevel_m18dBm = 0x0E,
FSL\B36402 15:990a8b5664e1 127 gAspPowerLevel_m16dBm = 0x0F,
FSL\B36402 15:990a8b5664e1 128 gAspPowerLevel_m14dBm = 0x10,
FSL\B36402 15:990a8b5664e1 129 gAspPowerLevel_m12dBm = 0x11,
FSL\B36402 15:990a8b5664e1 130 gAspPowerLevel_m10dBm = 0x12,
FSL\B36402 15:990a8b5664e1 131 gAspPowerLevel_m8dBm = 0x13,
FSL\B36402 15:990a8b5664e1 132 gAspPowerLevel_m6dBm = 0x14,
FSL\B36402 15:990a8b5664e1 133 gAspPowerLevel_m4dBm = 0x15,
FSL\B36402 15:990a8b5664e1 134 gAspPowerLevel_m2dBm = 0x16,
FSL\B36402 15:990a8b5664e1 135 gAspPowerLevel_0dBm = 0x17,
FSL\B36402 15:990a8b5664e1 136 gAspPowerLevel_2dBm = 0x18,
FSL\B36402 15:990a8b5664e1 137 gAspPowerLevel_4dBm = 0x19,
FSL\B36402 15:990a8b5664e1 138 gAspPowerLevel_6dBm = 0x1A,
FSL\B36402 15:990a8b5664e1 139 gAspPowerLevel_8dBm = 0x1B,
FSL\B36402 15:990a8b5664e1 140 gAspPowerLevel_10dBm = 0x1C,
FSL\B36402 15:990a8b5664e1 141 gAspPowerLevel_12dBm = 0x1D,
FSL\B36402 15:990a8b5664e1 142 gAspPowerLevel_14dBm = 0x1E,
FSL\B36402 15:990a8b5664e1 143 gAspPowerLevel_16dBm = 0x1F
FSL\B36402 15:990a8b5664e1 144 };
FSL\B36402 15:990a8b5664e1 145
FSL\B36402 15:990a8b5664e1 146 /* Radio test modes */
FSL\B36402 15:990a8b5664e1 147 enum {
FSL\B36402 15:990a8b5664e1 148 gTestForceIdle_c = 0,
FSL\B36402 15:990a8b5664e1 149 gTestPulseTxPrbs9_c = 1,
FSL\B36402 15:990a8b5664e1 150 gTestContinuousRx_c = 2,
FSL\B36402 15:990a8b5664e1 151 gTestContinuousTxMod_c = 3,
FSL\B36402 15:990a8b5664e1 152 gTestContinuousTxNoMod_c = 4,
FSL\B36402 15:990a8b5664e1 153 gTestContinuousTx2Mhz_c = 5,
FSL\B36402 15:990a8b5664e1 154 gTestContinuousTx200Khz_c = 6,
FSL\B36402 15:990a8b5664e1 155 gTestContinuousTx1MbpsPRBS9_c = 7,
FSL\B36402 15:990a8b5664e1 156 gTestContinuousTxExternalSrc_c = 8,
FSL\B36402 15:990a8b5664e1 157 gTestContinuousTxNoModZero_c = 9,
FSL\B36402 15:990a8b5664e1 158 gTestContinuousTxNoModOne_c = 10
FSL\B36402 15:990a8b5664e1 159 };
FSL\B36402 15:990a8b5664e1 160
FSL\B36402 15:990a8b5664e1 161 /* This enum matches with the FSCI OpCode used by ASP*/
FSL\B36402 15:990a8b5664e1 162 typedef enum {
FSL\B36402 15:990a8b5664e1 163 aspMsgTypeGetTimeReq_c = 0x00,
FSL\B36402 15:990a8b5664e1 164 aspMsgTypeGetInactiveTimeReq_c = 0x01,
FSL\B36402 15:990a8b5664e1 165 aspMsgTypeGetMacStateReq_c = 0x02,
FSL\B36402 15:990a8b5664e1 166 aspMsgTypeDozeReq_c = 0x03,
FSL\B36402 15:990a8b5664e1 167 aspMsgTypeAutoDozeReq_c = 0x04,
FSL\B36402 15:990a8b5664e1 168 aspMsgTypeAcomaReq_c = 0x05,
FSL\B36402 15:990a8b5664e1 169 aspMsgTypeHibernateReq_c = 0x06,
FSL\B36402 15:990a8b5664e1 170 aspMsgTypeWakeReq_c = 0x07,
FSL\B36402 15:990a8b5664e1 171 aspMsgTypeEventReq_c = 0x08,
FSL\B36402 15:990a8b5664e1 172 aspMsgTypeClkoReq_c = 0x09,
FSL\B36402 15:990a8b5664e1 173 aspMsgTypeTrimReq_c = 0x0A,
FSL\B36402 15:990a8b5664e1 174 aspMsgTypeDdrReq_c = 0x0B,
FSL\B36402 15:990a8b5664e1 175 aspMsgTypePortReq_c = 0x0C,
FSL\B36402 15:990a8b5664e1 176 aspMsgTypeSetMinDozeTimeReq_c = 0x0D,
FSL\B36402 15:990a8b5664e1 177 aspMsgTypeSetNotifyReq_c = 0x0E,
FSL\B36402 15:990a8b5664e1 178 aspMsgTypeSetPowerLevel_c = 0x0F,
FSL\B36402 15:990a8b5664e1 179 aspMsgTypeGetPowerLevel_c = 0x1F,
FSL\B36402 15:990a8b5664e1 180 aspMsgTypeTelecTest_c = 0x10,
FSL\B36402 15:990a8b5664e1 181 aspMsgTypeTelecSetFreq_c = 0x11,
FSL\B36402 15:990a8b5664e1 182 aspMsgTypeGetInactiveTimeCnf_c = 0x12,
FSL\B36402 15:990a8b5664e1 183 aspMsgTypeGetMacStateCnf_c = 0x13,
FSL\B36402 15:990a8b5664e1 184 aspMsgTypeDozeCnf_c = 0x14,
FSL\B36402 15:990a8b5664e1 185 aspMsgTypeAutoDozeCnf_c = 0x15,
FSL\B36402 15:990a8b5664e1 186 aspMsgTypeTelecSendRawData_c = 0x16,
FSL\B36402 15:990a8b5664e1 187 aspMsgTypeSetFADState_c = 0x17,
FSL\B36402 15:990a8b5664e1 188 aspMsgTypeSetFADThreshold_c = 0x18,
FSL\B36402 15:990a8b5664e1 189 aspMsgTypeGetFADThreshold_c = 0x19,
FSL\B36402 15:990a8b5664e1 190 aspMsgTypeGetFADState_c = 0x1A,
FSL\B36402 15:990a8b5664e1 191 aspMsgTypeSetActivePromState_c = 0x1B,
FSL\B36402 15:990a8b5664e1 192 aspMsgTypeXcvrWriteReq_c = 0x1C,
FSL\B36402 15:990a8b5664e1 193 aspMsgTypeXcvrReadReq_c = 0x1D,
FSL\B36402 15:990a8b5664e1 194 aspMsgTypeSetANTXState_c = 0x20,
FSL\B36402 15:990a8b5664e1 195 aspMsgTypeGetANTXState_c = 0x21,
FSL\B36402 15:990a8b5664e1 196 aspMsgTypeSetLQIMode_c = 0x22,
FSL\B36402 15:990a8b5664e1 197 aspMsgTypeGetRSSILevel_c = 0x23,
FSL\B36402 15:990a8b5664e1 198 aspMsgTypeSetMpmConfig_c = 0x24,
FSL\B36402 15:990a8b5664e1 199 aspMsgTypeGetMpmConfig_c = 0x25
FSL\B36402 15:990a8b5664e1 200 }AppAspMsgType_t;
FSL\B36402 15:990a8b5664e1 201
FSL\B36402 15:990a8b5664e1 202 typedef PACKED_STRUCT aspEventReq_tag
FSL\B36402 15:990a8b5664e1 203 { /* AspEvent.Request */
FSL\B36402 15:990a8b5664e1 204 uint32_t eventTime;
FSL\B36402 15:990a8b5664e1 205 } aspEventReq_t;
FSL\B36402 15:990a8b5664e1 206
FSL\B36402 15:990a8b5664e1 207 typedef PACKED_STRUCT aspGetTimeReq_tag
FSL\B36402 15:990a8b5664e1 208 { /* AspGetTime.Request */
FSL\B36402 15:990a8b5664e1 209 uint32_t time;
FSL\B36402 15:990a8b5664e1 210 } aspGetTimeReq_t;
FSL\B36402 15:990a8b5664e1 211
FSL\B36402 15:990a8b5664e1 212 typedef PACKED_STRUCT aspSetNotifyReq_tag
FSL\B36402 15:990a8b5664e1 213 { /* AspSetNotify.Request */
FSL\B36402 15:990a8b5664e1 214 uint8_t notifications;
FSL\B36402 15:990a8b5664e1 215 } aspSetNotifyReq_t;
FSL\B36402 15:990a8b5664e1 216
FSL\B36402 15:990a8b5664e1 217
FSL\B36402 15:990a8b5664e1 218 typedef PACKED_STRUCT aspSetPowerLevelReq_tag
FSL\B36402 15:990a8b5664e1 219 { /* AspSetPowerLevel.Request */
FSL\B36402 15:990a8b5664e1 220 uint8_t powerLevel;
FSL\B36402 15:990a8b5664e1 221 } aspSetPowerLevelReq_t;
FSL\B36402 15:990a8b5664e1 222
FSL\B36402 15:990a8b5664e1 223
FSL\B36402 15:990a8b5664e1 224 typedef PACKED_STRUCT aspGetPowerLevelReq_tag
FSL\B36402 15:990a8b5664e1 225 { /* AspGetPowerLevel.Request */
FSL\B36402 15:990a8b5664e1 226 uint8_t powerLevel;
FSL\B36402 15:990a8b5664e1 227 } aspGetPowerLevelReq_t;
FSL\B36402 15:990a8b5664e1 228
FSL\B36402 15:990a8b5664e1 229
FSL\B36402 15:990a8b5664e1 230 typedef PACKED_STRUCT aspTelecTest_tag
FSL\B36402 15:990a8b5664e1 231 { /* AspTelecTest.Request */
FSL\B36402 15:990a8b5664e1 232 uint8_t mode;
FSL\B36402 15:990a8b5664e1 233 } aspTelecTest_t;
FSL\B36402 15:990a8b5664e1 234
FSL\B36402 15:990a8b5664e1 235
FSL\B36402 15:990a8b5664e1 236 typedef PACKED_STRUCT aspTelecsetFreq_tag
FSL\B36402 15:990a8b5664e1 237 { /* AspTelecSetFreq.Request */
FSL\B36402 15:990a8b5664e1 238 uint8_t channel;
FSL\B36402 15:990a8b5664e1 239 } aspTelecsetFreq_t;
FSL\B36402 15:990a8b5664e1 240
FSL\B36402 15:990a8b5664e1 241
FSL\B36402 15:990a8b5664e1 242 typedef PACKED_STRUCT aspTelecSendRawData_tag
FSL\B36402 15:990a8b5664e1 243 { /* AspTelecSendRawData.Request */
FSL\B36402 15:990a8b5664e1 244 uint8_t length;
FSL\B36402 15:990a8b5664e1 245 uint8_t* dataPtr;
FSL\B36402 15:990a8b5664e1 246 } aspTelecSendRawData_t;
FSL\B36402 15:990a8b5664e1 247
FSL\B36402 15:990a8b5664e1 248 /* AspSetFADThreshold.Request */
FSL\B36402 15:990a8b5664e1 249 typedef uint8_t aspFADThreshold_t;
FSL\B36402 15:990a8b5664e1 250 /* AspSetLQIMode.Request */
FSL\B36402 15:990a8b5664e1 251 typedef uint8_t aspLQIMode_t;
FSL\B36402 15:990a8b5664e1 252
FSL\B36402 15:990a8b5664e1 253 typedef PACKED_STRUCT aspXcvrReq_tag
FSL\B36402 15:990a8b5664e1 254 { /* AspXcvrWrite.Request / AspXcvrRead.Request */
FSL\B36402 15:990a8b5664e1 255 uint8_t mode;
FSL\B36402 15:990a8b5664e1 256 uint16_t addr;
FSL\B36402 15:990a8b5664e1 257 uint8_t len;
FSL\B36402 15:990a8b5664e1 258 uint8_t data[4]; /* more than 4 bytes can be read/written */
FSL\B36402 15:990a8b5664e1 259 } aspXcvrReq_t;
FSL\B36402 15:990a8b5664e1 260
FSL\B36402 15:990a8b5664e1 261
FSL\B36402 15:990a8b5664e1 262 typedef PACKED_STRUCT AppToAspMessage_tag
FSL\B36402 15:990a8b5664e1 263 {
FSL\B36402 15:990a8b5664e1 264 AppAspMsgType_t msgType;
FSL\B36402 15:990a8b5664e1 265 PACKED_UNION
FSL\B36402 15:990a8b5664e1 266 {
FSL\B36402 15:990a8b5664e1 267 aspEventReq_t aspEventReq;
FSL\B36402 15:990a8b5664e1 268 aspGetTimeReq_t aspGetTimeReq;
FSL\B36402 15:990a8b5664e1 269 aspSetPowerLevelReq_t aspSetPowerLevelReq;
FSL\B36402 15:990a8b5664e1 270 aspGetPowerLevelReq_t aspGetPowerLevelReq;
FSL\B36402 15:990a8b5664e1 271 aspTelecTest_t aspTelecTest;
FSL\B36402 15:990a8b5664e1 272 aspTelecsetFreq_t aspTelecsetFreq;
FSL\B36402 15:990a8b5664e1 273 aspTelecSendRawData_t aspTelecSendRawData;
FSL\B36402 15:990a8b5664e1 274 aspFADThreshold_t aspFADThreshold;
FSL\B36402 15:990a8b5664e1 275 bool_t aspFADState;
FSL\B36402 15:990a8b5664e1 276 bool_t aspANTXState;
FSL\B36402 15:990a8b5664e1 277 aspLQIMode_t aspLQIMode;
FSL\B36402 15:990a8b5664e1 278 bool_t aspActivePromState;
FSL\B36402 15:990a8b5664e1 279 aspXcvrReq_t aspXcvrData;
FSL\B36402 15:990a8b5664e1 280 mpmConfig_t MpmConfig;
FSL\B36402 15:990a8b5664e1 281 }msgData;
FSL\B36402 15:990a8b5664e1 282 } AppToAspMessage_t;
FSL\B36402 15:990a8b5664e1 283
FSL\B36402 15:990a8b5664e1 284 #ifdef __cplusplus
FSL\B36402 15:990a8b5664e1 285 extern "C" {
FSL\B36402 15:990a8b5664e1 286 #endif
FSL\B36402 15:990a8b5664e1 287
FSL\B36402 15:990a8b5664e1 288 /************************************************************************************
FSL\B36402 15:990a8b5664e1 289 *************************************************************************************
FSL\B36402 15:990a8b5664e1 290 * Public memory declarations
FSL\B36402 15:990a8b5664e1 291 *************************************************************************************
FSL\B36402 15:990a8b5664e1 292 ************************************************************************************/
FSL\B36402 15:990a8b5664e1 293
FSL\B36402 15:990a8b5664e1 294 /************************************************************************************
FSL\B36402 15:990a8b5664e1 295 *************************************************************************************
FSL\B36402 15:990a8b5664e1 296 * Public functions
FSL\B36402 15:990a8b5664e1 297 *************************************************************************************
FSL\B36402 15:990a8b5664e1 298 ************************************************************************************/
FSL\B36402 15:990a8b5664e1 299 #if gAspCapability_d
FSL\B36402 15:990a8b5664e1 300
FSL\B36402 15:990a8b5664e1 301 void ASP_Init( instanceId_t phyInstance, uint8_t interfaceId );
FSL\B36402 15:990a8b5664e1 302
FSL\B36402 15:990a8b5664e1 303 AspStatus_t APP_ASP_SapHandler(AppToAspMessage_t *pMsg, instanceId_t instanceId);
FSL\B36402 15:990a8b5664e1 304
FSL\B36402 15:990a8b5664e1 305 void Asp_GetTimeReq(uint32_t *time);
FSL\B36402 15:990a8b5664e1 306
FSL\B36402 15:990a8b5664e1 307 AspStatus_t Asp_XcvrWriteReq (uint8_t mode, uint16_t addr, uint8_t len, uint8_t* pData);
FSL\B36402 15:990a8b5664e1 308 AspStatus_t Asp_XcvrReadReq (uint8_t mode, uint16_t addr, uint8_t len, uint8_t* pData);
FSL\B36402 15:990a8b5664e1 309
FSL\B36402 15:990a8b5664e1 310 AspStatus_t Asp_SetPowerLevel(uint8_t powerLevel);
FSL\B36402 15:990a8b5664e1 311 uint8_t Asp_GetPowerLevel(void);
FSL\B36402 15:990a8b5664e1 312
FSL\B36402 15:990a8b5664e1 313 AspStatus_t Asp_SetActivePromState(bool_t state);
FSL\B36402 15:990a8b5664e1 314
FSL\B36402 15:990a8b5664e1 315 AspStatus_t Asp_SetFADState(bool_t state);
FSL\B36402 15:990a8b5664e1 316 AspStatus_t Asp_SetFADThreshold(uint8_t thresholdFAD);
FSL\B36402 15:990a8b5664e1 317
FSL\B36402 15:990a8b5664e1 318 AspStatus_t Asp_SetANTXState(bool_t state);
FSL\B36402 15:990a8b5664e1 319 uint8_t Asp_GetANTXState(void);
FSL\B36402 15:990a8b5664e1 320 uint8_t Asp_SetANTPadStateRequest(bool_t antAB_on, bool_t rxtxSwitch_on);
FSL\B36402 15:990a8b5664e1 321 uint8_t Asp_SetANTPadStrengthRequest(bool_t hiStrength);
FSL\B36402 15:990a8b5664e1 322 uint8_t Asp_SetANTPadInvertedRequest(bool_t invAntA, bool_t invAntB, bool_t invTx, bool_t invRx);
FSL\B36402 15:990a8b5664e1 323
FSL\B36402 15:990a8b5664e1 324 AspStatus_t Asp_SetLQIMode(bool_t mode);
FSL\B36402 15:990a8b5664e1 325 uint8_t Asp_GetRSSILevel(void);
FSL\B36402 15:990a8b5664e1 326
FSL\B36402 15:990a8b5664e1 327 AspStatus_t ASP_TelecSetFreq (uint8_t channel);
FSL\B36402 15:990a8b5664e1 328 AspStatus_t ASP_TelecSendRawData(uint8_t* dataPtr);
FSL\B36402 15:990a8b5664e1 329 AspStatus_t ASP_TelecTest (uint8_t mode);
FSL\B36402 15:990a8b5664e1 330
FSL\B36402 15:990a8b5664e1 331 #else /* gAspCapability_d */
FSL\B36402 15:990a8b5664e1 332
FSL\B36402 15:990a8b5664e1 333 #define ASP_Init(phyInstance,interfaceId)
FSL\B36402 15:990a8b5664e1 334 #define Asp_GetTimeReq(time)
FSL\B36402 15:990a8b5664e1 335
FSL\B36402 15:990a8b5664e1 336 #define APP_ASP_SapHandler(pMsg) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 337 #define Asp_XcvrWriteReq(mode, addr, len, pData) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 338 #define Asp_XcvrReadReq(mode, addr, len, pData) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 339 #define Asp_SetPowerLevel(powerLevel) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 340 #define Asp_SetActivePromState(state) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 341 #define Asp_SetFADState(state) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 342 #define Asp_SetFADThreshold(thresholdFAD) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 343 #define Asp_SetANTXState(state) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 344 #define Asp_SetLQIMode(mode) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 345 #define ASP_TelecSetFreq(channel) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 346 #define ASP_TelecSendRawData(dataPtr) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 347 #define ASP_TelecTest(mode) (gAspDenied_c)
FSL\B36402 15:990a8b5664e1 348
FSL\B36402 15:990a8b5664e1 349 #define Asp_GetPowerLevel() (0)
FSL\B36402 15:990a8b5664e1 350 #define Asp_GetANTXState() (0)
FSL\B36402 15:990a8b5664e1 351 #define Asp_GetRSSILevel() (0)
FSL\B36402 15:990a8b5664e1 352 #endif /* gAspCapability_d */
FSL\B36402 15:990a8b5664e1 353
FSL\B36402 15:990a8b5664e1 354 #ifdef __cplusplus
FSL\B36402 15:990a8b5664e1 355 }
FSL\B36402 15:990a8b5664e1 356 #endif
FSL\B36402 15:990a8b5664e1 357
FSL\B36402 15:990a8b5664e1 358 #endif /*__ASP_H__ */