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:
cotigac
Date:
Fri Apr 03 05:23:33 2015 +0000
Revision:
18:b02fc0e53df8
Started creating wireless uart demo based on mbed-rtos

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cotigac 18:b02fc0e53df8 1 /*!
cotigac 18:b02fc0e53df8 2 * Copyright (c) 2015, Freescale Semiconductor, Inc.
cotigac 18:b02fc0e53df8 3 * All rights reserved.
cotigac 18:b02fc0e53df8 4 *
cotigac 18:b02fc0e53df8 5 * \file PhyInterface.h
cotigac 18:b02fc0e53df8 6 *
cotigac 18:b02fc0e53df8 7 * Redistribution and use in source and binary forms, with or without modification,
cotigac 18:b02fc0e53df8 8 * are permitted provided that the following conditions are met:
cotigac 18:b02fc0e53df8 9 *
cotigac 18:b02fc0e53df8 10 * o Redistributions of source code must retain the above copyright notice, this list
cotigac 18:b02fc0e53df8 11 * of conditions and the following disclaimer.
cotigac 18:b02fc0e53df8 12 *
cotigac 18:b02fc0e53df8 13 * o Redistributions in binary form must reproduce the above copyright notice, this
cotigac 18:b02fc0e53df8 14 * list of conditions and the following disclaimer in the documentation and/or
cotigac 18:b02fc0e53df8 15 * other materials provided with the distribution.
cotigac 18:b02fc0e53df8 16 *
cotigac 18:b02fc0e53df8 17 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
cotigac 18:b02fc0e53df8 18 * contributors may be used to endorse or promote products derived from this
cotigac 18:b02fc0e53df8 19 * software without specific prior written permission.
cotigac 18:b02fc0e53df8 20 *
cotigac 18:b02fc0e53df8 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
cotigac 18:b02fc0e53df8 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
cotigac 18:b02fc0e53df8 23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
cotigac 18:b02fc0e53df8 24 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
cotigac 18:b02fc0e53df8 25 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
cotigac 18:b02fc0e53df8 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
cotigac 18:b02fc0e53df8 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
cotigac 18:b02fc0e53df8 28 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
cotigac 18:b02fc0e53df8 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
cotigac 18:b02fc0e53df8 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cotigac 18:b02fc0e53df8 31 */
cotigac 18:b02fc0e53df8 32
cotigac 18:b02fc0e53df8 33 #ifndef _PHY_INTERFACE_H
cotigac 18:b02fc0e53df8 34 #define _PHY_INTERFACE_H
cotigac 18:b02fc0e53df8 35
cotigac 18:b02fc0e53df8 36
cotigac 18:b02fc0e53df8 37 /************************************************************************************
cotigac 18:b02fc0e53df8 38 *************************************************************************************
cotigac 18:b02fc0e53df8 39 * Include
cotigac 18:b02fc0e53df8 40 *************************************************************************************
cotigac 18:b02fc0e53df8 41 ************************************************************************************/
cotigac 18:b02fc0e53df8 42
cotigac 18:b02fc0e53df8 43 #include "PhyTypes.h"
cotigac 18:b02fc0e53df8 44 //#include "Messaging.h"
cotigac 18:b02fc0e53df8 45 #include "PhyConfig.h"
cotigac 18:b02fc0e53df8 46
cotigac 18:b02fc0e53df8 47 /************************************************************************************
cotigac 18:b02fc0e53df8 48 *************************************************************************************
cotigac 18:b02fc0e53df8 49 * Public macros
cotigac 18:b02fc0e53df8 50 *************************************************************************************
cotigac 18:b02fc0e53df8 51 ************************************************************************************/
cotigac 18:b02fc0e53df8 52
cotigac 18:b02fc0e53df8 53 /* Constants */
cotigac 18:b02fc0e53df8 54 #ifndef gMaxPhyTimers_c
cotigac 18:b02fc0e53df8 55 #define gMaxPhyTimers_c (5)
cotigac 18:b02fc0e53df8 56 #endif
cotigac 18:b02fc0e53df8 57
cotigac 18:b02fc0e53df8 58 #ifdef gPHY_802_15_4g_d
cotigac 18:b02fc0e53df8 59 #define gPhySeqStartAsap_c (0xFFFFFFFFFFFFFFFF)
cotigac 18:b02fc0e53df8 60 #else
cotigac 18:b02fc0e53df8 61 #define gPhySeqStartAsap_c (0xFFFFFFFF)
cotigac 18:b02fc0e53df8 62 #endif
cotigac 18:b02fc0e53df8 63
cotigac 18:b02fc0e53df8 64 /* XCVR active/idle power modes */
cotigac 18:b02fc0e53df8 65 #define gPhyDefaultActivePwrMode_c gPhyPwrAutodoze_c /* Do not change! */
cotigac 18:b02fc0e53df8 66 #define gPhyDefaultIdlePwrMode_c gPhyPwrAutodoze_c
cotigac 18:b02fc0e53df8 67
cotigac 18:b02fc0e53df8 68 /************************************************************************************
cotigac 18:b02fc0e53df8 69 *************************************************************************************
cotigac 18:b02fc0e53df8 70 * Public prototypes
cotigac 18:b02fc0e53df8 71 *************************************************************************************
cotigac 18:b02fc0e53df8 72 ************************************************************************************/
cotigac 18:b02fc0e53df8 73
cotigac 18:b02fc0e53df8 74 /************************************************************************************
cotigac 18:b02fc0e53df8 75 *************************************************************************************
cotigac 18:b02fc0e53df8 76 * Public type definitions
cotigac 18:b02fc0e53df8 77 *************************************************************************************
cotigac 18:b02fc0e53df8 78 ************************************************************************************/
cotigac 18:b02fc0e53df8 79
cotigac 18:b02fc0e53df8 80 typedef enum
cotigac 18:b02fc0e53df8 81 {
cotigac 18:b02fc0e53df8 82 #include "PhyMessages.h"
cotigac 18:b02fc0e53df8 83 }phyMessageId_t;
cotigac 18:b02fc0e53df8 84
cotigac 18:b02fc0e53df8 85 typedef enum{
cotigac 18:b02fc0e53df8 86 gPhyPwrIdle_c,
cotigac 18:b02fc0e53df8 87 gPhyPwrAutodoze_c,
cotigac 18:b02fc0e53df8 88 gPhyPwrDoze_c,
cotigac 18:b02fc0e53df8 89 gPhyPwrHibernate_c,
cotigac 18:b02fc0e53df8 90 gPhyPwrReset_c
cotigac 18:b02fc0e53df8 91 }phyPwrMode_t;
cotigac 18:b02fc0e53df8 92
cotigac 18:b02fc0e53df8 93 typedef struct pdDataReq_tag
cotigac 18:b02fc0e53df8 94 {
cotigac 18:b02fc0e53df8 95 phyTime_t startTime; // absolute
cotigac 18:b02fc0e53df8 96 uint32_t txDuration; // relative
cotigac 18:b02fc0e53df8 97 phySlottedMode_t slottedTx;
cotigac 18:b02fc0e53df8 98 phyCCAType_t CCABeforeTx;
cotigac 18:b02fc0e53df8 99 phyAckRequired_t ackRequired;
cotigac 18:b02fc0e53df8 100 uint8_t psduLength;
cotigac 18:b02fc0e53df8 101 #ifdef gPHY_802_15_4g_d
cotigac 18:b02fc0e53df8 102 phyPHR_t phyHeader;
cotigac 18:b02fc0e53df8 103 uint8_t macDataIndex;
cotigac 18:b02fc0e53df8 104 uint8_t fillFifoBlockLength;
cotigac 18:b02fc0e53df8 105 #endif // gPHY_802_15_4g_d
cotigac 18:b02fc0e53df8 106 uint8_t * pPsdu;
cotigac 18:b02fc0e53df8 107 } pdDataReq_t;
cotigac 18:b02fc0e53df8 108
cotigac 18:b02fc0e53df8 109 typedef struct pdDataCnf_tag
cotigac 18:b02fc0e53df8 110 {
cotigac 18:b02fc0e53df8 111 phyStatus_t status;
cotigac 18:b02fc0e53df8 112 } pdDataCnf_t;
cotigac 18:b02fc0e53df8 113
cotigac 18:b02fc0e53df8 114 typedef struct pdDataInd_tag
cotigac 18:b02fc0e53df8 115 {
cotigac 18:b02fc0e53df8 116 phyTimeTimestamp_t timeStamp;
cotigac 18:b02fc0e53df8 117 uint8_t ppduLinkQuality;
cotigac 18:b02fc0e53df8 118 uint8_t psduLength;
cotigac 18:b02fc0e53df8 119 uint8_t * pPsdu;
cotigac 18:b02fc0e53df8 120 #ifdef gPHY_802_15_4g_d
cotigac 18:b02fc0e53df8 121 uint32_t crcValue;
cotigac 18:b02fc0e53df8 122 bool_t crcValid;
cotigac 18:b02fc0e53df8 123 #endif
cotigac 18:b02fc0e53df8 124 } pdDataInd_t;
cotigac 18:b02fc0e53df8 125
cotigac 18:b02fc0e53df8 126 typedef struct pdIndQueueInsertReq_tag
cotigac 18:b02fc0e53df8 127 {
cotigac 18:b02fc0e53df8 128 uint8_t index;
cotigac 18:b02fc0e53df8 129 uint16_t checksum;
cotigac 18:b02fc0e53df8 130 } pdIndQueueInsertReq_t;
cotigac 18:b02fc0e53df8 131
cotigac 18:b02fc0e53df8 132 typedef struct pdIndQueueInsertCnf_tag
cotigac 18:b02fc0e53df8 133 {
cotigac 18:b02fc0e53df8 134 phyStatus_t status;
cotigac 18:b02fc0e53df8 135 } pdIndQueueInsertCnf_t;
cotigac 18:b02fc0e53df8 136
cotigac 18:b02fc0e53df8 137 typedef struct pdIndQueueRemoveReq_tag
cotigac 18:b02fc0e53df8 138 {
cotigac 18:b02fc0e53df8 139 uint8_t index;
cotigac 18:b02fc0e53df8 140 } pdIndQueueRemoveReq_t;
cotigac 18:b02fc0e53df8 141
cotigac 18:b02fc0e53df8 142 typedef struct plmeEdReq_tag
cotigac 18:b02fc0e53df8 143 {
cotigac 18:b02fc0e53df8 144 phyTime_t startTime; // absolute
cotigac 18:b02fc0e53df8 145 } plmeEdReq_t;
cotigac 18:b02fc0e53df8 146
cotigac 18:b02fc0e53df8 147 typedef struct plmeCcaReq_tag
cotigac 18:b02fc0e53df8 148 {
cotigac 18:b02fc0e53df8 149 phyCCAType_t ccaType;
cotigac 18:b02fc0e53df8 150 phyContCCAMode_t contCcaMode;
cotigac 18:b02fc0e53df8 151 } plmeCcaReq_t;
cotigac 18:b02fc0e53df8 152
cotigac 18:b02fc0e53df8 153 typedef struct plmeCcaCnf_tag
cotigac 18:b02fc0e53df8 154 {
cotigac 18:b02fc0e53df8 155 phyStatus_t status;
cotigac 18:b02fc0e53df8 156 } plmeCcaCnf_t;
cotigac 18:b02fc0e53df8 157
cotigac 18:b02fc0e53df8 158 typedef struct plmeEdCnf_tag
cotigac 18:b02fc0e53df8 159 {
cotigac 18:b02fc0e53df8 160 phyStatus_t status;
cotigac 18:b02fc0e53df8 161 uint8_t energyLevel;
cotigac 18:b02fc0e53df8 162 uint8_t energyLeveldB;
cotigac 18:b02fc0e53df8 163 } plmeEdCnf_t;
cotigac 18:b02fc0e53df8 164
cotigac 18:b02fc0e53df8 165 typedef struct plmeSetTRxStateReq_tag
cotigac 18:b02fc0e53df8 166 {
cotigac 18:b02fc0e53df8 167 phyState_t state;
cotigac 18:b02fc0e53df8 168 phySlottedMode_t slottedMode;
cotigac 18:b02fc0e53df8 169 phyTime_t startTime; // absolute
cotigac 18:b02fc0e53df8 170 uint32_t rxDuration; // relative
cotigac 18:b02fc0e53df8 171 } plmeSetTRxStateReq_t;
cotigac 18:b02fc0e53df8 172
cotigac 18:b02fc0e53df8 173 typedef struct phyTimeEvent_tag
cotigac 18:b02fc0e53df8 174 {
cotigac 18:b02fc0e53df8 175 phyTimeTimestamp_t timestamp; // absolute
cotigac 18:b02fc0e53df8 176 phyTimeCallback_t callback;
cotigac 18:b02fc0e53df8 177 uint32_t parameter;
cotigac 18:b02fc0e53df8 178 }phyTimeEvent_t;
cotigac 18:b02fc0e53df8 179
cotigac 18:b02fc0e53df8 180 typedef struct plmeSetTRxStateCnf_tag
cotigac 18:b02fc0e53df8 181 {
cotigac 18:b02fc0e53df8 182 phyStatus_t status;
cotigac 18:b02fc0e53df8 183 } plmeSetTRxStateCnf_t;
cotigac 18:b02fc0e53df8 184
cotigac 18:b02fc0e53df8 185 typedef struct plmeSetReq_tag
cotigac 18:b02fc0e53df8 186 {
cotigac 18:b02fc0e53df8 187 phyPibId_t PibAttribute;
cotigac 18:b02fc0e53df8 188 uint64_t PibAttributeValue;
cotigac 18:b02fc0e53df8 189 } plmeSetReq_t;
cotigac 18:b02fc0e53df8 190
cotigac 18:b02fc0e53df8 191 typedef struct plmeSetCnf_tag
cotigac 18:b02fc0e53df8 192 {
cotigac 18:b02fc0e53df8 193 phyStatus_t status;
cotigac 18:b02fc0e53df8 194 phyPibId_t PibAttribute;
cotigac 18:b02fc0e53df8 195 } plmeSetCnf_t;
cotigac 18:b02fc0e53df8 196
cotigac 18:b02fc0e53df8 197 typedef struct plmeGetReq_tag
cotigac 18:b02fc0e53df8 198 {
cotigac 18:b02fc0e53df8 199 phyPibId_t PibAttribute;
cotigac 18:b02fc0e53df8 200 uint64_t * pPibAttributeValue;
cotigac 18:b02fc0e53df8 201 } plmeGetReq_t;
cotigac 18:b02fc0e53df8 202
cotigac 18:b02fc0e53df8 203 typedef struct plmeGetCnf_tag
cotigac 18:b02fc0e53df8 204 {
cotigac 18:b02fc0e53df8 205 phyStatus_t status;
cotigac 18:b02fc0e53df8 206 phyPibId_t PibAttribute;
cotigac 18:b02fc0e53df8 207 uint64_t PibAttributeValue;
cotigac 18:b02fc0e53df8 208 } plmeGetCnf_t;
cotigac 18:b02fc0e53df8 209
cotigac 18:b02fc0e53df8 210 typedef struct macToPlmeMessage_tag
cotigac 18:b02fc0e53df8 211 {
cotigac 18:b02fc0e53df8 212 phyMessageId_t msgType;
cotigac 18:b02fc0e53df8 213 uint8_t macInstance;
cotigac 18:b02fc0e53df8 214 union
cotigac 18:b02fc0e53df8 215 {
cotigac 18:b02fc0e53df8 216 plmeEdReq_t edReq;
cotigac 18:b02fc0e53df8 217 plmeCcaReq_t ccaReq;
cotigac 18:b02fc0e53df8 218 plmeSetTRxStateReq_t setTRxStateReq;
cotigac 18:b02fc0e53df8 219 plmeSetReq_t setReq;
cotigac 18:b02fc0e53df8 220 plmeGetReq_t getReq;
cotigac 18:b02fc0e53df8 221 }msgData;
cotigac 18:b02fc0e53df8 222 } macToPlmeMessage_t;
cotigac 18:b02fc0e53df8 223
cotigac 18:b02fc0e53df8 224 typedef struct macToPdDataMessage_tag
cotigac 18:b02fc0e53df8 225 {
cotigac 18:b02fc0e53df8 226 phyMessageId_t msgType;
cotigac 18:b02fc0e53df8 227 uint8_t macInstance;
cotigac 18:b02fc0e53df8 228 union
cotigac 18:b02fc0e53df8 229 {
cotigac 18:b02fc0e53df8 230 pdDataReq_t dataReq;
cotigac 18:b02fc0e53df8 231 pdIndQueueInsertReq_t indQueueInsertReq;
cotigac 18:b02fc0e53df8 232 pdIndQueueRemoveReq_t indQueueRemoveReq;
cotigac 18:b02fc0e53df8 233 }msgData;
cotigac 18:b02fc0e53df8 234 } macToPdDataMessage_t;
cotigac 18:b02fc0e53df8 235
cotigac 18:b02fc0e53df8 236 typedef struct plmeToMacMessage_tag
cotigac 18:b02fc0e53df8 237 {
cotigac 18:b02fc0e53df8 238 phyMessageId_t msgType;
cotigac 18:b02fc0e53df8 239 uint8_t macInstance;
cotigac 18:b02fc0e53df8 240 union
cotigac 18:b02fc0e53df8 241 {
cotigac 18:b02fc0e53df8 242 plmeCcaCnf_t ccaCnf;
cotigac 18:b02fc0e53df8 243 plmeEdCnf_t edCnf;
cotigac 18:b02fc0e53df8 244 plmeSetTRxStateCnf_t setTRxStateCnf;
cotigac 18:b02fc0e53df8 245 plmeSetCnf_t setCnf;
cotigac 18:b02fc0e53df8 246 plmeGetCnf_t getCnf;
cotigac 18:b02fc0e53df8 247 }msgData;
cotigac 18:b02fc0e53df8 248 } plmeToMacMessage_t;
cotigac 18:b02fc0e53df8 249
cotigac 18:b02fc0e53df8 250 typedef struct pdDataToMacMessage_tag
cotigac 18:b02fc0e53df8 251 {
cotigac 18:b02fc0e53df8 252 phyMessageId_t msgType;
cotigac 18:b02fc0e53df8 253 uint8_t macInstance;
cotigac 18:b02fc0e53df8 254 union
cotigac 18:b02fc0e53df8 255 {
cotigac 18:b02fc0e53df8 256 pdDataCnf_t dataCnf;
cotigac 18:b02fc0e53df8 257 pdDataInd_t dataInd;
cotigac 18:b02fc0e53df8 258 pdIndQueueInsertCnf_t indQueueInsertCnf;
cotigac 18:b02fc0e53df8 259 }msgData;
cotigac 18:b02fc0e53df8 260 } pdDataToMacMessage_t;
cotigac 18:b02fc0e53df8 261
cotigac 18:b02fc0e53df8 262 typedef struct phyMessageHeader_tag
cotigac 18:b02fc0e53df8 263 {
cotigac 18:b02fc0e53df8 264 phyMessageId_t msgType;
cotigac 18:b02fc0e53df8 265 uint8_t macInstance;
cotigac 18:b02fc0e53df8 266 } phyMessageHeader_t;
cotigac 18:b02fc0e53df8 267
cotigac 18:b02fc0e53df8 268 typedef struct phyRxParams_tag {
cotigac 18:b02fc0e53df8 269 phyTime_t timeStamp;
cotigac 18:b02fc0e53df8 270 uint8_t psduLength;
cotigac 18:b02fc0e53df8 271 uint8_t linkQuality;
cotigac 18:b02fc0e53df8 272 #ifdef gPHY_802_15_4g_d
cotigac 18:b02fc0e53df8 273 uint8_t headerLength;
cotigac 18:b02fc0e53df8 274 uint8_t macDataIndex;
cotigac 18:b02fc0e53df8 275 uint8_t unfillFifoBlockLength;
cotigac 18:b02fc0e53df8 276 phyPHR_t phyHeader;
cotigac 18:b02fc0e53df8 277 #else
cotigac 18:b02fc0e53df8 278 phySlottedMode_t phyRxMode;
cotigac 18:b02fc0e53df8 279 pdDataToMacMessage_t *pRxData;
cotigac 18:b02fc0e53df8 280 #endif // gPHY_802_15_4g_d
cotigac 18:b02fc0e53df8 281 } phyRxParams_t;
cotigac 18:b02fc0e53df8 282
cotigac 18:b02fc0e53df8 283 typedef struct phyChannelParams_tag {
cotigac 18:b02fc0e53df8 284 union{
cotigac 18:b02fc0e53df8 285 phyStatus_t channelStatus;
cotigac 18:b02fc0e53df8 286 uint8_t energyLeveldB;
cotigac 18:b02fc0e53df8 287 };
cotigac 18:b02fc0e53df8 288 #ifdef gPHY_802_15_4g_d
cotigac 18:b02fc0e53df8 289 uint8_t ccaThreshold;
cotigac 18:b02fc0e53df8 290 uint8_t ccaParam;
cotigac 18:b02fc0e53df8 291 #endif // gPHY_802_15_4g_d
cotigac 18:b02fc0e53df8 292 } phyChannelParams_t;
cotigac 18:b02fc0e53df8 293
cotigac 18:b02fc0e53df8 294 typedef struct phyTxParams_tag {
cotigac 18:b02fc0e53df8 295 uint8_t numOfCca;
cotigac 18:b02fc0e53df8 296 phyAckRequired_t ackRequired;
cotigac 18:b02fc0e53df8 297 } phyTxParams_t;
cotigac 18:b02fc0e53df8 298
cotigac 18:b02fc0e53df8 299 typedef phyStatus_t ( * PD_MAC_SapHandler_t)(pdDataToMacMessage_t * pMsg, instanceId_t instanceId);
cotigac 18:b02fc0e53df8 300
cotigac 18:b02fc0e53df8 301 typedef phyStatus_t ( * PLME_MAC_SapHandler_t)(plmeToMacMessage_t * pMsg, instanceId_t instanceId);
cotigac 18:b02fc0e53df8 302
cotigac 18:b02fc0e53df8 303 #ifdef __cplusplus
cotigac 18:b02fc0e53df8 304 extern "C" {
cotigac 18:b02fc0e53df8 305 #endif
cotigac 18:b02fc0e53df8 306
cotigac 18:b02fc0e53df8 307 /************************************************************************************
cotigac 18:b02fc0e53df8 308 *************************************************************************************
cotigac 18:b02fc0e53df8 309 * Public memory declarations
cotigac 18:b02fc0e53df8 310 *************************************************************************************
cotigac 18:b02fc0e53df8 311 ************************************************************************************/
cotigac 18:b02fc0e53df8 312 extern const uint8_t gPhyIndirectQueueSize_c;
cotigac 18:b02fc0e53df8 313
cotigac 18:b02fc0e53df8 314 /************************************************************************************
cotigac 18:b02fc0e53df8 315 *************************************************************************************
cotigac 18:b02fc0e53df8 316 * Public functions
cotigac 18:b02fc0e53df8 317 *************************************************************************************
cotigac 18:b02fc0e53df8 318 ************************************************************************************/
cotigac 18:b02fc0e53df8 319
cotigac 18:b02fc0e53df8 320 void Phy_Init( void );
cotigac 18:b02fc0e53df8 321
cotigac 18:b02fc0e53df8 322 instanceId_t BindToPHY( instanceId_t macInstance );
cotigac 18:b02fc0e53df8 323
cotigac 18:b02fc0e53df8 324 // SAPs
cotigac 18:b02fc0e53df8 325 void Phy_RegisterSapHandlers(PD_MAC_SapHandler_t pPD_MAC_SapHandler, PLME_MAC_SapHandler_t pPLME_MAC_SapHandler, instanceId_t instanceId);
cotigac 18:b02fc0e53df8 326
cotigac 18:b02fc0e53df8 327 phyStatus_t MAC_PD_SapHandler(macToPdDataMessage_t * pMsg, instanceId_t phyInstance);
cotigac 18:b02fc0e53df8 328
cotigac 18:b02fc0e53df8 329 phyStatus_t MAC_PLME_SapHandler(macToPlmeMessage_t * pMsg, instanceId_t phyInstance);
cotigac 18:b02fc0e53df8 330
cotigac 18:b02fc0e53df8 331 // PHY Time
cotigac 18:b02fc0e53df8 332 void PhyTime_Maintenance ( void );
cotigac 18:b02fc0e53df8 333
cotigac 18:b02fc0e53df8 334 void PhyTime_RunCallback ( void );
cotigac 18:b02fc0e53df8 335
cotigac 18:b02fc0e53df8 336 void PhyTime_ISR ( void );
cotigac 18:b02fc0e53df8 337
cotigac 18:b02fc0e53df8 338 phyTimeStatus_t PhyTime_TimerInit ( void (*cb)(void) );
cotigac 18:b02fc0e53df8 339
cotigac 18:b02fc0e53df8 340 phyTimeTimestamp_t PhyTime_GetTimestamp ( void );
cotigac 18:b02fc0e53df8 341
cotigac 18:b02fc0e53df8 342 phyTimeTimerId_t PhyTime_ScheduleEvent( phyTimeEvent_t *pEvent );
cotigac 18:b02fc0e53df8 343
cotigac 18:b02fc0e53df8 344 phyTimeStatus_t PhyTime_CancelEvent ( phyTimeTimerId_t timerId );
cotigac 18:b02fc0e53df8 345
cotigac 18:b02fc0e53df8 346 phyTimeStatus_t PhyTime_CancelEventsWithParam ( uint32_t param );
cotigac 18:b02fc0e53df8 347
cotigac 18:b02fc0e53df8 348 #ifdef __cplusplus
cotigac 18:b02fc0e53df8 349 }
cotigac 18:b02fc0e53df8 350 #endif
cotigac 18:b02fc0e53df8 351
cotigac 18:b02fc0e53df8 352 #endif /* _PHY_INTERFACE_H */
cotigac 18:b02fc0e53df8 353