Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
ca821x_api.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019, Cascoda Ltd.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * 3. Neither the name of the copyright holder nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
27 */
42
43#ifndef CA821X_API_H
44#define CA821X_API_H
45
46#include <stdbool.h>
47#include <stddef.h>
48#include <stdint.h>
49
50#include "ca821x_config.h"
51#include "ca821x_endian.h"
52#include "ca821x_error.h"
53#include "ca821x_log.h"
54#include "evbme_messages.h"
55#include "mac_messages.h"
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61#if CASCODA_CA_VER != 8210 && CASCODA_CA_VER != 8211 && CASCODA_CA_VER != 8212
62#error "UNSUPPORTED CASCODA_CA_VER VERSION (or build incorrectly configured - use cmake)"
63#endif
64
65struct ca821x_dev;
66
67/******************************************************************************/
68/****** ca821x PIB attributes modified values ******/
69/******************************************************************************/
70#define PIB_NEW_MAC_MAXFRAMERETRIES 7
71#define PIB_NEW_MAC_MAXCSMABACKOFFS 5
72#define PIB_NEW_MAC_MINBE 7
73#define PIB_NEW_MAC_MAXBE 8
74#define PIB_NEW_PHY_CCAMODE 0 /* CCAM_EDORCS */
75#define PIB_NEW_HWME_LQILIMIT 0
76#define PIB_NEW_HWME_LQIMODE 1 /* HWME_LQIMODE_ED */
77#define PIB_NEW_HWME_EDTHRESHOLD 106
78#define PIB_NEW_HWME_CSTHRESHOLD 128
79#if CASCODA_CA_VER >= 8211
80#define PIB_NEW_HWME_MAXINDIRECTS 8
81#define PIB_NEW_HWME_POLLINDMODE 2
82#endif // CASCODA_CA_VER >= 8211
83#if CASCODA_CA_VER >= 8212
84#define PIB_NEW_HWME_LOTXCALOVERWRITEMODE 1
85#endif // CASCODA_CA_VER >= 8212
86
87/******************************************************************************/
88/****** ca821x PIB default attribute values (as implemented in MAC) ******/
89/******************************************************************************/
90#define PIB_DEF_MAC_MAXFRAMERETRIES 3
91#define PIB_DEF_MAC_MAXCSMABACKOFFS 4
92#define PIB_DEF_MAC_MINBE 3
93#define PIB_DEF_MAC_MAXBE 5
94#define PIB_DEF_PHY_CCAMODE 3 /* CCAM_EDANDCS */
95#define PIB_DEF_HWME_LQILIMIT 75
96#define PIB_DEF_HWME_LQIMODE 0 /* HWME_LQIMODE_CS */
97#define PIB_DEF_HWME_EDTHRESHOLD 60
98#define PIB_DEF_HWME_CSTHRESHOLD 80
99#if CASCODA_CA_VER >= 8211
100#define PIB_DEF_HWME_MAXINDIRECTS 6
101#define PIB_DEF_HWME_POLLINDMODE 0
102#endif // CASCODA_CA_VER >= 8211
103#if CASCODA_CA_VER >= 8212
104#define PIB_DEF_HWME_LOTXCALOVERWRITEMODE 0
105#endif // CASCODA_CA_VER >= 8212
106
107
108/******************************************************************************/
109/****** External function pointers ******/
110/******************************************************************************/
111
112/***************************************************************************/
155
164{
170 void *context;
175
178
179#if CASCODA_CA_VER == 8210
180 uint8_t extaddr[8];
181 uint16_t shortaddr;
182 uint8_t lqi_mode;
183#endif // CASCODA_CA_VER == 8210
184
185 //MAC Workarounds for V1.1 and MPW silicon (V0.x)
186 uint8_t MAC_MPW;
187
188#if CASCODA_MAC_BLACKLIST != 0
194 struct MacAddr blacklist[CASCODA_MAC_BLACKLIST];
195
196#endif
197};
198
199/******************************************************************************/
200/****** MAC MCPS/MLME Downlink ******/
201/******************************************************************************/
202
203#if CASCODA_CA_VER >= 8212
204/******************************************************************************/
205/***************************************************************************/
229ca_mac_status MCPS_DATA_request(uint8_t SrcAddrMode,
230 struct FullAddr DstAddr,
231 uint8_t HeaderIELength,
232 uint8_t PayloadIELength,
233 uint8_t MsduLength,
234 uint8_t *pMsdu,
235 uint8_t MsduHandle,
236 uint8_t *pTxOptions,
237 uint32_t SchTimestamp,
238 uint16_t SchPeriod,
239 uint8_t TxChannel,
240 uint8_t *pHeaderIEList,
241 uint8_t *pPayloadIEList,
242 struct SecSpec *pSecurity,
243 struct ca821x_dev *pDeviceRef);
244#else
245/******************************************************************************/
246/***************************************************************************/
261ca_mac_status MCPS_DATA_request(uint8_t SrcAddrMode,
262 struct FullAddr DstAddr,
263 uint8_t MsduLength,
264 uint8_t *pMsdu,
265 uint8_t MsduHandle,
266 uint8_t TxOptions,
267 struct SecSpec *pSecurity,
268 struct ca821x_dev *pDeviceRef);
269#endif // CASCODA_CA_VER >= 8212
270
271/******************************************************************************/
272/***************************************************************************/
281ca_mac_status MCPS_PURGE_request_sync(uint8_t *MsduHandle, struct ca821x_dev *pDeviceRef);
282
283#if CASCODA_CA_VER >= 8212
284/******************************************************************************/
285/***************************************************************************/
301ca_mac_status PCPS_DATA_request(uint8_t PsduHandle,
302 uint8_t TxOpts,
303 uint8_t PsduLength,
304 uint8_t *pPsdu,
305 uint32_t SchTimestamp,
306 uint16_t SchPeriod,
307 struct ca821x_dev *pDeviceRef);
308#else
309/******************************************************************************/
310/***************************************************************************/
323 uint8_t TxOpts,
324 uint8_t PsduLength,
325 uint8_t *pPsdu,
326 struct ca821x_dev *pDeviceRef);
327#endif // CASCODA_CA_VER >= 8212
328
329/******************************************************************************/
330/***************************************************************************/
342ca_mac_status MLME_ASSOCIATE_request(uint8_t LogicalChannel,
343 struct FullAddr DstAddr,
344 uint8_t CapabilityInfo,
345 struct SecSpec *pSecurity,
346 struct ca821x_dev *pDeviceRef);
347
348/******************************************************************************/
349/***************************************************************************/
361ca_mac_status MLME_ASSOCIATE_response(uint8_t *pDeviceAddress,
362 uint16_t AssocShortAddress,
363 uint8_t Status,
364 struct SecSpec *pSecurity,
365 struct ca821x_dev *pDeviceRef);
366
367/******************************************************************************/
368/***************************************************************************/
381 uint8_t DisassociateReason,
382 uint8_t TxIndirect,
383 struct SecSpec *pSecurity,
384 struct ca821x_dev *pDeviceRef);
385
386/******************************************************************************/
387/***************************************************************************/
399ca_mac_status MLME_GET_request_sync(uint8_t PIBAttribute,
400 uint8_t PIBAttributeIndex,
401 uint8_t *pPIBAttributeLength,
402 void *pPIBAttributeValue,
403 struct ca821x_dev *pDeviceRef);
404
405/******************************************************************************/
406/***************************************************************************/
418ca_mac_status MLME_ORPHAN_response(uint8_t *pOrphanAddress,
419 uint16_t ShortAddress,
420 uint8_t AssociatedMember,
421 struct SecSpec *pSecurity,
422 struct ca821x_dev *pDeviceRef);
423
424/******************************************************************************/
425/***************************************************************************/
434ca_mac_status MLME_RESET_request_sync(uint8_t SetDefaultPIB, struct ca821x_dev *pDeviceRef);
435
436/******************************************************************************/
437/***************************************************************************/
449 uint32_t RxOnTime,
450 uint32_t RxOnDuration,
451 struct ca821x_dev *pDeviceRef);
452
453/******************************************************************************/
454/***************************************************************************/
466ca_mac_status MLME_SCAN_request(uint8_t ScanType,
467 uint32_t ScanChannels,
468 uint8_t ScanDuration,
469 struct SecSpec *pSecurity,
470 struct ca821x_dev *pDeviceRef);
471
472/******************************************************************************/
473/***************************************************************************/
485ca_mac_status MLME_SET_request_sync(uint8_t PIBAttribute,
486 uint8_t PIBAttributeIndex,
487 uint8_t PIBAttributeLength,
488 const void *pPIBAttributeValue,
489 struct ca821x_dev *pDeviceRef);
490
491/******************************************************************************/
492/***************************************************************************/
512 uint8_t LogicalChannel,
513 uint8_t BeaconOrder,
514 uint8_t SuperframeOrder,
515 uint8_t PANCoordinator,
516 uint8_t BatteryLifeExtension,
517 uint8_t CoordRealignment,
518 struct SecSpec *pCoordRealignSecurity,
519 struct SecSpec *pBeaconSecurity,
520 struct ca821x_dev *pDeviceRef);
521
522#if CASCODA_CA_VER >= 8212
523/******************************************************************************/
524/***************************************************************************/
536ca_mac_status MLME_POLL_request(struct FullAddr CoordAddress,
537 uint8_t FrameVersion,
538 struct SecSpec *pSecurity,
539 struct ca821x_dev *pDeviceRef);
540#elif CASCODA_CA_VER == 8211
541/******************************************************************************/
542/***************************************************************************/
553 struct SecSpec *pSecurity,
554 struct ca821x_dev *pDeviceRef);
555#else
556/******************************************************************************/
557/***************************************************************************/
569 uint8_t Interval[2],
570 struct SecSpec *pSecurity,
571 struct ca821x_dev *pDeviceRef);
572#endif // CASCODA_CA_VER >= 8212
573
574/******************************************************************************/
575/****** HWME Downlink ******/
576/******************************************************************************/
577
578/******************************************************************************/
579/***************************************************************************/
590ca_mac_status HWME_SET_request_sync(uint8_t HWAttribute,
591 uint8_t HWAttributeLength,
592 uint8_t *pHWAttributeValue,
593 struct ca821x_dev *pDeviceRef);
594
595/******************************************************************************/
596/***************************************************************************/
607ca_mac_status HWME_GET_request_sync(uint8_t HWAttribute,
608 uint8_t *HWAttributeLength,
609 uint8_t *pHWAttributeValue,
610 struct ca821x_dev *pDeviceRef);
611
612/******************************************************************************/
613/***************************************************************************/
623ca_mac_status HWME_HAES_request_sync(uint8_t HAESMode, uint8_t *pHAESData, struct ca821x_dev *pDeviceRef);
624
625/******************************************************************************/
626/****** TDME Downlink ******/
627/******************************************************************************/
628
629/******************************************************************************/
630/***************************************************************************/
642 uint8_t SFRAddress,
643 uint8_t SFRValue,
644 struct ca821x_dev *pDeviceRef);
645
646/******************************************************************************/
647/***************************************************************************/
659 uint8_t SFRAddress,
660 uint8_t *SFRValue,
661 struct ca821x_dev *pDeviceRef);
662
663/******************************************************************************/
664/***************************************************************************/
673ca_mac_status TDME_TESTMODE_request_sync(uint8_t TestMode, struct ca821x_dev *pDeviceRef);
674
675/******************************************************************************/
676/***************************************************************************/
687ca_mac_status TDME_SET_request_sync(uint8_t TestAttribute,
688 uint8_t TestAttributeLength,
689 void *pTestAttributeValue,
690 struct ca821x_dev *pDeviceRef);
691
692/******************************************************************************/
693/***************************************************************************/
705ca_mac_status TDME_TXPKT_request_sync(uint8_t TestPacketDataType,
706 uint8_t *TestPacketSequenceNumber,
707 uint8_t *TestPacketLength,
708 void *pTestPacketData,
709 struct ca821x_dev *pDeviceRef);
710
711/******************************************************************************/
712/***************************************************************************/
725ca_mac_status TDME_LOTLK_request_sync(uint8_t *TestChannel,
726 uint8_t *TestRxTxb,
727 uint8_t *TestLOFDACValue,
728 uint8_t *TestLOAMPValue,
729 uint8_t *TestLOTXCALValue,
730 struct ca821x_dev *pDeviceRef);
731
732/******************************************************************************/
733/****** TDME Register Default Initialisation and Checking Functions ******/
734/******************************************************************************/
735
736/******************************************************************************/
737/***************************************************************************/
745ca_mac_status TDME_ChipInit(struct ca821x_dev *pDeviceRef);
746
747/******************************************************************************/
748/***************************************************************************/
757ca_mac_status TDME_ChannelInit(uint8_t channel, struct ca821x_dev *pDeviceRef);
758
759/******************************************************************************/
760/***************************************************************************/
770ca_mac_status TDME_CheckPIBAttribute(uint8_t PIBAttribute, uint8_t PIBAttributeLength, const void *pPIBAttributeValue);
771
772/******************************************************************************/
773/***************************************************************************/
779ca_mac_status TDME_ReconfigurePIB(uint8_t SetDefaultPIB, struct ca821x_dev *pDeviceRef);
780
781/******************************************************************************/
782/***************************************************************************/
795ca_mac_status TDME_SetTxPower(uint8_t txp, struct ca821x_dev *pDeviceRef);
796
797/******************************************************************************/
798/***************************************************************************/
811ca_mac_status TDME_GetTxPower(uint8_t *txp, struct ca821x_dev *pDeviceRef);
812
813/******************************************************************************/
814/***************************************************************************/
821uint8_t TDME_tx_dbm_to_paib(int8_t txpdbm);
822
823/******************************************************************************/
824/***************************************************************************/
831int8_t TDME_tx_paib_to_dbm(uint8_t paib);
832
833/******************************************************************************/
834/****** API meta functions ******/
835/******************************************************************************/
836
837/******************************************************************************/
838/***************************************************************************/
850ca_error ca821x_api_init(struct ca821x_dev *pDeviceRef);
851
852/******************************************************************************/
853/***************************************************************************/
863union ca821x_api_callback *ca821x_get_callback(uint8_t cmdid, struct ca821x_dev *pDeviceRef);
864
865/******************************************************************************/
866/***************************************************************************/
876uint8_t ca821x_get_sync_response_id(uint8_t cmdid);
877
878/***************************************************************************/
888const char *ca821x_get_version(void);
889
890/***************************************************************************/
901
902/******************************************************************************/
903/***************************************************************************/
915ca_error ca821x_upstream_dispatch(struct MAC_Message *msg, struct ca821x_dev *pDeviceRef);
916
917/******************************************************************************/
918/***************************************************************************/
933ca_error ca821x_api_downstream(const uint8_t *buf, uint8_t *response, struct ca821x_dev *pDeviceRef);
934
935#ifdef __cplusplus
936}
937#endif
938
942
943#endif // CA821X_API_H
Functions to help converting between system types and big/little endian octet representations.
Global error declarations for use across the Cascoda SDK.
Declarations of global, platform independent logging functions that can be enabled or disabled.
Definitions relating to EVBME API messages.
ca_error ca821x_api_downstream(const uint8_t *buf, uint8_t *response, struct ca821x_dev *pDeviceRef)
Function for downstream api interface.
Definition cascoda_dispatch.c:560
uint8_t ca821x_get_sync_response_id(uint8_t cmdid)
Function to get the command ID for the synchronous response to a sync command.
Definition ca821x_api.c:73
ca_mac_status TDME_GETSFR_request_sync(uint8_t SFRPage, uint8_t SFRAddress, uint8_t *SFRValue, struct ca821x_dev *pDeviceRef)
TDME_GETSFR_request/confirm according to API Spec.
Definition ca821x_api.c:966
ca_mac_status MLME_POLL_request_sync(struct FullAddr CoordAddress, uint8_t Interval[2], struct SecSpec *pSecurity, struct ca821x_dev *pDeviceRef)
MLME_POLL_request/confirm according to CA8210 API Spec.
uint8_t TDME_tx_dbm_to_paib(int8_t txpdbm)
Function to convert transmit power in dBm to PA current setting.
Definition ca821x_api.c:1429
ca_mac_status TDME_ReconfigurePIB(uint8_t SetDefaultPIB, struct ca821x_dev *pDeviceRef)
Reconfigures PIB (MLME and HWME) from MAC defaults.
Definition ca821x_api.c:1336
ca_mac_status MLME_ASSOCIATE_request(uint8_t LogicalChannel, struct FullAddr DstAddr, uint8_t CapabilityInfo, struct SecSpec *pSecurity, struct ca821x_dev *pDeviceRef)
MLME_ASSOCIATE_request according to API Spec.
Definition ca821x_api.c:384
ca_mac_status TDME_CheckPIBAttribute(uint8_t PIBAttribute, uint8_t PIBAttributeLength, const void *pPIBAttributeValue)
Checks Attribute Values that are not checked in MAC.
Definition ca821x_api.c:1232
ca_mac_status MLME_START_request_sync(uint16_t PANId, uint8_t LogicalChannel, uint8_t BeaconOrder, uint8_t SuperframeOrder, uint8_t PANCoordinator, uint8_t BatteryLifeExtension, uint8_t CoordRealignment, struct SecSpec *pCoordRealignSecurity, struct SecSpec *pBeaconSecurity, struct ca821x_dev *pDeviceRef)
MLME_START_request/confirm according to API Spec.
Definition ca821x_api.c:699
ca_mac_status TDME_GetTxPower(uint8_t *txp, struct ca821x_dev *pDeviceRef)
Returns the tx power for MLME_GET phyTransmitPower.
Definition ca821x_api.c:1526
ca_mac_status HWME_HAES_request_sync(uint8_t HAESMode, uint8_t *pHAESData, struct ca821x_dev *pDeviceRef)
HWME_HAES_request/confirm according to API Spec.
Definition ca821x_api.c:913
ca_error ca821x_upstream_dispatch(struct MAC_Message *msg, struct ca821x_dev *pDeviceRef)
Call the relevant callback routine if populated or the generic_dispatch for a received command.
Definition ca821x_api_secure.c:31
ca_mac_status TDME_TXPKT_request_sync(uint8_t TestPacketDataType, uint8_t *TestPacketSequenceNumber, uint8_t *TestPacketLength, void *pTestPacketData, struct ca821x_dev *pDeviceRef)
TDME_TXPKT_request/confirm according to API Spec.
Definition ca821x_api.c:1044
ca_mac_status PCPS_DATA_request(uint8_t PsduHandle, uint8_t TxOpts, uint8_t PsduLength, uint8_t *pPsdu, struct ca821x_dev *pDeviceRef)
PCPS_DATA_request (Send Data) according to API Spec.
const char * ca821x_get_version(void)
Function to get the version string.
ca_mac_status MLME_RX_ENABLE_request_sync(uint8_t DeferPermit, uint32_t RxOnTime, uint32_t RxOnDuration, struct ca821x_dev *pDeviceRef)
MLME_RX_ENABLE_request/confirm according to API Spec.
Definition ca821x_api.c:582
ca_mac_status MLME_ORPHAN_response(uint8_t *pOrphanAddress, uint16_t ShortAddress, uint8_t AssociatedMember, struct SecSpec *pSecurity, struct ca821x_dev *pDeviceRef)
MLME_ORPHAN_response according to API Spec.
Definition ca821x_api.c:515
ca_mac_status MLME_DISASSOCIATE_request(struct FullAddr DevAddr, uint8_t DisassociateReason, uint8_t TxIndirect, struct SecSpec *pSecurity, struct ca821x_dev *pDeviceRef)
MLME_DISASSOCIATE_request according to API Spec.
Definition ca821x_api.c:446
const char * ca821x_get_version_nodate(void)
Function to get the version string without the compile date.
ca_mac_status MLME_GET_request_sync(uint8_t PIBAttribute, uint8_t PIBAttributeIndex, uint8_t *pPIBAttributeLength, void *pPIBAttributeValue, struct ca821x_dev *pDeviceRef)
MLME_GET_request/confirm according to API Spec.
Definition ca821x_api.c:476
ca_mac_status MCPS_DATA_request(uint8_t SrcAddrMode, struct FullAddr DstAddr, uint8_t MsduLength, uint8_t *pMsdu, uint8_t MsduHandle, uint8_t TxOptions, struct SecSpec *pSecurity, struct ca821x_dev *pDeviceRef)
MCPS_DATA_request (Send Data) according to CA8211 API Spec.
Definition ca821x_api.c:245
ca_mac_status TDME_SetTxPower(uint8_t txp, struct ca821x_dev *pDeviceRef)
Sets the tx power for MLME_SET phyTransmitPower.
Definition ca821x_api.c:1490
ca_mac_status TDME_ChannelInit(uint8_t channel, struct ca821x_dev *pDeviceRef)
TDME Channel Register Default Initialisation Macro (Tx).
Definition ca821x_api.c:1170
ca_mac_status TDME_ChipInit(struct ca821x_dev *pDeviceRef)
TDME Chip Register Default Initialisation Macro.
Definition ca821x_api.c:1129
union ca821x_api_callback * ca821x_get_callback(uint8_t cmdid, struct ca821x_dev *pDeviceRef)
Function to get a reference to the callback for a certain command ID.
Definition ca821x_api.c:1677
int8_t TDME_tx_paib_to_dbm(uint8_t paib)
Function to convert PA current setting to transmit power in dBm.
Definition ca821x_api.c:1460
ca_mac_status MLME_RESET_request_sync(uint8_t SetDefaultPIB, struct ca821x_dev *pDeviceRef)
MLME_RESET_request/confirm according to API Spec.
Definition ca821x_api.c:546
ca_mac_status TDME_TESTMODE_request_sync(uint8_t TestMode, struct ca821x_dev *pDeviceRef)
TDME_TESTMODE_request/confirm according to API Spec.
Definition ca821x_api.c:994
ca_mac_status MLME_SET_request_sync(uint8_t PIBAttribute, uint8_t PIBAttributeIndex, uint8_t PIBAttributeLength, const void *pPIBAttributeValue, struct ca821x_dev *pDeviceRef)
MLME_SET_request/confirm according to API Spec.
Definition ca821x_api.c:650
ca_mac_status MCPS_PURGE_request_sync(uint8_t *MsduHandle, struct ca821x_dev *pDeviceRef)
MCPS_PURGE_request/confirm according to API Spec.
Definition ca821x_api.c:285
ca_mac_status TDME_LOTLK_request_sync(uint8_t *TestChannel, uint8_t *TestRxTxb, uint8_t *TestLOFDACValue, uint8_t *TestLOAMPValue, uint8_t *TestLOTXCALValue, struct ca821x_dev *pDeviceRef)
TDME_LOTLK_request/confirm according to API Spec.
Definition ca821x_api.c:1091
ca_mac_status HWME_GET_request_sync(uint8_t HWAttribute, uint8_t *HWAttributeLength, uint8_t *pHWAttributeValue, struct ca821x_dev *pDeviceRef)
HWME_GET_request/confirm according to API Spec.
Definition ca821x_api.c:872
ca_mac_status TDME_SETSFR_request_sync(uint8_t SFRPage, uint8_t SFRAddress, uint8_t SFRValue, struct ca821x_dev *pDeviceRef)
TDME_SETSFR_request/confirm according to API Spec.
Definition ca821x_api.c:939
ca_mac_status MLME_SCAN_request(uint8_t ScanType, uint32_t ScanChannels, uint8_t ScanDuration, struct SecSpec *pSecurity, struct ca821x_dev *pDeviceRef)
MLME_SCAN_request according to API Spec.
Definition ca821x_api.c:617
ca_mac_status TDME_SET_request_sync(uint8_t TestAttribute, uint8_t TestAttributeLength, void *pTestAttributeValue, struct ca821x_dev *pDeviceRef)
TDME_SET_request/confirm according to API Spec.
Definition ca821x_api.c:1016
ca_mac_status MLME_ASSOCIATE_response(uint8_t *pDeviceAddress, uint16_t AssocShortAddress, uint8_t Status, struct SecSpec *pSecurity, struct ca821x_dev *pDeviceRef)
MLME_ASSOCIATE_response according to API Spec.
Definition ca821x_api.c:415
ca_mac_status HWME_SET_request_sync(uint8_t HWAttribute, uint8_t HWAttributeLength, uint8_t *pHWAttributeValue, struct ca821x_dev *pDeviceRef)
HWME_SET_request/confirm according to API Spec.
Definition ca821x_api.c:840
ca_error ca821x_api_init(struct ca821x_dev *pDeviceRef)
Initialisation function for initialising a ca821x_dev data structure for use with the API.
Definition ca821x_api.c:134
ca_error
Cascoda error type.
Definition ca821x_error.h:51
lqi_mode
Potential values of HWME_LQIMODE.
Definition hwme_tdme.h:78
enum mac_status ca_mac_status
MAC Status Codes (see 802.15.4 2006 spec table 78).
ca_error(* MLME_SYNC_LOSS_indication_callback)(struct MLME_SYNC_LOSS_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:945
ca_error(* TDME_RXPKT_indication_callback)(struct TDME_RXPKT_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:963
ca_error(* MLME_ASSOCIATE_indication_callback)(struct MLME_ASSOCIATE_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:931
ca_error(* TDME_ERROR_indication_callback)(struct TDME_ERROR_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:967
ca_error(* MCPS_DATA_confirm_callback)(struct MCPS_DATA_confirm_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:957
ca_error(* MCPS_DATA_indication_callback)(struct MCPS_DATA_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:955
ca_error(* MLME_COMM_STATUS_indication_callback)(struct MLME_COMM_STATUS_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:943
ca_error(* HWME_WAKEUP_indication_callback)(struct HWME_WAKEUP_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:929
ca_error(* MLME_DISASSOCIATE_indication_callback)(struct MLME_DISASSOCIATE_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:935
ca_error(* TDME_EDDET_indication_callback)(struct TDME_EDDET_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:965
ca_error(* MLME_POLL_indication_callback)(struct MLME_POLL_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:947
ca_error(* MLME_BEACON_NOTIFY_indication_callback)(struct MLME_BEACON_NOTIFY_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:939
ca_error(* MLME_ORPHAN_indication_callback)(struct MLME_ORPHAN_indication_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:941
ca_error(* MLME_SCAN_confirm_callback)(struct MLME_SCAN_confirm_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:954
ca_error(* MLME_DISASSOCIATE_confirm_callback)(struct MLME_DISASSOCIATE_confirm_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:937
ca_error(* MLME_ASSOCIATE_confirm_callback)(struct MLME_ASSOCIATE_confirm_pset *params, struct ca821x_dev *pDeviceRef)
Definition mac_messages.h:933
Definitions relating to MLME and MCPS API messages.
uint8_t channel
Channel we are sniffing on.
Definition sniffer.c:200
Contains full addressing information for a node.
Definition mac_messages.h:63
SPI Message Format Typedef.
Definition mac_messages.h:1017
Holds either short or extended address.
Definition mac_messages.h:83
Security specification to be applied to MAC frames.
Definition mac_messages.h:90
API user callbacks structure.
Definition ca821x_api.h:128
MLME_ASSOCIATE_confirm_callback MLME_ASSOCIATE_confirm
Definition ca821x_api.h:141
TDME_RXPKT_indication_callback TDME_RXPKT_indication
Definition ca821x_api.h:150
TDME_EDDET_indication_callback TDME_EDDET_indication
Definition ca821x_api.h:151
MLME_COMM_STATUS_indication_callback MLME_COMM_STATUS_indication
Definition ca821x_api.h:147
TDME_ERROR_indication_callback TDME_ERROR_indication
Definition ca821x_api.h:152
MCPS_DATA_indication_callback MCPS_DATA_indication
Definition ca821x_api.h:129
MLME_DISASSOCIATE_confirm_callback MLME_DISASSOCIATE_confirm
Definition ca821x_api.h:143
MCPS_DATA_confirm_callback MCPS_DATA_confirm
Definition ca821x_api.h:130
MLME_SYNC_LOSS_indication_callback MLME_SYNC_LOSS_indication
Definition ca821x_api.h:148
MLME_ASSOCIATE_indication_callback MLME_ASSOCIATE_indication
Definition ca821x_api.h:140
HWME_WAKEUP_indication_callback HWME_WAKEUP_indication
Definition ca821x_api.h:149
MLME_ORPHAN_indication_callback MLME_ORPHAN_indication
Definition ca821x_api.h:145
MLME_BEACON_NOTIFY_indication_callback MLME_BEACON_NOTIFY_indication
Definition ca821x_api.h:144
ca_error(* generic_dispatch)(const struct MAC_Message *msg, struct ca821x_dev *pDeviceRef)
Definition ca821x_api.h:153
MLME_SCAN_confirm_callback MLME_SCAN_confirm
Definition ca821x_api.h:146
MLME_DISASSOCIATE_indication_callback MLME_DISASSOCIATE_indication
Definition ca821x_api.h:142
CA-821x Device reference struct.
Definition ca821x_api.h:164
struct ca821x_api_callbacks callbacks
Callback routines registered by the user, to be called by the api for upstream commands.
Definition ca821x_api.h:177
void * context
Context pointer for free use by the application.
Definition ca821x_api.h:170
uint8_t MAC_MPW
Flag to enable workarounds for ca8210 v0.x.
Definition ca821x_api.h:186
void * exchange_context
Context for free use by the exchange (internal to the cascoda stack).
Definition ca821x_api.h:174
Union of all compatible callback types.
Definition mac_messages.h:973