mirror of
https://github.com/espressif/openthread.git
synced 2026-09-02 15:20:07 +00:00
[tcat] implement tcat advertisement (#9858)
Commit introduces implementation of TCAT advertisement over BLE compliant with Thread 1.3.1 specification.
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <openthread/platform/ble.h>
|
||||
|
||||
#include "openthread/error.h"
|
||||
#include "openthread/tcat.h"
|
||||
#include "utils/code_utils.h"
|
||||
|
||||
#define PLAT_BLE_MSG_DATA_MAX 2048
|
||||
@@ -87,6 +88,16 @@ static void deinitFds(void)
|
||||
}
|
||||
}
|
||||
|
||||
otError otPlatBleGetAdvertisementBuffer(otInstance *aInstance, uint8_t **aAdvertisementBuffer)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
static uint8_t sAdvertisementBuffer[OT_TCAT_ADVERTISEMENT_MAX_LEN];
|
||||
|
||||
*aAdvertisementBuffer = sAdvertisementBuffer;
|
||||
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
otError otPlatBleEnable(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
@@ -214,3 +225,25 @@ OT_TOOL_WEAK void otPlatBleGattServerOnWriteRequest(otInstance *aIns
|
||||
* which is available in FTD/MTD library.
|
||||
*/
|
||||
}
|
||||
|
||||
void otPlatBleGetLinkCapabilities(otInstance *aInstance, otBleLinkCapabilities *aBleLinkCapabilities)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
aBleLinkCapabilities->mGattNotifications = 1;
|
||||
aBleLinkCapabilities->mL2CapDirect = 0;
|
||||
aBleLinkCapabilities->mRsv = 0;
|
||||
}
|
||||
|
||||
otError otPlatBleGapAdvSetData(otInstance *aInstance, uint8_t *aAdvertisementData, uint16_t aAdvertisementLen)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
OT_UNUSED_VARIABLE(aAdvertisementData);
|
||||
OT_UNUSED_VARIABLE(aAdvertisementLen);
|
||||
return OT_ERROR_NONE;
|
||||
}
|
||||
|
||||
bool otPlatBleSupportsMultiRadio(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user