Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
AFR : NimBLE - Add support of slave connection interval range in adve…
Browse files Browse the repository at this point in the history
…rtisement data (#1542)
  • Loading branch information
dhrishi authored and ravibhagavandas committed Nov 22, 2019
1 parent fa856a0 commit 773ba74
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vendors/espressif/boards/esp32/ports/ble/nimble/iot_ble_hal_gap.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,17 @@ BTStatus_t prvBTSetAdvData( uint8_t ucAdapterIf,
fields.mfg_data_len = usManufacturerLen;
}


if( ( pxParams->ulMinInterval != 0 ) && ( pxParams->ulMaxInterval != 0 ) )
{
uint8_t slave_itvl_range[ 4 ];
slave_itvl_range[ 0 ] = ( pxParams->ulMinInterval ) & 0xFF;
slave_itvl_range[ 1 ] = ( pxParams->ulMinInterval >> 8 ) & 0xFF;
slave_itvl_range[ 2 ] = ( pxParams->ulMaxInterval ) & 0xFF;
slave_itvl_range[ 3 ] = ( pxParams->ulMaxInterval >> 8 ) & 0xFF;
fields.slave_itvl_range = slave_itvl_range;
}

if( usServiceDataLen && pcServiceData )
{
fields.svc_data_uuid128 = ( uint8_t * ) pcServiceData;
Expand Down

0 comments on commit 773ba74

Please sign in to comment.