Skip to content

Commit

Permalink
Merge pull request #10666 from ARMmbed/feature-nrf52-sdk15
Browse files Browse the repository at this point in the history
Nordic SDK v15 Update
  • Loading branch information
0xc0170 authored May 28, 2019
2 parents a4738fa + 9bf2d0a commit 19e7622
Show file tree
Hide file tree
Showing 856 changed files with 126,645 additions and 81,106 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,9 @@ void CordioHCIDriver::handle_reset_sequence(uint8_t *pMsg)
} break;

case HCI_OPCODE_LE_WRITE_DEF_DATA_LEN:
/* send next command in sequence */
HciReadLocalVerInfoCmd();
break;

case HCI_OPCODE_READ_LOCAL_VER_INFO:
if (hciCoreCb.extResetSeq) {
/* send first extended command */
(*hciCoreCb.extResetSeq)(pMsg, opcode);
HciReadLocalVerInfoCmd();
} else {
/* initialize extended parameters */
hciCoreCb.maxAdvDataLen = 0;
Expand All @@ -242,6 +237,7 @@ void CordioHCIDriver::handle_reset_sequence(uint8_t *pMsg)
}
break;

case HCI_OPCODE_READ_LOCAL_VER_INFO:
case HCI_OPCODE_LE_READ_MAX_ADV_DATA_LEN:
case HCI_OPCODE_LE_READ_NUM_SUP_ADV_SETS:
case HCI_OPCODE_LE_READ_PER_ADV_LIST_SIZE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ class CordioHCITransportDriver {
* packet, ACL packet or EVT packet. Depending on the type of transport
* it can prefix the packet itself.
* @param len Number of bytes to transmit.
* @param pData pointer to the data to transmit.
* @param pData Pointer to the data to transmit. This is an WSF buffer
* and if CORDIO_ZERO_COPY_HCI is enabled we receive ownership.
*
* @return The number of bytes which have been transmited.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ void hciTrSendAclData(void *pContext, uint8_t *pData)
/* transmit ACL header and data */
if (hciDrvWrite(HCI_ACL_TYPE, len, pData) == len)
{
/* free buffer */
hciCoreTxAclComplete(pContext, pData);
#if CORDIO_ZERO_COPY_HCI
/* pData is not freed as the hciDrvWrite took ownership of the WSF buffer */
#else
/* free buffer */
WsfMsgFree(pData);
#endif // CORDIO_ZERO_COPY_HCI
}
}

Expand All @@ -80,7 +84,7 @@ void hciTrSendAclData(void *pContext, uint8_t *pData)
*
* \brief Send a complete HCI command to the transport.
*
* \param pData WSF msg buffer containing an HCI command.
* \param pData WSF msg buffer containing an HCI command. WSF buffer ownership is released by this function.
*
* \return None.
*/
Expand All @@ -98,8 +102,12 @@ void hciTrSendCmd(uint8_t *pData)
/* transmit ACL header and data */
if (hciDrvWrite(HCI_CMD_TYPE, len, pData) == len)
{
/* free buffer */
WsfMsgFree(pData);
#if CORDIO_ZERO_COPY_HCI
/* pData is not freed as the hciDrvWrite took ownership of the WSF buffer */
#else
/* free buffer */
WsfMsgFree(pData);
#endif // CORDIO_ZERO_COPY_HCI
}
}

Expand Down
55 changes: 55 additions & 0 deletions features/FEATURE_BLE/targets/TARGET_CORDIO_LL/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "cordio-ll",
"config": {
"max-advertising-sets": {
"help": "Maximum number of advertising sets.",
"value": 4
},
"max-advertising-reports": {
"help": "Maximum number of pending legacy or extended advertising reports.",
"value": 8
},
"default-extended-advertising-fragmentation-size": {
"help": "Default extended advertising data fragmentation size.",
"value": 64
},
"max-scan-request-events": {
"help": "Maximum scan request received events.",
"value": 4
},
"phy-2m-support": {
"help": "2M PHY supported.",
"value": 1
},
"rx-buffers": {
"help": "Default number of receive buffers.",
"value": 8
},
"phy-coded-support": {
"help": "Coded PHY supported.",
"value": 0
},
"extended-advertising-size": {
"help": "Maximum extended advertising data (and scan data response) size",
"value": 128
},
"max-acl-size": {
"help": "Maximum ACL buffer size",
"value": 256
},
"tx-buffers": {
"help": "Default number of send buffers",
"value": 8
},
"handle-vendor-specific-hci-commands": {
"help": "Handle VS HCI commands. Valid values are 0 (ignore) and 1 (handle).",
"value": 0,
"macro_name": "LHCI_ENABLE_VS"
},
"uart-hci": {
"help": "Does the board have a UART HCI. Valid values are 0 and 1 (must provide UART through PAL).",
"value": 0,
"macro_name": "CHCI_TR_UART"
}
}
}
Loading

0 comments on commit 19e7622

Please sign in to comment.