Data Structures | |
struct | att_connection |
struct | att_service_handler |
Macros | |
#define | ATT_ERROR_DATA_MISMATCH 0x7e |
#define | ATT_ERROR_HCI_DISCONNECT_RECEIVED 0x1f |
#define | ATT_ERROR_TIMEOUT 0x7F |
Typedefs | |
typedef struct att_connection | att_connection_t |
typedef uint16_t(* | att_read_callback_t )(hci_con_handle_t con_handle, uint16_t attribute_handle, uint16_t offset, uint8_t *buffer, uint16_t buffer_size) |
typedef struct att_service_handler | att_service_handler_t |
typedef int(* | att_write_callback_t )(hci_con_handle_t con_handle, uint16_t attribute_handle, uint16_t transaction_mode, uint16_t offset, uint8_t *buffer, uint16_t buffer_size) |
Functions | |
void | att_clear_transaction_queue (att_connection_t *att_connection) |
void | att_dump_attributes (void) |
uint16_t | att_handle_request (att_connection_t *att_connection, uint8_t *request_buffer, uint16_t request_len, uint8_t *response_buffer) |
uint16_t | att_prepare_handle_value_indication (att_connection_t *att_connection, uint16_t attribute_handle, uint8_t *value, uint16_t value_len, uint8_t *response_buffer) |
uint16_t | att_prepare_handle_value_notification (att_connection_t *att_connection, uint16_t attribute_handle, uint8_t *value, uint16_t value_len, uint8_t *response_buffer) |
uint16_t | att_read_callback_handle_blob (const uint8_t *blob, uint16_t blob_size, uint16_t offset, uint8_t *buffer, uint16_t buffer_size) |
uint16_t | att_read_callback_handle_byte (uint8_t value, uint16_t offset, uint8_t *buffer, uint16_t buffer_size) |
uint16_t | att_read_callback_handle_little_endian_16 (uint16_t value, uint16_t offset, uint8_t *buffer, uint16_t buffer_size) |
uint16_t | att_read_callback_handle_little_endian_32 (uint32_t value, uint16_t offset, uint8_t *buffer, uint16_t buffer_size) |
void | att_register_service_handler (att_service_handler_t *handler) |
register read/write callbacks for specific handle range More... | |
void | att_set_db (uint8_t const *db) |
void | att_set_read_callback (att_read_callback_t callback) |
void | att_set_write_callback (att_write_callback_t callback) |
uint16_t | att_uuid_for_handle (uint16_t attribute_handle) |
uint16_t | gatt_server_get_client_configuration_handle_for_characteristic_with_uuid16 (uint16_t start_handle, uint16_t end_handle, uint16_t uuid16) |
int | gatt_server_get_get_handle_range_for_service_with_uuid16 (uint16_t uuid16, uint16_t *start_handle, uint16_t *end_handle) |
uint16_t | gatt_server_get_value_handle_for_characteristic_with_uuid16 (uint16_t start_handle, uint16_t end_handle, uint16_t uuid16) |
#define ATT_ERROR_DATA_MISMATCH 0x7e |
Referenced by gatt_client_att_packet_handler().
#define ATT_ERROR_HCI_DISCONNECT_RECEIVED 0x1f |
Referenced by gatt_client_hci_event_packet_handler().
#define ATT_ERROR_TIMEOUT 0x7F |
Referenced by gatt_client_timeout_handler().
typedef struct att_connection att_connection_t |
typedef uint16_t(* att_read_callback_t)(hci_con_handle_t con_handle, uint16_t attribute_handle, uint16_t offset, uint8_t *buffer, uint16_t buffer_size) |
typedef struct att_service_handler att_service_handler_t |
typedef int(* att_write_callback_t)(hci_con_handle_t con_handle, uint16_t attribute_handle, uint16_t transaction_mode, uint16_t offset, uint8_t *buffer, uint16_t buffer_size) |
void att_clear_transaction_queue | ( | att_connection_t * | att_connection | ) |
References att_notify_write_callbacks(), and ATT_TRANSACTION_MODE_CANCEL.
Referenced by att_event_packet_handler(), and handle_execute_write_request().
void att_dump_attributes | ( | void | ) |
References att_iterator_fetch_next(), att_iterator_has_next(), att_iterator_init(), ATT_PROPERTY_UUID128, att_iterator::flags, att_iterator::handle, little_endian_read_16(), log_info, log_info_hexdump(), reverse_128(), att_iterator::uuid, uuid128_to_str(), att_iterator::value, and att_iterator::value_len.
uint16_t att_handle_request | ( | att_connection_t * | att_connection, |
uint8_t * | request_buffer, | ||
uint16_t | request_len, | ||
uint8_t * | response_buffer | ||
) |
References ATT_EXCHANGE_MTU_REQUEST, ATT_EXECUTE_WRITE_REQUEST, ATT_FIND_BY_TYPE_VALUE_REQUEST, ATT_FIND_INFORMATION_REQUEST, ATT_PREPARE_WRITE_REQUEST, ATT_READ_BLOB_REQUEST, ATT_READ_BY_GROUP_TYPE_REQUEST, ATT_READ_BY_TYPE_REQUEST, ATT_READ_MULTIPLE_REQUEST, ATT_READ_REQUEST, ATT_SIGNED_WRITE_COMMAND, ATT_WRITE_COMMAND, ATT_WRITE_REQUEST, handle_exchange_mtu_request(), handle_execute_write_request(), handle_find_by_type_value_request(), handle_find_information_request(), handle_prepare_write_request(), handle_read_blob_request(), handle_read_by_group_type_request(), handle_read_by_type_request(), handle_read_multiple_request(), handle_read_request(), handle_write_command(), handle_write_request(), log_info, log_info_hexdump(), and att_connection::mtu.
Referenced by att_packet_handler(), and att_server_process_validated_request().
uint16_t att_prepare_handle_value_indication | ( | att_connection_t * | att_connection, |
uint16_t | attribute_handle, | ||
uint8_t * | value, | ||
uint16_t | value_len, | ||
uint8_t * | response_buffer | ||
) |
References ATT_HANDLE_VALUE_INDICATION, and prepare_handle_value().
Referenced by att_server_indicate().
uint16_t att_prepare_handle_value_notification | ( | att_connection_t * | att_connection, |
uint16_t | attribute_handle, | ||
uint8_t * | value, | ||
uint16_t | value_len, | ||
uint8_t * | response_buffer | ||
) |
References ATT_HANDLE_VALUE_NOTIFICATION, and prepare_handle_value().
Referenced by att_server_notify().
uint16_t att_read_callback_handle_blob | ( | const uint8_t * | blob, |
uint16_t | blob_size, | ||
uint16_t | offset, | ||
uint8_t * | buffer, | ||
uint16_t | buffer_size | ||
) |
References btstack_min().
Referenced by att_read_callback(), att_read_callback_handle_byte(), att_read_callback_handle_little_endian_16(), and att_read_callback_handle_little_endian_32().
uint16_t att_read_callback_handle_byte | ( | uint8_t | value, |
uint16_t | offset, | ||
uint8_t * | buffer, | ||
uint16_t | buffer_size | ||
) |
References att_read_callback_handle_blob().
Referenced by att_read_callback().
uint16_t att_read_callback_handle_little_endian_16 | ( | uint16_t | value, |
uint16_t | offset, | ||
uint8_t * | buffer, | ||
uint16_t | buffer_size | ||
) |
References att_read_callback_handle_blob(), and little_endian_store_16().
Referenced by att_read_callback().
uint16_t att_read_callback_handle_little_endian_32 | ( | uint32_t | value, |
uint16_t | offset, | ||
uint8_t * | buffer, | ||
uint16_t | buffer_size | ||
) |
References att_read_callback_handle_blob(), and little_endian_store_32().
void att_register_service_handler | ( | att_service_handler_t * | handler | ) |
register read/write callbacks for specific handle range
att_service_handler_t |
References att_service_handler_for_handle(), btstack_linked_list_add(), att_service_handler::end_handle, log_error, and att_service_handler::start_handle.
Referenced by battery_service_server_init(), device_information_service_server_init(), and hids_device_init().
void att_set_db | ( | uint8_t const * | db | ) |
References att_db.
Referenced by att_server_init().
void att_set_read_callback | ( | att_read_callback_t | callback | ) |
References att_read_callback, and callback.
Referenced by att_server_init().
void att_set_write_callback | ( | att_write_callback_t | callback | ) |
References att_write_callback, and callback.
Referenced by att_server_init().
uint16_t att_uuid_for_handle | ( | uint16_t | attribute_handle | ) |
uint16_t gatt_server_get_client_configuration_handle_for_characteristic_with_uuid16 | ( | uint16_t | start_handle, |
uint16_t | end_handle, | ||
uint16_t | uuid16 | ||
) |
References att_iterator_fetch_next(), att_iterator_has_next(), att_iterator_init(), att_iterator_match_uuid16(), GATT_CHARACTERISTICS_UUID, GATT_CLIENT_CHARACTERISTICS_CONFIGURATION, GATT_PRIMARY_SERVICE_UUID, GATT_SECONDARY_SERVICE_UUID, and att_iterator::handle.
Referenced by battery_service_server_init(), and hids_device_init().
int gatt_server_get_get_handle_range_for_service_with_uuid16 | ( | uint16_t | uuid16, |
uint16_t * | start_handle, | ||
uint16_t * | end_handle | ||
) |
References att_iterator_fetch_next(), att_iterator_has_next(), att_iterator_init(), att_iterator_match_uuid16(), GATT_PRIMARY_SERVICE_UUID, GATT_SECONDARY_SERVICE_UUID, att_iterator::handle, little_endian_store_16(), att_iterator::value, and att_iterator::value_len.
Referenced by battery_service_server_init(), device_information_service_server_init(), and hids_device_init().
uint16_t gatt_server_get_value_handle_for_characteristic_with_uuid16 | ( | uint16_t | start_handle, |
uint16_t | end_handle, | ||
uint16_t | uuid16 | ||
) |