File tree Expand file tree Collapse file tree 6 files changed +18
-14
lines changed
TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF52/source/btle Expand file tree Collapse file tree 6 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -500,7 +500,7 @@ class Gap {
500
500
* @param connectionHandle The handle of the connection that changed the size.
501
501
* @param attMtuSize
502
502
*/
503
- virtual void onAttMtuChanged (
503
+ virtual void onAttMtuChange (
504
504
connection_handle_t connectionHandle,
505
505
uint16_t attMtuSize
506
506
)
@@ -509,13 +509,17 @@ class Gap {
509
509
510
510
/* *
511
511
* Function invoked when the connections changes the maximum number of octets
512
- * that can be sent or received by the controller in a single packet.
512
+ * that can be sent or received by the controller in a single packet. A single
513
+ * L2CAP packet can be fragmented across many such packets.
514
+ *
515
+ * @note This only triggers if controller supports data length extension and
516
+ * negotiated data length is longer than the default 23.
513
517
*
514
518
* @param connectionHandle The handle of the connection that changed the size.
515
519
* @param txSize Number of octets we can send on this connection in a single packet.
516
520
* @param rxSize Number of octets we can receive on this connection in a single packet.
517
521
*/
518
- virtual void onPacketPayloadSizeChanged (
522
+ virtual void onDataLengthChange (
519
523
connection_handle_t connectionHandle,
520
524
uint16_t txSize,
521
525
uint16_t rxSize
Original file line number Diff line number Diff line change @@ -632,7 +632,7 @@ class GenericGap :
632
632
uint16_t att_mtu_size
633
633
);
634
634
635
- virtual void on_packet_payload_size_changed (
635
+ virtual void on_data_length_change (
636
636
connection_handle_t connection_handle,
637
637
uint16_t tx_size,
638
638
uint16_t rx_size
Original file line number Diff line number Diff line change @@ -45,17 +45,17 @@ struct Gap {
45
45
) = 0;
46
46
47
47
/* *
48
- * @copydoc Gap::EventHandler::onAttMtuChanged
48
+ * @copydoc Gap::EventHandler::onAttMtuChange
49
49
*/
50
50
virtual void on_att_mtu_changed (
51
51
connection_handle_t connection_handle,
52
52
uint16_t att_mtu_size
53
53
) = 0;
54
54
55
55
/* *
56
- * @copydoc Gap::EventHandler::onPacketPayloadSizeChanged
56
+ * @copydoc Gap::EventHandler::onDataLengthChange
57
57
*/
58
- virtual void on_packet_payload_size_changed (
58
+ virtual void on_data_length_change (
59
59
connection_handle_t connection_handle,
60
60
uint16_t tx_size,
61
61
uint16_t rx_size
Original file line number Diff line number Diff line change @@ -866,18 +866,18 @@ void GenericGap::on_att_mtu_changed(
866
866
)
867
867
{
868
868
if (_eventHandler) {
869
- _eventHandler->onAttMtuChanged (connection_handle, att_mtu_size);
869
+ _eventHandler->onAttMtuChange (connection_handle, att_mtu_size);
870
870
}
871
871
}
872
872
873
- void GenericGap::on_packet_payload_size_changed (
873
+ void GenericGap::on_data_length_change (
874
874
Handle_t connection_handle,
875
875
uint16_t tx_size,
876
876
uint16_t rx_size
877
877
)
878
878
{
879
879
if (_eventHandler) {
880
- _eventHandler->onPacketPayloadSizeChanged (connection_handle, tx_size, rx_size);
880
+ _eventHandler->onDataLengthChange (connection_handle, tx_size, rx_size);
881
881
}
882
882
}
883
883
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ void BLE::device_manager_cb(dmEvt_t* dm_event)
291
291
ble::pal::Gap::EventHandler *handler;
292
292
handler = ble::pal::vendor::cordio::Gap::get_gap ().get_event_handler ();
293
293
if (handler) {
294
- handler->on_packet_payload_size_changed (
294
+ handler->on_data_length_change (
295
295
dm_event->hdr .param ,
296
296
dm_event->dataLenChange .maxTxOctets ,
297
297
dm_event->dataLenChange .maxRxOctets
Original file line number Diff line number Diff line change @@ -380,7 +380,7 @@ void btle_handler(const ble_evt_t *p_ble_evt)
380
380
const ble_gap_evt_data_length_update_t &update =
381
381
p_ble_evt->evt .gap_evt .params .data_length_update ;
382
382
383
- gap._eventHandler ->onPacketPayloadSizeChanged (
383
+ gap._eventHandler ->onDataLengthChange (
384
384
connection,
385
385
update.effective_params .max_tx_octets ,
386
386
update.effective_params .max_rx_octets
@@ -400,7 +400,7 @@ void btle_handler(const ble_evt_t *p_ble_evt)
400
400
const ble_gatts_evt_exchange_mtu_request_t &update =
401
401
p_ble_evt->evt .gatts_evt .params .exchange_mtu_request ;
402
402
403
- gap._eventHandler ->onAttMtuChanged (
403
+ gap._eventHandler ->onAttMtuChange (
404
404
connection,
405
405
std::min (NRF_SDH_BLE_GATT_MAX_MTU_SIZE, (int )(update.client_rx_mtu ))
406
406
);
@@ -415,7 +415,7 @@ void btle_handler(const ble_evt_t *p_ble_evt)
415
415
const ble_gattc_evt_exchange_mtu_rsp_t &update =
416
416
p_ble_evt->evt .gattc_evt .params .exchange_mtu_rsp ;
417
417
418
- gap._eventHandler ->onAttMtuChanged (
418
+ gap._eventHandler ->onAttMtuChange (
419
419
connection,
420
420
std::min (NRF_SDH_BLE_GATT_MAX_MTU_SIZE, (int )(update.server_rx_mtu ))
421
421
);
You can’t perform that action at this time.
0 commit comments