mirror of https://github.com/ARMmbed/mbed-os.git
reinstate fixes
parent
0c855780d1
commit
e247852043
|
|
@ -86,13 +86,13 @@ extern "C" {
|
|||
|
||||
/*! \brief Number of supported advertising sets: must be set to 1 for legacy advertising */
|
||||
#ifndef DM_NUM_ADV_SETS
|
||||
#define DM_NUM_ADV_SETS 1
|
||||
#define DM_NUM_ADV_SETS 3
|
||||
#endif
|
||||
|
||||
/*! \brief Number of scanner and initiator PHYs (LE 1M, LE 2M and LE Coded): must be set to 1 for
|
||||
legacy scanner and initiator */
|
||||
#ifndef DM_NUM_PHYS
|
||||
#define DM_NUM_PHYS 1
|
||||
#define DM_NUM_PHYS 3
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
|
|
|
|||
|
|
@ -153,14 +153,14 @@ void DmAdvSetData(uint8_t advHandle, uint8_t op, uint8_t location, uint8_t len,
|
|||
WSF_ASSERT((location == DM_DATA_LOC_SCAN) || (location == DM_DATA_LOC_ADV));
|
||||
WSF_ASSERT(advHandle < DM_NUM_ADV_SETS);
|
||||
|
||||
if ((pMsg = WsfMsgAlloc(sizeof(dmAdvApiSetData_t))) != NULL)
|
||||
if ((pMsg = WsfMsgAlloc(sizeof(dmAdvApiSetData_t) + len)) != NULL)
|
||||
{
|
||||
pMsg->hdr.event = DM_ADV_MSG_API_SET_DATA;
|
||||
pMsg->advHandle = advHandle;
|
||||
pMsg->op = op;
|
||||
pMsg->location = location;
|
||||
pMsg->len = len;
|
||||
pMsg->pData = pData;
|
||||
memcpy(pMsg->pData, pData, len);
|
||||
WsfMsgSend(dmCb.handlerId, pMsg);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ typedef struct
|
|||
uint8_t op;
|
||||
uint8_t location;
|
||||
uint8_t len;
|
||||
uint8_t *pData;
|
||||
uint8_t pData[];
|
||||
} dmAdvApiSetData_t;
|
||||
|
||||
/* Data structure for DM_ADV_MSG_API_START */
|
||||
|
|
@ -151,7 +151,7 @@ typedef struct
|
|||
uint8_t advHandle;
|
||||
uint8_t op;
|
||||
uint8_t len;
|
||||
uint8_t *pData;
|
||||
uint8_t pData[];
|
||||
} dmAdvPerApiSetData_t;
|
||||
|
||||
/* Data structure for DM_ADV_PER_MSG_API_START */
|
||||
|
|
|
|||
|
|
@ -1660,13 +1660,13 @@ void DmPerAdvSetData(uint8_t advHandle, uint8_t op, uint8_t len, uint8_t *pData)
|
|||
WSF_ASSERT(advHandle < DM_NUM_ADV_SETS);
|
||||
WSF_ASSERT(len <= HCI_PER_ADV_DATA_LEN);
|
||||
|
||||
if ((pMsg = WsfMsgAlloc(sizeof(dmAdvPerApiSetData_t))) != NULL)
|
||||
if ((pMsg = WsfMsgAlloc(sizeof(dmAdvPerApiSetData_t) + len)) != NULL)
|
||||
{
|
||||
pMsg->hdr.event = DM_ADV_PER_MSG_API_SET_DATA;
|
||||
pMsg->advHandle = advHandle;
|
||||
pMsg->op = op;
|
||||
pMsg->len = len;
|
||||
pMsg->pData = pData;
|
||||
memcpy(pMsg->pData, pData, len);
|
||||
WsfMsgSend(dmCb.handlerId, pMsg);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue