Skip to content

Commit 19e7622

Browse files
authored
Merge pull request #10666 from ARMmbed/feature-nrf52-sdk15
Nordic SDK v15 Update
2 parents a4738fa + 9bf2d0a commit 19e7622

File tree

856 files changed

+126645
-81106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

856 files changed

+126645
-81106
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,9 @@ void CordioHCIDriver::handle_reset_sequence(uint8_t *pMsg)
223223
} break;
224224

225225
case HCI_OPCODE_LE_WRITE_DEF_DATA_LEN:
226-
/* send next command in sequence */
227-
HciReadLocalVerInfoCmd();
228-
break;
229-
230-
case HCI_OPCODE_READ_LOCAL_VER_INFO:
231226
if (hciCoreCb.extResetSeq) {
232227
/* send first extended command */
233-
(*hciCoreCb.extResetSeq)(pMsg, opcode);
228+
HciReadLocalVerInfoCmd();
234229
} else {
235230
/* initialize extended parameters */
236231
hciCoreCb.maxAdvDataLen = 0;
@@ -242,6 +237,7 @@ void CordioHCIDriver::handle_reset_sequence(uint8_t *pMsg)
242237
}
243238
break;
244239

240+
case HCI_OPCODE_READ_LOCAL_VER_INFO:
245241
case HCI_OPCODE_LE_READ_MAX_ADV_DATA_LEN:
246242
case HCI_OPCODE_LE_READ_NUM_SUP_ADV_SETS:
247243
case HCI_OPCODE_LE_READ_PER_ADV_LIST_SIZE:

features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCITransportDriver.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class CordioHCITransportDriver {
5555
* packet, ACL packet or EVT packet. Depending on the type of transport
5656
* it can prefix the packet itself.
5757
* @param len Number of bytes to transmit.
58-
* @param pData pointer to the data to transmit.
58+
* @param pData Pointer to the data to transmit. This is an WSF buffer
59+
* and if CORDIO_ZERO_COPY_HCI is enabled we receive ownership.
5960
*
6061
* @return The number of bytes which have been transmited.
6162
*/

features/FEATURE_BLE/targets/TARGET_CORDIO/stack_adaptation/hci_tr.c

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ void hciTrSendAclData(void *pContext, uint8_t *pData)
6868
/* transmit ACL header and data */
6969
if (hciDrvWrite(HCI_ACL_TYPE, len, pData) == len)
7070
{
71-
/* free buffer */
72-
hciCoreTxAclComplete(pContext, pData);
71+
#if CORDIO_ZERO_COPY_HCI
72+
/* pData is not freed as the hciDrvWrite took ownership of the WSF buffer */
73+
#else
74+
/* free buffer */
75+
WsfMsgFree(pData);
76+
#endif // CORDIO_ZERO_COPY_HCI
7377
}
7478
}
7579

@@ -80,7 +84,7 @@ void hciTrSendAclData(void *pContext, uint8_t *pData)
8084
*
8185
* \brief Send a complete HCI command to the transport.
8286
*
83-
* \param pData WSF msg buffer containing an HCI command.
87+
* \param pData WSF msg buffer containing an HCI command. WSF buffer ownership is released by this function.
8488
*
8589
* \return None.
8690
*/
@@ -98,8 +102,12 @@ void hciTrSendCmd(uint8_t *pData)
98102
/* transmit ACL header and data */
99103
if (hciDrvWrite(HCI_CMD_TYPE, len, pData) == len)
100104
{
101-
/* free buffer */
102-
WsfMsgFree(pData);
105+
#if CORDIO_ZERO_COPY_HCI
106+
/* pData is not freed as the hciDrvWrite took ownership of the WSF buffer */
107+
#else
108+
/* free buffer */
109+
WsfMsgFree(pData);
110+
#endif // CORDIO_ZERO_COPY_HCI
103111
}
104112
}
105113

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"name": "cordio-ll",
3+
"config": {
4+
"max-advertising-sets": {
5+
"help": "Maximum number of advertising sets.",
6+
"value": 4
7+
},
8+
"max-advertising-reports": {
9+
"help": "Maximum number of pending legacy or extended advertising reports.",
10+
"value": 8
11+
},
12+
"default-extended-advertising-fragmentation-size": {
13+
"help": "Default extended advertising data fragmentation size.",
14+
"value": 64
15+
},
16+
"max-scan-request-events": {
17+
"help": "Maximum scan request received events.",
18+
"value": 4
19+
},
20+
"phy-2m-support": {
21+
"help": "2M PHY supported.",
22+
"value": 1
23+
},
24+
"rx-buffers": {
25+
"help": "Default number of receive buffers.",
26+
"value": 8
27+
},
28+
"phy-coded-support": {
29+
"help": "Coded PHY supported.",
30+
"value": 0
31+
},
32+
"extended-advertising-size": {
33+
"help": "Maximum extended advertising data (and scan data response) size",
34+
"value": 128
35+
},
36+
"max-acl-size": {
37+
"help": "Maximum ACL buffer size",
38+
"value": 256
39+
},
40+
"tx-buffers": {
41+
"help": "Default number of send buffers",
42+
"value": 8
43+
},
44+
"handle-vendor-specific-hci-commands": {
45+
"help": "Handle VS HCI commands. Valid values are 0 (ignore) and 1 (handle).",
46+
"value": 0,
47+
"macro_name": "LHCI_ENABLE_VS"
48+
},
49+
"uart-hci": {
50+
"help": "Does the board have a UART HCI. Valid values are 0 and 1 (must provide UART through PAL).",
51+
"value": 0,
52+
"macro_name": "CHCI_TR_UART"
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)