Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
|
Declarations of platform helper functions for Thread. More...
#include <stdint.h>
#include "openthread/instance.h"
#include "openthread/platform/radio.h"
#include "ca821x_api.h"
#include "cascoda-util/cascoda_settings.h"
Go to the source code of this file.
Macros | |
#define | SuccessOrExit(aCondition) |
Enumerations | |
enum | openthread_message_codes { OT_SERIAL_DOWNLINK = 0xB2 , OT_SERIAL_UPLINK = 0xB3 } |
Functions | |
struct ca821x_dev * | PlatformGetDeviceRef (void) |
Following Initialisation, this can be used to obtain the pDeviceRef that openthread is using. More... | |
int | PlatformRadioInit (void) |
Initialise the openthread platform layer with the internal device struct. More... | |
int | PlatformRadioInitWithDev (struct ca821x_dev *pDeviceRef) |
Initialise the openthread platform layer with apDeviceRef as the device. More... | |
int | PlatformRadioInitWithDevEui64 (struct ca821x_dev *apDeviceRef, uint8_t *pEui64) |
Initialise the openthread platform layer with pDeviceRef as the device, and pEui64 as the EUI64. More... | |
int | PlatformIsExpectingIndication (void) |
Determines whether or not an MCPS-DATA-INDICATION is currently expected, based on the result of the previous poll. More... | |
void | PlatformRadioStop (void) |
Stop and reset the CA-821x. More... | |
void | PlatformAlarmInit (void) |
Initialise the platform alarm subsystem. More... | |
otError | PlatformSleep (uint32_t aSleepTime) |
Sends the platform and cax to sleep for the given number of milliseconds. More... | |
bool | PlatformCanSleep (otInstance *aInstance) |
Check whether the platform is able to sleep. More... | |
otError | PlatformUartReceive (const uint8_t *aBuf, uint16_t aBufLength) |
Handle received serial data. More... | |
otError | PlatformTryJoin (struct ca821x_dev *pDeviceRef, otInstance *aInstance) |
Helper function to attempt the Thread joining process. More... | |
otError | PlatformTryJoinWithCustomPoll (struct ca821x_dev *pDeviceRef, otInstance *aInstance, void(*poll_func)(void)) |
Identical to PlatformTryJoin(), except that an additional poll function can be provided, which will be called while the joining process is in progress. More... | |
otError | PlatformTryJoinWithPskd (struct ca821x_dev *pDeviceRef, otInstance *aInstance, const char *aPskd) |
Helper function to attempt the Thread joining process, with an explicit passcode. More... | |
otError | PlatformTryJoinWithPskdWithCustomPoll (struct ca821x_dev *pDeviceRef, otInstance *aInstance, const char *aPskd, void(*poll_func)(void)) |
Identiacl to PlatformTryJoinWithPsdk(), except that an additional poll function can be provided, which will be called while the joining process is in progress. More... | |
otError | PlatformPrintJoinerCredentials (struct ca821x_dev *pDeviceRef, otInstance *aInstance, uint32_t aMaxWaitMs) |
Helper function to print the Thread Joiner credentials (for instance, upon boot). More... | |
otError | PlatformPrintJoinerCredentialsWithPskd (struct ca821x_dev *pDeviceRef, otInstance *aInstance, uint32_t aMaxWaitMs, const char *aPskd) |
Helper function to print the Thread Joiner credentials, with an explicit passcode (for instance, upon boot). More... | |
otError | PlatformEraseJoinerCredentials (otInstance *aInstance) |
Helper function to erase the joiner credentials of this device. More... | |
const char * | PlatformGetJoinerCredential (otInstance *aInstance) |
Helper function to get the joiner credential of this device. More... | |
otError | otPlatSettingsGetAddress (uint16_t aKey, int aIndex, void **aValue, uint16_t *aValueLength) |
Get the address at which a setting is stored, so that it can be read without copying it, as would be necessary when using otPlatSettingsGet(). More... | |
otError | otPlatSettingsAddVector (otInstance *aInstance, uint16_t aKey, struct settingBuffer *aVector, size_t aCount) |
This function adds the value to a setting identified by aKey, without replacing any existing values. More... | |
otError | PlatformGetQRString (char *aBufOut, size_t bufferSize, otInstance *aInstance) |
Get the QR text string format to be read as a Thread Connect QR Code, enabling external commissioning via the Thread Commissioning App. More... | |
Variables | |
otInstance * | OT_INSTANCE |
Declarations of platform helper functions for Thread.