mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #9813 from paul-szczepanek-arm/cordio-cfg
BLE: Cordio build time configuration through mbed_lib.jsonpull/9842/head
commit
d0881ad259
|
@ -22,6 +22,11 @@ implementation.
|
||||||
* `mbed_os_adaptation`: Headers of the interface responsible for the bridge
|
* `mbed_os_adaptation`: Headers of the interface responsible for the bridge
|
||||||
between BLE API and the Cordio stack.
|
between BLE API and the Cordio stack.
|
||||||
|
|
||||||
|
## Build time configuration
|
||||||
|
|
||||||
|
Build time configuration may be controlled through options set in:
|
||||||
|
`features\FEATURE_BLE\targets\TARGET_CORDIO\mbed_lib.json`
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
* [HCI architecture](doc/HCIAbstraction.md)
|
* [HCI architecture](doc/HCIAbstraction.md)
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
{
|
||||||
|
"name": "cordio",
|
||||||
|
"config": {
|
||||||
|
"max-connections": {
|
||||||
|
"help": "Maximum number of connections",
|
||||||
|
"value": 3,
|
||||||
|
"macro_name": "DM_CONN_MAX"
|
||||||
|
},
|
||||||
|
"max-syncs": {
|
||||||
|
"help": "Maximum number of periodic advertising synchronizations",
|
||||||
|
"value": 1,
|
||||||
|
"macro_name": "DM_SYNC_MAX"
|
||||||
|
},
|
||||||
|
"max-advertising-sets": {
|
||||||
|
"help": "Number of supported advertising sets: must be set to 1 for legacy advertising",
|
||||||
|
"value": 3,
|
||||||
|
"macro_name": "DM_NUM_ADV_SETS"
|
||||||
|
},
|
||||||
|
"max-phys": {
|
||||||
|
"help": "Number of scanner and initiator PHYs (LE 1M, LE 2M and LE Coded): must be set to 1 for legacy scanner and initiator",
|
||||||
|
"value": 3,
|
||||||
|
"macro_name": "DM_NUM_PHYS"
|
||||||
|
},
|
||||||
|
"max-l2cap-channels": {
|
||||||
|
"help": "Maximum number of connection oriented channels",
|
||||||
|
"value": 8,
|
||||||
|
"macro_name": "L2C_COC_CHAN_MAX"
|
||||||
|
},
|
||||||
|
"max-l2cap-clients": {
|
||||||
|
"help": "Maximum number of connection oriented channel registered clients",
|
||||||
|
"value": 4,
|
||||||
|
"macro_name": "L2C_COC_REG_MAX"
|
||||||
|
},
|
||||||
|
"max-att-writes": {
|
||||||
|
"help": "Maximum number of simultaneous ATT write commands",
|
||||||
|
"value": 1,
|
||||||
|
"macro_name": "ATT_NUM_SIMUL_WRITE_CMD"
|
||||||
|
},
|
||||||
|
"max-att-notifications": {
|
||||||
|
"help": "Maximum number of simultaneous ATT notifications",
|
||||||
|
"value": 1,
|
||||||
|
"macro_name": "ATT_NUM_SIMUL_NTF"
|
||||||
|
},
|
||||||
|
"max-smp-devices": {
|
||||||
|
"help": "Max number of devices in the security database",
|
||||||
|
"value": 3,
|
||||||
|
"macro_name": "SMP_DB_MAX_DEVICES"
|
||||||
|
},
|
||||||
|
"desired-att-mtu": {
|
||||||
|
"help": "Desired ATT_MTU, this needs to be between 23 and 517 (inclusive).",
|
||||||
|
"value": 23
|
||||||
|
},
|
||||||
|
"max-prepared-writes": {
|
||||||
|
"help": "Number of queued prepare writes supported by server.",
|
||||||
|
"value": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -62,13 +62,17 @@ l2cCfg_t *pL2cCfg = &l2cCfg;
|
||||||
ATT
|
ATT
|
||||||
**************************************************************************************************/
|
**************************************************************************************************/
|
||||||
|
|
||||||
|
#if MBED_CONF_CORDIO_DESIRED_ATT_MTU < ATT_DEFAULT_MTU || MBED_CONF_CORDIO_DESIRED_ATT_MTU > ATT_MAX_MTU
|
||||||
|
#error "CORDIO_CFG_DESIRED_ATT_MTU value is outside valid range"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Configuration structure */
|
/* Configuration structure */
|
||||||
attCfg_t attCfg =
|
attCfg_t attCfg =
|
||||||
{
|
{
|
||||||
15, /* ATT server service discovery connection idle timeout in seconds */
|
15, /* ATT server service discovery connection idle timeout in seconds */
|
||||||
ATT_DEFAULT_MTU, /* desired ATT MTU */
|
MBED_CONF_CORDIO_DESIRED_ATT_MTU, /* desired ATT MTU */
|
||||||
ATT_MAX_TRANS_TIMEOUT, /* transcation timeout in seconds */
|
ATT_MAX_TRANS_TIMEOUT, /* transaction timeout in seconds */
|
||||||
4 /* number of queued prepare writes supported by server */
|
MBED_CONF_CORDIO_MAX_PREPARED_WRITES /* number of queued prepare writes supported by server */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Configuration pointer */
|
/* Configuration pointer */
|
||||||
|
|
Loading…
Reference in New Issue