Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
ca821x-posix-evbme.c File Reference
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "ca821x-generic-exchange.h"
#include "ca821x-posix-evbme-internal.h"
Include dependency graph for ca821x-posix-evbme.c:

Functions

struct EVBME_callbacksEVBME_GetCallbackStruct (struct ca821x_dev *pDeviceRef)
 Get the mutable callback structure for the given device. More...
 
ca_error EVBME_COMM_CHECK_request (uint8_t aHandle, uint8_t aDelay, uint8_t aIndCount, uint8_t aIndSize, uint8_t aPayloadLen, struct ca821x_dev *pDeviceRef)
 Send an asynchronous EVBME COMM CHECK request to the given device. More...
 
ca_error EVBME_HOST_CONNECTED_notify (struct ca821x_dev *pDeviceRef)
 Send a notification to the given device to reset and take control of it. More...
 
ca_error EVBME_HOST_DISCONNECTED_notify (struct ca821x_dev *pDeviceRef)
 Send a notification to the given device to reset and release control of it. More...
 
ca_error EVBME_DFU_REBOOT_request (enum evbme_dfu_rebootmode aRebootMode, struct ca821x_dev *pDeviceRef)
 Send a DFU request for reboot to the given device. More...
 
ca_error EVBME_DFU_ERASE_request (uint32_t aStartAddr, uint32_t aEraseLen, struct ca821x_dev *pDeviceRef)
 Send a DFU request for Erase to a given device. More...
 
ca_error EVBME_DFU_WRITE_request (uint32_t aStartAddr, size_t aWriteLen, void *aWriteData, struct ca821x_dev *pDeviceRef)
 Send a DFU request for Write to a given device. More...
 
ca_error EVBME_DFU_CHECK_request (uint32_t aStartAddr, uint32_t aCheckLen, uint32_t aChecksum, struct ca821x_dev *pDeviceRef)
 Send a DFU request to verify a flash range of a given device. More...
 
ca_error EVBME_DFU_BOOTMODE_request (enum evbme_dfu_rebootmode aBootMode, struct ca821x_dev *pDeviceRef)
 Send a DFU request to set the default boot mode of the given device. More...
 
ca_error EVBME_SET_request_sync (enum evbme_attribute aAttrId, size_t aAttrLen, uint8_t *aAttrData, struct ca821x_dev *pDeviceRef)
 Send an EVBME SET request to set the value of an EVBME attribute. More...
 
ca_error EVBME_GET_request_sync (enum evbme_attribute aAttrId, size_t aMaxAttrLen, uint8_t *aAttrData, uint8_t *aAttrLen, struct ca821x_dev *pDeviceRef)
 Send an EVBME GET request to get the value of an EVBME attribute. More...
 
int EVBME_CompareVersions (const char *aVersion1, const char *aVersion2, struct ca_version_number *aVersion1Number, struct ca_version_number *aVersion2Number)
 Compares two input version strings and returns the result. More...
 
ca_error EVBME_CheckVersion (const char *aMinVerString, struct ca821x_dev *pDeviceRef)
 Check the EVBME version of the device and compare it to the SDK version of the application. More...
 
ca_error ca821x_evbme_dispatch (uint8_t *aBuf, size_t aBufLen, struct ca821x_dev *pDeviceRef)
 Dispatch on received buffer for the purposes of EVBME handling. More...
 

Function Documentation

◆ ca821x_evbme_dispatch()

ca_error ca821x_evbme_dispatch ( uint8_t *  aBuf,
size_t  aBufLen,
struct ca821x_dev pDeviceRef 
)

Dispatch on received buffer for the purposes of EVBME handling.

Parameters
aBufThe received buffer
aBufLenThe length of the received buffer
pDeviceRefThe device that the buffer was received for
Returns
Processing status
Return values
CA_ERROR_SUCCESSBuffer was handled successfully
CA_ERROR_NOT_HANDLEDBuffer not handled by this command