mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-23 19:20:51 +00:00
doc: can send now is only valid until packet handler exit
This commit is contained in:
parent
472a1e5f81
commit
50f3b808a0
@ -21,7 +21,8 @@ L2CAP_DATA_PACKET packet type. L2CAP provides the following events:
|
||||
- L2CAP_EVENT_CAN_SEND_NOW - Indicates that an L2CAP data packet could
|
||||
be sent on the reported l2cap_cid. It is emitted after a call to
|
||||
*l2cap_request_can_send_now*. See [Sending L2CAP Data](protocols/#sec:l2capSendProtocols)
|
||||
|
||||
Please note that the guarantee that a packet can be sent is only valid when the event is received.
|
||||
After returning from the packet handler, BTstack might need to send itself.
|
||||
|
||||
Event | Event Code
|
||||
-----------|----------------------------------------
|
||||
@ -65,6 +66,8 @@ by RFCOMM:
|
||||
- RFCOMM_EVENT_CAN_SEND_NOW - Indicates that an RFCOMM data packet could
|
||||
be sent on the reported rfcomm_cid. It is emitted after a call to
|
||||
*rfcomm_request_can_send_now*. See [Sending RFCOMM Data](protocols/#sec:rfcommSendProtocols)
|
||||
Please note that the guarantee that a packet can be sent is only valid when the event is received.
|
||||
After returning from the packet handler, BTstack might need to send itself.
|
||||
|
||||
|
||||
Event | Event Code
|
||||
|
@ -303,6 +303,9 @@ as soon as possible. It might happen that the event is received via
|
||||
packet handler before the *l2cap_request_can_send_now_event* function returns.
|
||||
The L2CAP_EVENT_CAN_SEND_NOW indicates a channel ID on which sending is possible.
|
||||
|
||||
Please note that the guarantee that a packet can be sent is only valid when the event is received.
|
||||
After returning from the packet handler, BTstack might need to send itself.
|
||||
|
||||
### LE Data Channels
|
||||
|
||||
The full title for LE Data Channels is actually LE Connection-Oriented Channels with LE Credit-Based Flow-Control Mode. In this mode, data is sent as Service Data Units (SDUs) that can be larger than an individual HCI LE ACL packet.
|
||||
@ -559,6 +562,9 @@ When there is a need to send a packet, call *rcomm_request_can_send_now*
|
||||
and wait for the reception of the RFCOMM_EVENT_CAN_SEND_NOW event
|
||||
to send the packet, as shown in Listing [below](#lst:rfcommRequestCanSendNow).
|
||||
|
||||
Please note that the guarantee that a packet can be sent is only valid when the event is received.
|
||||
After returning from the packet handler, BTstack might need to send itself.
|
||||
|
||||
~~~~ {#lst:rfcommRequestCanSendNow .c caption="{Preparing and sending data.}"}
|
||||
void prepare_data(uint16_t rfcomm_channel_id){
|
||||
...
|
||||
|
@ -16,6 +16,6 @@ pages:
|
||||
- 'Existing Ports': ports/existing_ports.md
|
||||
- 'Integrating with Existing Systems': integration.md
|
||||
- 'APIs': appendix/apis.md
|
||||
- 'Eventts and Errors': appendix/events_errors.md
|
||||
- 'Events and Errors': appendix/events_errors.md
|
||||
- 'Migration to v1.0': appendix/migration.md
|
||||
theme: readthedocs
|
||||
|
Loading…
x
Reference in New Issue
Block a user