config changes
Fork of nRF51822 by
Revision 577:d38f01a3e701, committed 2016-01-11
- Comitter:
- vcoubard
- Date:
- Mon Jan 11 10:19:25 2016 +0000
- Parent:
- 576:b699791e1dbc
- Child:
- 578:78f69f1be114
- Commit message:
- Synchronized with git rev fd8b73f9
Author: Vincent Coubard
Merge pull request #87 from andresag01/develop
Improve shutdown to clear BLE API and not just SD
Changed in this revision
--- a/module.json Mon Jan 11 10:19:24 2016 +0000 +++ b/module.json Mon Jan 11 10:19:25 2016 +0000 @@ -1,6 +1,6 @@ { "name": "ble-nrf51822", - "version": "2.2.5", + "version": "2.2.6", "description": "Nordic stack and drivers for the mbed BLE API.", "keywords": [ "Bluetooth", @@ -24,7 +24,7 @@ } ], "dependencies": { - "ble": "^2.1.11", + "ble": "^2.1.15", "nrf51-sdk": "^1.0.0" }, "extraIncludes": [
--- a/source/btle/btle.cpp Mon Jan 11 10:19:24 2016 +0000 +++ b/source/btle/btle.cpp Mon Jan 11 10:19:25 2016 +0000 @@ -157,8 +157,8 @@ const ble_gap_addr_t *own = &p_ble_evt->evt.gap_evt.params.connected.own_addr; gap.processConnectionEvent(handle, role, - static_cast<Gap::AddressType_t>(peer->addr_type), peer->addr, - static_cast<Gap::AddressType_t>(own->addr_type), own->addr, + static_cast<BLEProtocol::AddressType_t>(peer->addr_type), peer->addr, + static_cast<BLEProtocol::AddressType_t>(own->addr_type), own->addr, params); break; }
--- a/source/nRF5xGap.cpp Mon Jan 11 10:19:24 2016 +0000 +++ b/source/nRF5xGap.cpp Mon Jan 11 10:19:25 2016 +0000 @@ -387,7 +387,7 @@ @code uint8_t device_address[6] = { 0xca, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0 }; - nrf.getGap().setAddress(Gap::ADDR_TYPE_RANDOM_STATIC, device_address); + nrf.getGap().setAddress(Gap::BLEProtocol::AddressType::RANDOM_STATIC, device_address); @endcode */ @@ -401,12 +401,12 @@ When using Random Private addresses, the cycle mode must be Auto. In auto mode, the given address is ignored. */ - if ((type == ADDR_TYPE_PUBLIC) || (type == ADDR_TYPE_RANDOM_STATIC)) + if ((type == BLEProtocol::AddressType::PUBLIC) || (type == BLEProtocol::AddressType::RANDOM_STATIC)) { cycle_mode = BLE_GAP_ADDR_CYCLE_MODE_NONE; memcpy(dev_addr.addr, address, ADDR_LEN); } - else if ((type == ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE) || (type == ADDR_TYPE_RANDOM_PRIVATE_NON_RESOLVABLE)) + else if ((type == BLEProtocol::AddressType::RANDOM_PRIVATE_RESOLVABLE) || (type == BLEProtocol::AddressType::RANDOM_PRIVATE_NON_RESOLVABLE)) { cycle_mode = BLE_GAP_ADDR_CYCLE_MODE_AUTO; // address is ignored when in auto mode