Skip to content

Commit 92dc3ed

Browse files
committed
done with config clean up
1 parent 2ddfe62 commit 92dc3ed

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

libraries/Bluefruit52Lib/src/BLEGap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ void BLEGap::_eventHandler(ble_evt_t* evt)
267267

268268
case BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST:
269269
{
270-
peer->att_mtu = minof(evt->evt.gatts_evt.params.exchange_mtu_request.client_rx_mtu, BLEGATT_ATT_MTU_MAX);
270+
peer->att_mtu = minof(evt->evt.gatts_evt.params.exchange_mtu_request.client_rx_mtu, Bluefruit.getMaxMtu());
271271
VERIFY_STATUS( sd_ble_gatts_exchange_mtu_reply(conn_handle, peer->att_mtu), );
272272

273273
LOG_LV1("GAP", "ATT MTU is changed to %d", peer->att_mtu);

libraries/Bluefruit52Lib/src/bluefruit.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444

4545
/* Note changing these parameters will affect APP_RAM_BASE
4646
* --> need to update RAM region in linker file
47-
*
48-
* default value are
4947
* - BLEGATT_ATT_MTU_MAX from 23 (default) to 247
5048
*/
5149

libraries/Bluefruit52Lib/src/services/BLEUart.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void BLEUart::bufferTXD(uint8_t enable)
160160
if ( _tx_fifo == NULL )
161161
{
162162
_tx_fifo = new Adafruit_FIFO(1);
163-
_tx_fifo->begin(BLEGATT_ATT_MTU_MAX);
163+
_tx_fifo->begin( Bluefruit.getMaxMtu() );
164164
}
165165
}else
166166
{
@@ -182,7 +182,7 @@ err_t BLEUart::begin(void)
182182
_txd.setProperties(CHR_PROPS_NOTIFY);
183183
// TODO enable encryption when bonding is enabled
184184
_txd.setPermission(SECMODE_OPEN, SECMODE_NO_ACCESS);
185-
_txd.setMaxLen(BLEGATT_ATT_MTU_MAX);
185+
_txd.setMaxLen( Bluefruit.getMaxMtu() );
186186
_txd.setUserDescriptor("TXD");
187187
VERIFY_STATUS( _txd.begin() );
188188

@@ -192,7 +192,7 @@ err_t BLEUart::begin(void)
192192

193193
// TODO enable encryption when bonding is enabled
194194
_rxd.setPermission(SECMODE_NO_ACCESS, SECMODE_OPEN);
195-
_rxd.setMaxLen(BLEGATT_ATT_MTU_MAX);
195+
_rxd.setMaxLen( Bluefruit.getMaxMtu() );
196196
_rxd.setUserDescriptor("RXD");
197197
VERIFY_STATUS(_rxd.begin());
198198

0 commit comments

Comments
 (0)