From 6a2b6b891a8adc2f40ebab1a505466b3ba1882d3 Mon Sep 17 00:00:00 2001 From: paul-szczepanek-arm <33840200+paul-szczepanek-arm@users.noreply.github.com> Date: Mon, 25 Feb 2019 09:49:16 +0000 Subject: [PATCH] use existing macro names --- .../targets/TARGET_CORDIO/mbed_lib.json | 44 +++++++++---------- .../ble-host/sources/stack/cfg/cfg_stack.c | 8 ++-- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json b/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json index f5205abebf..0f86b9c8af 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/mbed_lib.json @@ -1,60 +1,58 @@ { "name": "cordio", "config": { - "cordio-cfg-max-connections": { + "max-connections": { "help": "Maximum number of connections", "value": 3, - "macro_name": "CORDIO_CFG_MAX_CONNECTIONS" + "macro_name": "DM_CONN_MAX" }, - "cordio-cfg-max-syncs": { + "max-syncs": { "help": "Maximum number of periodic advertising synchronizations", "value": 1, - "macro_name": "CORDIO_CFG_MAX_SYNCS" + "macro_name": "DM_SYNC_MAX" }, - "cordio-cfg-max-advertising-sets": { + "max-advertising-sets": { "help": "Number of supported advertising sets: must be set to 1 for legacy advertising", "value": 3, - "macro_name": "CORDIO_CFG_MAX_ADVERTISING_SETS" + "macro_name": "DM_NUM_ADV_SETS" }, - "cordio-cfg-max-phys": { + "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": "CORDIO_CFG_MAX_PHYS" + "macro_name": "DM_NUM_PHYS" }, - "cordio-cfg-max-l2cap-channels": { + "max-l2cap-channels": { "help": "Maximum number of connection oriented channels", "value": 8, - "macro_name": "CORDIO_CFG_MAX_L2CAP_CHANNELS" + "macro_name": "L2C_COC_CHAN_MAX" }, - "cordio-cfg-max-l2cap-clients": { + "max-l2cap-clients": { "help": "Maximum number of connection oriented channel registered clients", "value": 4, - "macro_name": "CORDIO_CFG_MAX_L2CAP_CLIENTS" + "macro_name": "L2C_COC_REG_MAX" }, - "cordio-cfg-max-att-writes": { + "max-att-writes": { "help": "Maximum number of simultaneous ATT write commands", "value": 1, - "macro_name": "CORDIO_CFG_MAX_ATT_WRITES" + "macro_name": "ATT_NUM_SIMUL_WRITE_CMD" }, - "cordio-cfg-max-att-notifications": { + "max-att-notifications": { "help": "Maximum number of simultaneous ATT notifications", "value": 1, - "macro_name": "CORDIO_CFG_MAX_ATT_NOTIFICATIONS" + "macro_name": "ATT_NUM_SIMUL_NTF" }, - "cordio-cfg-max-smp-devices": { + "max-smp-devices": { "help": "Max number of devices in the security database", "value": 3, - "macro_name": "CORDIO_CFG_MAX_SMP_DEVICES" + "macro_name": "SMP_DB_MAX_DEVICES" }, - "cordio-cfg-desired-att-mtu": { + "desired-att-mtu": { "help": "Desired ATT_MTU, this needs to be between 23 and 517 (inclusive).", "value": 23, - "macro_name": "CORDIO_CFG_DESIRED_ATT_MTU" }, - "cordio-cfg-max-prepared-writes": { + "max-prepared-writes": { "help": "Number of queued prepare writes supported by server.", - "value": 23, - "macro_name": "CORDIO_CFG_MAX_PREPARED_WRITES" + "value": 4, } } } \ No newline at end of file diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/cordio_stack/ble-host/sources/stack/cfg/cfg_stack.c b/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/cordio_stack/ble-host/sources/stack/cfg/cfg_stack.c index e423ccfc7b..89bfb89077 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/cordio_stack/ble-host/sources/stack/cfg/cfg_stack.c +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/stack/cordio_stack/ble-host/sources/stack/cfg/cfg_stack.c @@ -69,10 +69,10 @@ l2cCfg_t *pL2cCfg = &l2cCfg; /* Configuration structure */ attCfg_t attCfg = { - 15, /* ATT server service discovery connection idle timeout in seconds */ - CORDIO_CFG_DESIRED_ATT_MTU, /* desired ATT MTU */ - ATT_MAX_TRANS_TIMEOUT, /* transcation timeout in seconds */ - CORDIO_CFG_MAX_PREPARED_WRITES /* number of queued prepare writes supported by server */ + 15, /* ATT server service discovery connection idle timeout in seconds */ + MBED_CONF_CORDIO_DESIRED_ATT_MT, /* desired ATT MTU */ + ATT_MAX_TRANS_TIMEOUT, /* transcation timeout in seconds */ + MBED_CONF_CORDIO_MAX_PREPARED_WRITES /* number of queued prepare writes supported by server */ }; /* Configuration pointer */