Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
test15_4_evbme.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2019, Cascoda Ltd.
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. Neither the name of the copyright holder nor the
17 * names of its contributors may be used to endorse or promote products
18 * derived from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 */
34#include "ca821x_api.h"
35
36#ifndef TEST15_4_EVBME_H
37#define TEST15_4_EVBME_H
38
39/******************************************************************************/
40/****** EVBME Command ID Codes ******/
41/******************************************************************************/
42#define EVBME_PHY_TESTMODE_REQUEST (0x83)
43#define EVBME_PHY_SET_REQUEST (0x84)
44#define EVBME_PHY_REPORT_REQUEST (0x85)
45#define EVBME_FFD_AWAIT_ASSOC_REQUEST (0x8D)
46#define EVBME_FFD_AWAIT_ORPHAN_REQUEST (0x8E)
47
48/******************************************************************************/
49/****** EVBME API Functions ******/
50/******************************************************************************/
51/* TEST15_4 EVBME Functions */
52
53/******************************************************************************/
54/***************************************************************************/
58void TEST15_4_Initialise(struct ca821x_dev *pDeviceRef);
59
60/******************************************************************************/
61/***************************************************************************/
65void TEST15_4_Handler(struct ca821x_dev *pDeviceRef);
66
67/******************************************************************************/
68/***************************************************************************/
73
74/******************************************************************************/
75/***************************************************************************/
84u8_t EVBME_PHY_TESTMODE_request(u8_t TestMode, struct ca821x_dev *pDeviceRef);
85
86/******************************************************************************/
87/***************************************************************************/
97u8_t EVBME_PHY_SET_request(u8_t Parameter, u8_t ParameterLength, u8_t *ParameterValue);
98
99/******************************************************************************/
100/***************************************************************************/
104void EVBME_PHY_REPORT_request(void);
105
106/******************************************************************************/
107/***************************************************************************/
117void TEST15_4_SetupAwaitAssoc(uint8_t *pDeviceAddress, uint16_t AssocShortAddress, uint8_t Status);
118
119/******************************************************************************/
120/***************************************************************************/
129void TEST15_4_SetupAwaitOrphan(uint8_t *pDeviceAddress, uint16_t OrphanShortAddress);
130/* Callbacks */
133ca_error TEST15_4_MAC_TXPKT_confirm(struct MCPS_DATA_confirm_pset *params, struct ca821x_dev *pDeviceRef);
137
138/******************************************************************************/
139/***************************************************************************/
143void TEST15_4_RegisterCallbacks(struct ca821x_dev *pDeviceRef);
144
145/******************************************************************************/
146/***************************************************************************/
156int TEST15_4_SerialDispatch(uint8_t *buf, size_t len, struct ca821x_dev *pDeviceRef);
157
158#endif // TEST15_4_EVBME_H
The main ca821x-api include file.
Internal Function definitions for communicating with a host using UART/USB.
struct SerialBuffer SerialRxBuffer
Type definitions used by Cascoda baremetal drivers.
unsigned char u8_t
Definition cascoda_types.h:46
ca_error
Cascoda error type.
Definition ca821x_error.h:51
MCPS_DATA_confirm parameter set.
Definition mac_messages.h:357
MCPS_DATA_indication parameter set.
Definition mac_messages.h:384
MLME_ASSOCIATE_indication parameter set.
Definition mac_messages.h:461
MLME_ORPHAN_indication parameter set.
Definition mac_messages.h:529
Structure of serial transfers.
Definition cascoda_serial.h:50
TDME_EDDET_indication parameter set.
Definition mac_messages.h:641
TDME_RXPKT_indication parameter set.
Definition mac_messages.h:630
CA-821x Device reference struct.
Definition ca821x_api.h:123
void TEST15_4_SetupAwaitAssoc(uint8_t *pDeviceAddress, uint16_t AssocShortAddress, uint8_t Status)
Set up Association Response when waiting for it.
Definition test15_4_evbme.c:272
ca_error TEST15_4_OrphanIndication(struct MLME_ORPHAN_indication_pset *params, struct ca821x_dev *pDeviceRef)
Callback for MLME_ORPHAN_indication.
Definition test15_4_evbme.c:308
void TEST15_4_RegisterCallbacks(struct ca821x_dev *pDeviceRef)
Dynamically Register Callbacks for TEST15_4.
Definition test15_4_evbme.c:389
u8_t EVBME_PHY_TESTMODE_request(u8_t TestMode, struct ca821x_dev *pDeviceRef)
EVBME_PHY_TESTMODE_request according to EVBME Spec.
Definition test15_4_evbme.c:124
ca_error TEST15_4_PHY_RXPKT_indication(struct TDME_RXPKT_indication_pset *params, struct ca821x_dev *pDeviceRef)
Callback for TDME_RXPKT_indication.
Definition test15_4_evbme.c:325
ca_error TEST15_4_AssociateIndication(struct MLME_ASSOCIATE_indication_pset *params, struct ca821x_dev *pDeviceRef)
Callback for MLME_ASSOCIATE_indication.
Definition test15_4_evbme.c:290
void EVBME_PHY_REPORT_request(void)
EVBME_PHY_REPORT_request according to EVBME Spec.
Definition test15_4_evbme.c:267
ca_error TEST15_4_PHY_EDDET_indication(struct TDME_EDDET_indication_pset *params, struct ca821x_dev *pDeviceRef)
Callback for TDME_EDDET_indication.
Definition test15_4_evbme.c:379
ca_error TEST15_4_MAC_RXPKT_indication(struct MCPS_DATA_indication_pset *params, struct ca821x_dev *pDeviceRef)
Callback for MCPS_DATA_indication.
Definition test15_4_evbme.c:343
ca_error TEST15_4_MAC_TXPKT_confirm(struct MCPS_DATA_confirm_pset *params, struct ca821x_dev *pDeviceRef)
Callback for MCPS_DATA_confirm.
Definition test15_4_evbme.c:361
void TEST15_4_Initialise(struct ca821x_dev *pDeviceRef)
TEST15_4 Initialistion.
Definition test15_4_evbme.c:61
void TEST15_4_SetupAwaitOrphan(uint8_t *pDeviceAddress, uint16_t OrphanShortAddress)
Set up Orphan Response when waiting for it.
Definition test15_4_evbme.c:279
int TEST15_4_UpStreamDispatch(struct SerialBuffer *SerialRxBuffer, struct ca821x_dev *pDeviceRef)
Dispatch Branch for EVBME Request (UpStream, Serial)
Definition test15_4_evbme.c:90
u8_t EVBME_PHY_SET_request(u8_t Parameter, u8_t ParameterLength, u8_t *ParameterValue)
EVBME_PHY_SET_request according to EVBME Spec.
Definition test15_4_evbme.c:148
int TEST15_4_SerialDispatch(uint8_t *buf, size_t len, struct ca821x_dev *pDeviceRef)
Dispatch function to process received serial messages.
Definition test15_4_evbme.c:413
void TEST15_4_Handler(struct ca821x_dev *pDeviceRef)
TEST15_4 Event Handler in Main Polling Loop.
Definition test15_4_evbme.c:67