mirror of https://github.com/ARMmbed/mbed-os.git
type translation
parent
8794c0b43b
commit
78a4bdda8a
|
@ -440,7 +440,7 @@ class GapExtendedAdvertisingParams {
|
|||
return _notifyOnScan;
|
||||
}
|
||||
|
||||
/**/
|
||||
/* helper get functions */
|
||||
|
||||
uint32_t getMinPrimaryInterval() const {
|
||||
return _minInterval;
|
||||
|
@ -450,22 +450,34 @@ class GapExtendedAdvertisingParams {
|
|||
return _maxInterval;
|
||||
}
|
||||
|
||||
BLEProtocol::AddressBytes_t* getPeerAddress() {
|
||||
BLEProtocol::AddressBytes_t* getPeerAddress() const {
|
||||
return &_peerAddress;
|
||||
};
|
||||
|
||||
ble::peer_address_type_t getPeerAddressType() {
|
||||
ble::peer_address_type_t getPeerAddressType() const {
|
||||
return _peerAddressType;
|
||||
};
|
||||
|
||||
ble::phy_t getPrimaryPhy() {
|
||||
ble::phy_t getPrimaryPhy() const {
|
||||
return _primaryPhy;
|
||||
}
|
||||
|
||||
ble::phy_t getSecondaryPhy() {
|
||||
ble::phy_t getSecondaryPhy() const {
|
||||
return _secondaryPhy;
|
||||
}
|
||||
|
||||
bool getChannel37() const {
|
||||
return _channel37;
|
||||
}
|
||||
|
||||
bool getChannel38() const {
|
||||
return _channel37;
|
||||
}
|
||||
|
||||
bool getChannel39() const {
|
||||
return _channel37;
|
||||
}
|
||||
|
||||
private:
|
||||
ble::advertising_type_t _advType;
|
||||
uint32_t _minInterval;
|
||||
|
|
|
@ -211,6 +211,9 @@ struct advertising_channel_map_t : SafeEnum<advertising_channel_map_t, uint8_t>
|
|||
*/
|
||||
advertising_channel_map_t(type value) :
|
||||
SafeEnum<advertising_channel_map_t, uint8_t>(value) { }
|
||||
|
||||
advertising_channel_map_t(bool ch37, bool ch38, bool ch39) {
|
||||
SafeEnum<advertising_channel_map_t, uint8_t>(ch37 | (ch38 << 1) | (ch39 << 2)) { }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1619,11 +1619,10 @@ ble_error_t GenericGap::setAdvertisingParams(AdvHandle_t handle, const GapAdvert
|
|||
return BLE_ERROR_NONE;
|
||||
}
|
||||
|
||||
pal::advertising_event_properties_t event_properties;//TODO
|
||||
ble::advertising_type_t adv_type = params->getAdvertisingType();
|
||||
pal::advertising_event_properties_t event_properties;
|
||||
|
||||
AddressUseType_t use_type;
|
||||
switch(adv_type) {
|
||||
switch(params->getAdvertisingType()) {
|
||||
case ADV_SCANNABLE_UNDIRECTED:
|
||||
case ADV_NON_CONNECTABLE_UNDIRECTED:
|
||||
case EXT_ADV_NON_CONNECTABLE_DIRECTED:
|
||||
|
@ -1658,7 +1657,7 @@ ble_error_t GenericGap::setAdvertisingParams(AdvHandle_t handle, const GapExtend
|
|||
return BLE_ERROR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
pal::advertising_channel_map_t channel_map; /*TODO translate*/
|
||||
pal::advertising_channel_map_t channel_map(params->getChannel37(), params->getChannel38(), params->getChannel39());
|
||||
pal::advertising_event_properties_t event_properties;//TODO
|
||||
//params->getAdvertisingType()
|
||||
|
||||
|
|
Loading…
Reference in New Issue