Skip to content

BLE: update Cordio link layer to 19.2 #10542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9259223
cordi link layer 19.02 sources added
paul-szczepanek-arm Mar 6, 2019
c06beba
cordio LL adaptation and config
paul-szczepanek-arm Mar 6, 2019
8ff6d1f
add doxygen
paul-szczepanek-arm Mar 7, 2019
3326490
move config to nordic ll
paul-szczepanek-arm Mar 7, 2019
175caab
move nordic ll to target nordic
paul-szczepanek-arm Mar 7, 2019
f5713d9
handle all types
paul-szczepanek-arm Mar 8, 2019
fbbd1ea
cleanup json
paul-szczepanek-arm Mar 8, 2019
552ca06
translate hci types
paul-szczepanek-arm Mar 8, 2019
be53275
use pal version of load bd address
paul-szczepanek-arm Mar 11, 2019
b1a246c
service immediately after sending
paul-szczepanek-arm Mar 11, 2019
905ac0e
wsf buffer transfers owenrship to controller
paul-szczepanek-arm Mar 12, 2019
a47a236
handle extended reset
paul-szczepanek-arm Mar 12, 2019
864dae7
use TIMER2 instead
paul-szczepanek-arm Mar 19, 2019
c39aeac
update LL runtime config to new version
paul-szczepanek-arm Mar 28, 2019
95de5d6
fix releaseing the WSF msg too early
paul-szczepanek-arm Mar 28, 2019
195da80
review comments addressed
paul-szczepanek-arm Apr 1, 2019
1b71206
zero copy HCI as a config option
paul-szczepanek-arm Apr 1, 2019
ca8f1ec
configs in mbed json
paul-szczepanek-arm Apr 2, 2019
1dea034
removed stray comma
paul-szczepanek-arm Apr 8, 2019
55dbcee
remove usage of gpio and leds from nordic cordio LL as it interferes …
paul-szczepanek-arm Apr 17, 2019
4ff35c7
license updated
paul-szczepanek-arm Apr 18, 2019
4ccc282
moved config to target nordic
paul-szczepanek-arm May 10, 2019
de61927
config now applies to MCU_840 instead of only DK
paul-szczepanek-arm May 10, 2019
ebca224
fix merge conflixt
paul-szczepanek-arm May 10, 2019
d55ba0a
fix typo
paul-szczepanek-arm May 13, 2019
368231e
config fixed for LL hci
paul-szczepanek-arm May 13, 2019
f497c3d
ifdef 52840 crypto
paul-szczepanek-arm May 13, 2019
577ba54
cryptocell acceleration as an option
paul-szczepanek-arm May 16, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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