mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
docu: replace daemon credist events with can send now
This commit is contained in:
parent
1bb145c93b
commit
81db0e4e00
@ -16,19 +16,11 @@ L2CAP_DATA_PACKET packet type. L2CAP provides the following events:
|
|||||||
|
|
||||||
- L2CAP_EVENT_INCOMING_CONNECTION - received when the connection is
|
- L2CAP_EVENT_INCOMING_CONNECTION - received when the connection is
|
||||||
requested by remote. Connection accept and decline are performed
|
requested by remote. Connection accept and decline are performed
|
||||||
with *l2cap_accept_connection* and
|
with *l2cap_accept_connection* and *l2cap_decline_connecti-on* respectively.
|
||||||
*l2cap_decline_connecti-on* respectively.
|
|
||||||
|
|
||||||
- DAEMON_EVENT_L2CAP_CREDITS - emitted when there is a chance to send a new
|
|
||||||
L2CAP packet. BTstack does not buffer packets. Instead, it requires
|
|
||||||
the application to retry sending if BTstack cannot deliver a packet
|
|
||||||
to the Bluetooth module. In this case, the l2cap_send
|
|
||||||
will return an error.
|
|
||||||
|
|
||||||
- DAEMON_EVENT_L2CAP_SERVICE_REGISTERED - Status not equal zero indicates
|
|
||||||
an error. Possible errors: service is already registered;
|
|
||||||
MAX_NO_L2CAP_SERVICES (defined in config.h) already registered.
|
|
||||||
|
|
||||||
|
- 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)
|
||||||
|
|
||||||
|
|
||||||
Event | Event Code
|
Event | Event Code
|
||||||
@ -36,9 +28,7 @@ Event | Event Code
|
|||||||
L2CAP_EVENT_CHANNEL_OPENED | 0x70
|
L2CAP_EVENT_CHANNEL_OPENED | 0x70
|
||||||
L2CAP_EVENT_CHANNEL_CLOSED | 0x71
|
L2CAP_EVENT_CHANNEL_CLOSED | 0x71
|
||||||
L2CAP_EVENT_INCOMING_CONNECTION | 0x72
|
L2CAP_EVENT_INCOMING_CONNECTION | 0x72
|
||||||
DAEMON_EVENT_L2CAP_CREDITS | 0x74
|
L2CAP_EVENT_CAN_SEND_NOW | 0x78
|
||||||
DAEMON_EVENT_L2CAP_SERVICE_REGISTERED | 0x75
|
|
||||||
|
|
||||||
|
|
||||||
Table: L2CAP Events. {#tbl:l2capEvents}
|
Table: L2CAP Events. {#tbl:l2capEvents}
|
||||||
|
|
||||||
@ -50,10 +40,8 @@ L2CAP event paramaters, with size in bits:
|
|||||||
- *event (8), len(8), channel(16)*
|
- *event (8), len(8), channel(16)*
|
||||||
- L2CAP_EVENT_INCOMING_CONNECTION:
|
- L2CAP_EVENT_INCOMING_CONNECTION:
|
||||||
- *event(8), len(8), address(48), handle(16), psm (16), local_cid(16), remote_cid (16)*
|
- *event(8), len(8), address(48), handle(16), psm (16), local_cid(16), remote_cid (16)*
|
||||||
- DAEMON_EVENT_L2CAP_CREDITS:
|
- L2CAP_EVENT_CAN_SEND_NOW:
|
||||||
- *event(8), len(8), local_cid(16), credits(8)*
|
- *event(8), len(8), local_cid(16)
|
||||||
- DAEMON_EVENT_L2CAP_SERVICE_REGISTERED:
|
|
||||||
- *event(8), len(8), status(8), psm(16)*
|
|
||||||
|
|
||||||
## RFCOMM Events
|
## RFCOMM Events
|
||||||
|
|
||||||
@ -74,15 +62,9 @@ by RFCOMM:
|
|||||||
establishment is done. Status not equal zero indicates an error.
|
establishment is done. Status not equal zero indicates an error.
|
||||||
Possible errors: an L2CAP error, out of memory.
|
Possible errors: an L2CAP error, out of memory.
|
||||||
|
|
||||||
- DAEMON_EVENT_RFCOMM_CREDITS - The application can resume sending when
|
- RFCOMM_EVENT_CAN_SEND_NOW - Indicates that an RFCOMM data packet could
|
||||||
this even is received. See Section on [RFCOMM credit-based flow-control](../protocols/#sec:flowControlProtocols)
|
be sent on the reported rfcomm_cid. It is emitted after a call to
|
||||||
for more.
|
*rfcomm_request_can_send_now*. See [Sending RFCOMM Data](protocols/#sec:rfcommSendProtocols)
|
||||||
|
|
||||||
- DAEMON_EVENT_RFCOMM_SERVICE_REGISTERED - Status not equal zero indicates
|
|
||||||
an error. Possible errors:
|
|
||||||
|
|
||||||
- service is already registered;
|
|
||||||
- MAX_NO_RFCOMM_SERVICES (defined in config.h) already registered.
|
|
||||||
|
|
||||||
|
|
||||||
Event | Event Code
|
Event | Event Code
|
||||||
@ -90,8 +72,7 @@ Event | Event Code
|
|||||||
RFCOMM_EVENT_CHANNEL_OPENED | 0x80
|
RFCOMM_EVENT_CHANNEL_OPENED | 0x80
|
||||||
RFCOMM_EVENT_CHANNEL_CLOSED | 0x81
|
RFCOMM_EVENT_CHANNEL_CLOSED | 0x81
|
||||||
RFCOMM_EVENT_INCOMING_CONNECTION | 0x82
|
RFCOMM_EVENT_INCOMING_CONNECTION | 0x82
|
||||||
DAEMON_EVENT_RFCOMM_CREDITS | 0x84
|
RFCOMM_EVENT_CAN_SEND_NOW | 0x89
|
||||||
DAEMON_EVENT_RFCOMM_SERVICE_REGISTERED | 0x85
|
|
||||||
|
|
||||||
Table: RFCOMM Events. {#tbl:rfcommEvents}
|
Table: RFCOMM Events. {#tbl:rfcommEvents}
|
||||||
|
|
||||||
@ -104,10 +85,8 @@ RFCOMM event paramaters, with size in bits:
|
|||||||
- *event(8), len(8), rfcomm_cid(16)*
|
- *event(8), len(8), rfcomm_cid(16)*
|
||||||
- RFCOMM_EVENT_INCOMING_CONNECTION:
|
- RFCOMM_EVENT_INCOMING_CONNECTION:
|
||||||
- *event(8), len(8), address(48), channel (8), rfcomm_cid(16)*
|
- *event(8), len(8), address(48), channel (8), rfcomm_cid(16)*
|
||||||
- DAEMON_EVENT_RFCOMM_CREDITS:
|
- RFCOMM_EVENT_CAN_SEND_NOW:
|
||||||
- *event(8), len(8), rfcomm_cid(16), credits(8)*
|
- *event(8), len(8), rfcomm_cid(16)
|
||||||
- DAEMON_EVENT_RFCOMM_SERVICE_REGISTERED:
|
|
||||||
- *event(8), len(8), status(8), rfcomm server channel_id(8)*
|
|
||||||
|
|
||||||
## Errors {#sec:errorsAppendix}
|
## Errors {#sec:errorsAppendix}
|
||||||
|
|
||||||
@ -130,7 +109,6 @@ L2CAP_CONFIG_RESPONSE_RESULT_REJECTED | 0x68
|
|||||||
L2CAP_CONFIG_RESPONSE_RESULT_UNKNOWN_OPTIONS | 0x69
|
L2CAP_CONFIG_RESPONSE_RESULT_UNKNOWN_OPTIONS | 0x69
|
||||||
L2CAP_SERVICE_ALREADY_REGISTERED | 0x6a
|
L2CAP_SERVICE_ALREADY_REGISTERED | 0x6a
|
||||||
RFCOMM_MULTIPLEXER_STOPPED | 0x70
|
RFCOMM_MULTIPLEXER_STOPPED | 0x70
|
||||||
RFCOMM_CHANNEL_ALREADY_REGISTERED | 0x71
|
|
||||||
RFCOMM_NO_OUTGOING_CREDITS | 0x72
|
RFCOMM_NO_OUTGOING_CREDITS | 0x72
|
||||||
SDP_HANDLE_ALREADY_REGISTERED | 0x80
|
SDP_HANDLE_ALREADY_REGISTERED | 0x80
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user