Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
cascoda_evbme.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 */
41#include "ca821x_api.h"
42
43#ifndef CASCODA_EVBME_H
44#define CASCODA_EVBME_H
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50#ifndef CA_TARGET_NAME
51// Should be defined by the build system
52#define CA_TARGET_NAME "UNKNOWN-TARGET"
53#endif
54
66
67/******************************************************************************/
68/****** Global Parameters that can by set via EVBME_SET_request ******/
69/******************************************************************************/
70extern u8_t EVBME_HasReset;
71extern u8_t EVBME_UseMAC;
72
73extern void (*EVBME_Message)(char *message, size_t len);
74extern void (*MAC_Message)(u8_t CommandId, u8_t Count, const u8_t *pBuffer);
75
76/******************************************************************************/
77/****** EVBME API Functions ******/
78/******************************************************************************/
79
80/******************************************************************************/
81/***************************************************************************/
92ca_error EVBMEInitialise(const char *aAppName, struct ca821x_dev *dev);
93
94/******************************************************************************/
95/***************************************************************************/
101const char *EVBME_GetAppName(void);
102
103/******************************************************************************/
104/***************************************************************************/
111ca_error EVBME_NotHandled(const struct MAC_Message *msg, struct ca821x_dev *pDeviceRef);
112
113/******************************************************************************/
114/***************************************************************************/
121void cascoda_io_handler(struct ca821x_dev *pDeviceRef);
122
123/******************************************************************************/
124/***************************************************************************/
129extern int (*cascoda_reinitialise)(struct ca821x_dev *pDeviceRef);
130
131/******************************************************************************/
132/***************************************************************************/
152void EVBME_PowerDown(enum powerdown_mode mode, u32_t sleeptime_ms, struct ca821x_dev *pDeviceRef);
153
154/******************************************************************************/
155/***************************************************************************/
162void EVBME_SwitchClock(struct ca821x_dev *pDeviceRef, u8_t useExternalClock);
163
164/******************************************************************************/
165/***************************************************************************/
171void EVBME_CAX_Restart(struct ca821x_dev *pDeviceRef);
172
173/******************************************************************************/
174/***************************************************************************/
188ca_error EVBME_GET_OT_Attrib(enum evbme_attribute aAttrib, uint8_t *aOutBufLen, uint8_t *aOutBuf);
189
190#ifdef __cplusplus
191}
192#endif
193
198#endif // CASCODA_EVBME_H
The main ca821x-api include file.
unsigned long u32_t
Definition cascoda_types.h:50
unsigned char u8_t
Definition cascoda_types.h:46
struct ca821x_dev dev
Definition flash_test_main.c:95
ca_error EVBME_GET_OT_Attrib(enum evbme_attribute aAttrib, uint8_t *aOutBufLen, uint8_t *aOutBuf)
Get an openthread-specific EVBME attribute.
Definition cascoda_evbme.c:1137
void EVBME_PowerDown(enum powerdown_mode mode, u32_t sleeptime_ms, struct ca821x_dev *pDeviceRef)
Put the system into a state of power-down for a given time.
Definition cascoda_evbme.c:948
void cascoda_io_handler(struct ca821x_dev *pDeviceRef)
Processes messages received over available interfaces.
Definition cascoda_evbme.c:856
ca_error EVBME_NotHandled(const struct MAC_Message *msg, struct ca821x_dev *pDeviceRef)
Sends DownStream Command from API UpStream to Serial.
Definition cascoda_evbme.c:902
void EVBME_SwitchClock(struct ca821x_dev *pDeviceRef, u8_t useExternalClock)
System Clock Switch.
Definition cascoda_evbme.c:913
void EVBME_CAX_Restart(struct ca821x_dev *pDeviceRef)
Restarts Air Interface.
Definition cascoda_evbme.c:1056
u8_t EVBME_UseMAC
Use MAC functionality during phy tests.
Definition cascoda_evbme.c:64
int(* cascoda_reinitialise)(struct ca821x_dev *pDeviceRef)
re-initialises CA821x / MAC PIB after powerdown.
Definition cascoda_evbme.c:74
powerdown_mode
Definitions for Powerdown Modes.
Definition cascoda_evbme.h:57
const char * EVBME_GetAppName(void)
Returns the app name string.
Definition cascoda_evbme.c:1132
u8_t EVBME_HasReset
Used to notify apps that radio has been reset.
Definition cascoda_evbme.c:63
ca_error EVBMEInitialise(const char *aAppName, struct ca821x_dev *dev)
Initialises EVBME after Reset.
Definition cascoda_evbme.c:1079
@ PDM_POWERDOWN
No CAX Retention, PIB has to be re-initialised.
Definition cascoda_evbme.h:61
@ PDM_POWEROFF
No CAX Retention, PIB has to be re-initialised.
Definition cascoda_evbme.h:62
@ PDM_STANDBY
CAX Full Data Retention.
Definition cascoda_evbme.h:60
@ PDM_ACTIVE
CAX Full Data Retention, MAC Running.
Definition cascoda_evbme.h:59
@ PDM_ALLON
Mainly for Testing.
Definition cascoda_evbme.h:58
@ PDM_DPD
No CAX Retention or MCU Retention (Data saved in NVM)
Definition cascoda_evbme.h:63
@ PDM_DPD_MCU_ONLY
No CAX Retention or MCU Retention (Data saved in NVM)
Definition cascoda_evbme.h:64
ca_error
Cascoda error type.
Definition ca821x_error.h:51
evbme_attribute
EVBME attribute ids for use with EVBME_SET_REQUEST and EVBME_GET_REQUEST.
Definition evbme_messages.h:73
int
Definition check_headers.py:126
EVBME Message command in Cascoda TLV format.
Definition evbme_messages.h:258
SPI Message Format Typedef.
Definition mac_messages.h:1017
CA-821x Device reference struct.
Definition ca821x_api.h:123