mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-03 07:13:51 +00:00
Merge branch 'develop' of https://github.com/bluekitchen/btstack into develop
Conflicts: src/btstack_event.h
This commit is contained in:
commit
8412d5419e
@ -16,19 +16,11 @@ L2CAP_DATA_PACKET packet type. L2CAP provides the following events:
|
||||
|
||||
- L2CAP_EVENT_INCOMING_CONNECTION - received when the connection is
|
||||
requested by remote. Connection accept and decline are performed
|
||||
with *l2cap_accept_connection* and
|
||||
*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.
|
||||
with *l2cap_accept_connection* and *l2cap_decline_connecti-on* respectively.
|
||||
|
||||
- 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
|
||||
@ -36,9 +28,7 @@ Event | Event Code
|
||||
L2CAP_EVENT_CHANNEL_OPENED | 0x70
|
||||
L2CAP_EVENT_CHANNEL_CLOSED | 0x71
|
||||
L2CAP_EVENT_INCOMING_CONNECTION | 0x72
|
||||
DAEMON_EVENT_L2CAP_CREDITS | 0x74
|
||||
DAEMON_EVENT_L2CAP_SERVICE_REGISTERED | 0x75
|
||||
|
||||
L2CAP_EVENT_CAN_SEND_NOW | 0x78
|
||||
|
||||
Table: L2CAP Events. {#tbl:l2capEvents}
|
||||
|
||||
@ -50,10 +40,8 @@ L2CAP event paramaters, with size in bits:
|
||||
- *event (8), len(8), channel(16)*
|
||||
- L2CAP_EVENT_INCOMING_CONNECTION:
|
||||
- *event(8), len(8), address(48), handle(16), psm (16), local_cid(16), remote_cid (16)*
|
||||
- DAEMON_EVENT_L2CAP_CREDITS:
|
||||
- *event(8), len(8), local_cid(16), credits(8)*
|
||||
- DAEMON_EVENT_L2CAP_SERVICE_REGISTERED:
|
||||
- *event(8), len(8), status(8), psm(16)*
|
||||
- L2CAP_EVENT_CAN_SEND_NOW:
|
||||
- *event(8), len(8), local_cid(16)
|
||||
|
||||
## RFCOMM Events
|
||||
|
||||
@ -74,15 +62,9 @@ by RFCOMM:
|
||||
establishment is done. Status not equal zero indicates an error.
|
||||
Possible errors: an L2CAP error, out of memory.
|
||||
|
||||
- DAEMON_EVENT_RFCOMM_CREDITS - The application can resume sending when
|
||||
this even is received. See Section on [RFCOMM credit-based flow-control](../protocols/#sec:flowControlProtocols)
|
||||
for more.
|
||||
|
||||
- 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.
|
||||
- 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)
|
||||
|
||||
|
||||
Event | Event Code
|
||||
@ -90,8 +72,7 @@ Event | Event Code
|
||||
RFCOMM_EVENT_CHANNEL_OPENED | 0x80
|
||||
RFCOMM_EVENT_CHANNEL_CLOSED | 0x81
|
||||
RFCOMM_EVENT_INCOMING_CONNECTION | 0x82
|
||||
DAEMON_EVENT_RFCOMM_CREDITS | 0x84
|
||||
DAEMON_EVENT_RFCOMM_SERVICE_REGISTERED | 0x85
|
||||
RFCOMM_EVENT_CAN_SEND_NOW | 0x89
|
||||
|
||||
Table: RFCOMM Events. {#tbl:rfcommEvents}
|
||||
|
||||
@ -104,10 +85,8 @@ RFCOMM event paramaters, with size in bits:
|
||||
- *event(8), len(8), rfcomm_cid(16)*
|
||||
- RFCOMM_EVENT_INCOMING_CONNECTION:
|
||||
- *event(8), len(8), address(48), channel (8), rfcomm_cid(16)*
|
||||
- DAEMON_EVENT_RFCOMM_CREDITS:
|
||||
- *event(8), len(8), rfcomm_cid(16), credits(8)*
|
||||
- DAEMON_EVENT_RFCOMM_SERVICE_REGISTERED:
|
||||
- *event(8), len(8), status(8), rfcomm server channel_id(8)*
|
||||
- RFCOMM_EVENT_CAN_SEND_NOW:
|
||||
- *event(8), len(8), rfcomm_cid(16)
|
||||
|
||||
## Errors {#sec:errorsAppendix}
|
||||
|
||||
@ -130,7 +109,6 @@ L2CAP_CONFIG_RESPONSE_RESULT_REJECTED | 0x68
|
||||
L2CAP_CONFIG_RESPONSE_RESULT_UNKNOWN_OPTIONS | 0x69
|
||||
L2CAP_SERVICE_ALREADY_REGISTERED | 0x6a
|
||||
RFCOMM_MULTIPLEXER_STOPPED | 0x70
|
||||
RFCOMM_CHANNEL_ALREADY_REGISTERED | 0x71
|
||||
RFCOMM_NO_OUTGOING_CREDITS | 0x72
|
||||
SDP_HANDLE_ALREADY_REGISTERED | 0x80
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -205,7 +205,7 @@ def create_getter(event_name, field_name, field_type, offset, supported):
|
||||
global c_prototoype_unsupported
|
||||
global param_read
|
||||
|
||||
description = "Get field %s from event %s" % (field_name, event_name)
|
||||
description = "Get field %s from event %s" % (field_name, event_name.upper())
|
||||
result_name = field_name
|
||||
fn_name = "%s_get_%s" % (event_name, field_name)
|
||||
result_type = c_type_for_btstack_type(field_type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user