Skip to content

Feature cordio update 20 05 #13217

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 39 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3e011a9
update host and wsf files
paul-szczepanek-arm Jun 5, 2020
fc59443
hciDrvWrite no longer needed
paul-szczepanek-arm Jun 5, 2020
bb4b58b
porting adaptation layer
paul-szczepanek-arm Jun 8, 2020
764f18c
add crit section to cordio stack pal
paul-szczepanek-arm Jun 8, 2020
313651b
remove nvm
paul-szczepanek-arm Jun 8, 2020
59528d6
expose WsfTimerNextExpiration in the wsf api
paul-szczepanek-arm Jun 8, 2020
4090f31
add missing services header
paul-szczepanek-arm Jun 8, 2020
758b958
missing wsf_types.h include
paul-szczepanek-arm Jun 8, 2020
11dba2e
don't compile debug version of ecc by deafult
paul-szczepanek-arm Jun 8, 2020
260e501
fix cordio configuration
paul-szczepanek-arm Jun 8, 2020
c61f84b
remove pointless heap count
paul-szczepanek-arm Jun 8, 2020
c4afea2
remember if key was authenticated
paul-szczepanek-arm Jun 8, 2020
d3bda92
fix signed writes
paul-szczepanek-arm Jun 8, 2020
ebf9ec9
copy advertising data into the message
paul-szczepanek-arm Jun 9, 2020
a40d0cb
fix error message
paul-szczepanek-arm Jun 9, 2020
c2bc9a4
avoid redundant call on timer init
paul-szczepanek-arm Jun 9, 2020
be80c46
update cordio LL files to 20.05r
paul-szczepanek-arm Jun 10, 2020
fbf55f9
change fake chci into custom chci to resolve naming issues
paul-szczepanek-arm Jun 10, 2020
c2ccc30
enable custom hci transport in config
paul-szczepanek-arm Jun 10, 2020
4ce36b3
missing def arm id in ll_defs
paul-szczepanek-arm Jun 10, 2020
568d0a2
use assembly on gcc
paul-szczepanek-arm Jun 10, 2020
7f23b6d
update nrf cordio ll files
paul-szczepanek-arm Jun 10, 2020
a04102a
switch to timer 2 due to conflict
paul-szczepanek-arm Jun 10, 2020
d9699cf
asm only for gcc
paul-szczepanek-arm Jun 10, 2020
ebd4aed
disable led
paul-szczepanek-arm Jun 10, 2020
dbd58bf
remove unneeded pal
paul-szczepanek-arm Jun 12, 2020
3a46d09
add stubs for iso channels, update config for iso
paul-szczepanek-arm Jun 12, 2020
16cbc97
enum for acl changed name from data to acl to match stack
paul-szczepanek-arm Jun 12, 2020
981eaed
crypto init calls fixed
paul-szczepanek-arm Jun 12, 2020
3316e7f
shutdown timer on deinit
paul-szczepanek-arm Jun 12, 2020
666f2f4
trigger complete callbacks after sending HCI message
paul-szczepanek-arm Jun 12, 2020
bc44299
added timerboundary to config
paul-szczepanek-arm Jun 15, 2020
3de3754
switch to 5.1 api
paul-szczepanek-arm Jun 15, 2020
9354bc2
memory footprint increased
paul-szczepanek-arm Jun 15, 2020
2ffc61a
added timer IRQ handler for TIMER2
paul-szczepanek-arm Jun 19, 2020
f2a6e8b
update comment
paul-szczepanek-arm Jun 22, 2020
c3a39e9
stray tabs removed
paul-szczepanek-arm Jun 22, 2020
3e6e671
make public and random static based on different nrf configs
paul-szczepanek-arm Jul 3, 2020
bd9e819
Merge pull request #13228 from paul-szczepanek-arm/patch-2
0xc0170 Jul 6, 2020
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
  •  
  •  
  •  
9 changes: 7 additions & 2 deletions features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordio",
"macros": [ "WSF_MS_PER_TICK=1" ],
"macros": ["WSF_MS_PER_TICK=1"],
"config": {
"max-connections": {
"help": "Maximum number of connections",
Expand Down Expand Up @@ -71,6 +71,11 @@
"preferred-tx-power": {
"help": "Preferred value of tx power in dbm (-128,127). This value is not guaranteed and relies on existing support in the HCI driver.",
"value": 0
},
"max-eatt-channels": {
"help": "Maximum number of EATT channels per DM connection.",
"value": 1,
"macro_name": "EATT_CONN_CHAN_MAX"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
/* Copyright (c) 2009-2019 Arm Limited
* SPDX-License-Identifier: Apache-2.0
/*************************************************************************************************/
/*!
* \file
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* \brief Attribute protocol client and server API.
*
* http://www.apache.org/licenses/LICENSE-2.0
* Copyright (c) 2009-2019 Arm Ltd. All Rights Reserved.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*************************************************************************************************/
/*!
* \brief Attribute protocol client and server API.
* Copyright (c) 2019-2020 Packetcraft, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*************************************************************************************************/
#ifndef ATT_API_H
Expand Down Expand Up @@ -107,16 +109,21 @@ enum /*!< \brief Internal note: event val
ATTC_EXECUTE_WRITE_RSP, /*!< \brief Execute write response */
ATTC_HANDLE_VALUE_NTF, /*!< \brief Handle value notification */
ATTC_HANDLE_VALUE_IND, /*!< \brief Handle value indication */
ATTC_READ_MULT_VAR_RSP = 16, /*!< \brief Read multiple variable length response */
ATTC_MULT_VALUE_NTF, /*!< \brief Read multiple value notification */
/* ATT server callback events */
ATTS_HANDLE_VALUE_CNF, /*!< \brief Handle value confirmation */
ATTS_MULT_VALUE_CNF, /*!< \brief Handle multiple value confirmation */
ATTS_CCC_STATE_IND, /*!< \brief Client chracteristic configuration state change */
ATTS_DB_HASH_CALC_CMPL_IND, /*!< \brief Database hash calculation complete */
/* ATT common callback events */
ATT_MTU_UPDATE_IND /*!< \brief Negotiated MTU value */
ATT_MTU_UPDATE_IND, /*!< \brief Negotiated MTU value */
ATT_EATT_CONN_CMPL_IND, /*!< \brief EATT Connect channels complete */
ATT_EATT_RECONFIG_CMPL_IND /*!< \brief EATT Reconfigure complete */
};

/*! \brief ATT callback events */
#define ATT_CBACK_END ATT_MTU_UPDATE_IND /*!< \brief ATT callback event ending value */
#define ATT_CBACK_END ATT_EATT_RECONFIG_CMPL_IND /*!< \brief ATT callback event ending value */
/**@}*/

/** \name ATT Client Awareness of Database Change
Expand Down Expand Up @@ -146,6 +153,18 @@ typedef struct
uint8_t numPrepWrites; /*!< \brief number of queued prepare writes supported by server */
} attCfg_t;

/*! \brief EATT run-time configurable parameters */
typedef struct
{
uint16_t mtu; /*!< \brief MTU */
uint16_t mps; /*!< \brief MPS */
bool_t initiateEatt; /*!< \brief Open EATT channels automatically on connect */
uint8_t authoriz; /*!< \brief Authorization required */
uint8_t secLevel; /*!< \brief Security level required */
uint8_t numChans; /*!< \brief Number of enhanced l2cap channels per connection */
uint8_t *pPriorityTbl; /*!< \brief Min priority required for each channel */
} eattCfg_t;

/*!
* \brief ATT callback event
*
Expand Down Expand Up @@ -386,6 +405,9 @@ typedef void (*attsCccCback_t)(attsCccEvt_t *pEvt);
/**@{*/
/*! \brief Configuration pointer */
extern attCfg_t *pAttCfg;

/*! \brief Enhanced configuration pointer */
extern eattCfg_t *pEattCfg;
/**@}*/
/*! \} */ /* STACK_INIT */

Expand Down Expand Up @@ -865,10 +887,10 @@ void AttsCsfGetFeatures(dmConnId_t connId, uint8_t *pCsfOut, uint8_t pCsfOutLen)
*
* \param connId DM connection ID.
*
* \return Client's change-aware state.
* \return Client's change-aware state. See ::attClientAwareStates.
*/
/*************************************************************************************************/
uint8_t AttsCsfGetChangeAwareState(dmConnId_t connId);
uint8_t AttsCsfGetClientChangeAwareState(dmConnId_t connId);

/*************************************************************************************************/
/*!
Expand All @@ -884,7 +906,7 @@ uint8_t AttsCsfGetChangeAwareState(dmConnId_t connId);
* application) will have updated all persistent records prior to calling this function.
*/
/*************************************************************************************************/
void AttsCsfSetClientsChangeAwarenessState(dmConnId_t connId, uint8_t state);
void AttsCsfSetClientChangeAwareState(dmConnId_t connId, uint8_t state);

/*************************************************************************************************/
/*!
Expand Down Expand Up @@ -1273,6 +1295,36 @@ void AttcDiscCharStart(dmConnId_t connId, attcDiscCb_t *pCb);
/*************************************************************************************************/
uint8_t AttcDiscCharCmpl(attcDiscCb_t *pCb, attEvt_t *pMsg);

/*************************************************************************************************/
/*!
* \brief This utility function starts service include discovery for a service on a peer device.
* The service must have been previously discovered by calling AttcDiscService() and
* AttcDiscServiceCmpl().
*
* \param connId DM connection ID.
* \param pCb Pointer to service discovery control block.
*
* \return None.
*/
/*************************************************************************************************/
void AttcDiscIncSvcStart(dmConnId_t connId, attcDiscCb_t *pCb);

/*************************************************************************************************/
/*!
* \brief This utility function processes a service include discovery result. It should be
* called when an ATTC_READ_BY_TYPE_RSP allback event is received after service include
* discovery is initiated by calling AttcDiscIncSvcStart().
*
* \param pCb Pointer to service discovery control block.
* \param pMsg ATT callback event message.
*
* \return ATT_CONTINUING if successful and discovery procedure is continuing.
* ATT_SUCCESS if discovery procedure completed successfully.
* Otherwise the discovery procedure failed.
*/
/*************************************************************************************************/
uint8_t AttcDiscIncSvcCmpl(attcDiscCb_t *pCb, attEvt_t *pMsg);

/*************************************************************************************************/
/*!
* \brief This utility function starts characteristic configuration for characteristics on a
Expand Down Expand Up @@ -1321,12 +1373,17 @@ uint8_t AttcDiscConfigResume(dmConnId_t connId, attcDiscCb_t *pCb);

/*************************************************************************************************/
/*!
* \brief For internal use only.
* \brief Initiate an attribute protocol Exchange MTU Request.
*
* \param connId DM connection ID.
* \param mtu Attribute protocol MTU.
*
* \return None.
*
* \note The Exchange MTU Request will be initiated automatically on a master connection.
*
* \note This API can be used by the application to initiate an Exchange MTU Request on slave
* connections.
*/
/*************************************************************************************************/
void AttcMtuReq(dmConnId_t connId, uint16_t mtu);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
/* Copyright (c) 2009-2019 Arm Limited
* SPDX-License-Identifier: Apache-2.0
/*************************************************************************************************/
/*!
* \file
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* \brief Attribute protocol constants and definitions from the Bluetooth specification.
*
* http://www.apache.org/licenses/LICENSE-2.0
* Copyright (c) 2009-2019 Arm Ltd. All Rights Reserved.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*************************************************************************************************/
/*!
* \brief Attribute protocol constants and definitions from the Bluetooth specification.
* Copyright (c) 2019-2020 Packetcraft, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*************************************************************************************************/
#ifndef ATT_DEFS_H
Expand Down Expand Up @@ -101,15 +103,20 @@ extern "C" {
#define ATT_ERR_UNDEFINED 0x75 /*!< \brief Other undefined error */
#define ATT_ERR_REQ_NOT_FOUND 0x76 /*!< \brief Required characteristic not found */
#define ATT_ERR_MTU_EXCEEDED 0x77 /*!< \brief Attribute PDU length exceeded MTU size */
#define ATT_CONTINUING 0x78 /*!< \brief Procedure continuing */
#define ATT_RSP_PENDING 0x79 /*!< \brief Responsed delayed pending higher layer */
#define ATT_ERR_NO_CHANNEL 0x78 /*!< \brief No enhanced channel available */
#define ATT_CONTINUING 0x79 /*!< \brief Procedure continuing */
#define ATT_RSP_PENDING 0x7A /*!< \brief Response delayed pending higher layer */
/**@}*/

/** \name ATT Application Error Codes
* These codes may be sent to application but are not present in any ATT PDU.
*/
/**@{*/
#define ATT_ERR_VALUE_RANGE 0x80 /*!< \brief Value out of range */
#define ATT_ERR_INVALID_CHANGE_CTR 0x80 /*!< \brief Invalid change counter */
#define ATT_ERR_OPCODE_NOT_SUPPORTED 0x81 /*!< \brief Opcode out of range */
#define ATT_ERR_MUTE_DISABLE 0x82 /*!< \brief Mute disable */
#define ATT_ERR_VALUE_RANGE_x83 0x83 /*!< \brief Value out of range 0x83 */
/**@}*/

/** \name ATT HCI Error Status
Expand Down Expand Up @@ -156,7 +163,9 @@ extern "C" {
#define ATT_PDU_VALUE_NTF 0x1B /*!< \brief Handle value notification */
#define ATT_PDU_VALUE_IND 0x1D /*!< \brief Handle value indication */
#define ATT_PDU_VALUE_CNF 0x1E /*!< \brief Handle value confirmation */
#define ATT_PDU_MAX 0x1F /*!< \brief PDU Maximum */
#define ATT_PDU_READ_MULT_VAR_REQ 0x20 /*!< \brief Read multiple variable length request */
#define ATT_PDU_READ_MULT_VAR_RSP 0x21 /*!< \brief Read multiple variable length response */
#define ATT_PDU_MULT_VALUE_NTF 0x23 /*!< \brief Handle value multiple notification */
/**@}*/

/** \name ATT PDU Length Fields
Expand Down Expand Up @@ -191,6 +200,9 @@ extern "C" {
#define ATT_VALUE_NTF_LEN 3 /*!< \brief Value notification length. */
#define ATT_VALUE_IND_LEN 3 /*!< \brief Value indication length. */
#define ATT_VALUE_CNF_LEN 1 /*!< \brief Value confirmation length. */
#define ATT_READ_MULT_VAR_REQ_LEN 1 /*!< \brief Base read multiple variable request length. */
#define ATT_READ_MULT_VAR_RSP_LEN 1 /*!< \brief Base read multiple variable response length. */
#define ATT_PDU_MULT_VALUE_NTF_LEN 1 /*!< \brief Base multiple variable notification length. */
/**@}*/

/** \name ATT Find Information Response Format
Expand Down Expand Up @@ -317,12 +329,22 @@ extern "C" {
* Flags of features supported by the GATT Client
*/
/**@{*/
#define ATTS_CSF_ROBUST_CACHING 1 /*!< \brief Robust caching. */
#define ATTS_CSF_OCT0_FEATURES ATTS_CSF_ROBUST_CACHING /*!< \brief Mask of all client supported features. */
#define ATTS_CSF_ROBUST_CACHING (1<<0) /*!< \brief Robust caching. */
#define ATTS_CSF_EATT_BEARER (1<<1) /*!< \brief Enhanced ATT Bearer. */
#define ATTS_CSF_MULTI_VAL_NTF (1<<2) /*!< \brief Multiple Handle Value Notifications. */

#define ATTS_CSF_ALL_FEATURES (0x7) /*!< \brief Mask of all client supported features. */

#define ATT_CSF_LEN 1 /*!< \brief Length of client supported features array. */
/**@}*/

/** \name GATT Server Supported Features
* Flags of features supported by the GATT Server
*/
/**@{*/
#define ATTS_SSF_EATT (1<<0) /*!< \brief Enhanced ATT supported. */
/**@}*/

/*! \} */ /* STACK_ATT_API */

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
/* Copyright (c) 2009-2019 Arm Limited
* SPDX-License-Identifier: Apache-2.0
/*************************************************************************************************/
/*!
* \file
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* \brief Interface to ATT event handler.
*
* http://www.apache.org/licenses/LICENSE-2.0
* Copyright (c) 2009-2018 Arm Ltd. All Rights Reserved.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*************************************************************************************************/
/*!
* \brief Interface to ATT event handler.
* Copyright (c) 2019 Packetcraft, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*************************************************************************************************/
#ifndef ATT_HANDLER_H
Expand Down
Loading