#include <stdint.h>
#include <string.h>
#include "bluetooth.h"
#include "btstack_defines.h"
#include "btstack_linked_list.h"
Macros | |
#define | DEVICE_NAME_LEN 248 |
The device name type. More... | |
Typedefs | |
typedef uint8_t | device_name_t [DEVICE_NAME_LEN+1] |
Functions | |
int | bd_addr_cmp (const bd_addr_t a, const bd_addr_t b) |
Compare two Bluetooth addresses. More... | |
void | bd_addr_copy (bd_addr_t dest, const bd_addr_t src) |
Copy Bluetooth address. More... | |
char * | bd_addr_to_str (const bd_addr_t addr) |
Create human readable represenationt of Bluetooth address. More... | |
uint32_t | big_endian_read_16 (const uint8_t *buffer, int pos) |
Read 16/24/32 bit big endian value from buffer. More... | |
uint32_t | big_endian_read_24 (const uint8_t *buffer, int pos) |
uint32_t | big_endian_read_32 (const uint8_t *buffer, int pos) |
void | big_endian_store_16 (uint8_t *buffer, uint16_t pos, uint16_t value) |
Write 16/32 bit big endian value into buffer. More... | |
void | big_endian_store_24 (uint8_t *buffer, uint16_t pos, uint32_t value) |
void | big_endian_store_32 (uint8_t *buffer, uint16_t pos, uint32_t value) |
uint32_t | btstack_atoi (const char *str) |
Parse unsigned number. More... | |
uint8_t | btstack_crc8_calc (uint8_t *data, uint16_t len) |
uint8_t | btstack_crc8_check (uint8_t *data, uint16_t len, uint8_t check_sum) |
CRC8 functions using ETSI TS 101 369 V6.3.0. More... | |
static uint16_t | btstack_flip_16 (uint16_t value) |
Swap bytes in 16 bit integer. More... | |
static int | btstack_is_big_endian (void) |
Check for big endian system. More... | |
static int | btstack_is_little_endian (void) |
Check for little endian system. More... | |
uint32_t | btstack_max (uint32_t a, uint32_t b) |
Maximum function for uint32_t. More... | |
uint32_t | btstack_min (uint32_t a, uint32_t b) |
Minimum function for uint32_t. More... | |
char | char_for_nibble (int nibble) |
ASCII character for 4-bit nibble. More... | |
int | count_set_bits_uint32 (uint32_t x) |
Return number of set bits in a uint32 number. More... | |
uint16_t | little_endian_read_16 (const uint8_t *buffer, int position) |
Read 16/24/32 bit little endian value from buffer. More... | |
uint32_t | little_endian_read_24 (const uint8_t *buffer, int position) |
uint32_t | little_endian_read_32 (const uint8_t *buffer, int position) |
void | little_endian_store_16 (uint8_t *buffer, uint16_t position, uint16_t value) |
Write 16/32 bit little endian value into buffer. More... | |
void | little_endian_store_32 (uint8_t *buffer, uint16_t position, uint32_t value) |
int | nibble_for_char (char c) |
4-bit nibble from ASCII character More... | |
void | printf_hexdump (const void *data, int size) |
Use printf to write hexdump as single line of data. More... | |
void | reverse_128 (const uint8_t *src, uint8_t *dest) |
void | reverse_24 (const uint8_t *src, uint8_t *dest) |
Wrapper around reverse_bytes for common buffer sizes. More... | |
void | reverse_256 (const uint8_t *src, uint8_t *dest) |
void | reverse_48 (const uint8_t *src, uint8_t *dest) |
void | reverse_56 (const uint8_t *src, uint8_t *dest) |
void | reverse_64 (const uint8_t *src, uint8_t *dest) |
void | reverse_bd_addr (const bd_addr_t src, bd_addr_t dest) |
void | reverse_bytes (const uint8_t *src, uint8_t *dest, int len) |
Copy from source to destination and reverse byte order. More... | |
int | sscanf_bd_addr (const char *addr_string, bd_addr_t addr) |
Parse Bluetooth address. More... | |
int | string_len_for_uint32 (uint32_t i) |
Return number of digits of a uint32 number. More... | |
char * | uuid128_to_str (const uint8_t *uuid) |
Create human readable representation for UUID128. More... | |
void | uuid_add_bluetooth_prefix (uint8_t *uuid128, uint32_t short_uuid) |
Constructs UUID128 from 16 or 32 bit UUID using Bluetooth base UUID. More... | |
int | uuid_has_bluetooth_prefix (const uint8_t *uuid128) |
Checks if UUID128 has Bluetooth base UUID prefix. More... | |
#define DEVICE_NAME_LEN 248 |
The device name type.
Referenced by hci_initializing_run().
typedef uint8_t device_name_t[DEVICE_NAME_LEN+1] |
Compare two Bluetooth addresses.
a | |
b |
a | |
b |
References BD_ADDR_LEN.
Referenced by get_item().
Copy Bluetooth address.
dest | |
src |
References BD_ADDR_LEN.
Referenced by create_connection_for_bd_addr_and_type(), event_handler(), and sscanf_bd_addr().
char* bd_addr_to_str | ( | const bd_addr_t | addr | ) |
Create human readable represenationt of Bluetooth address.
References bd_addr_to_str_buffer, char_for_high_nibble(), and char_for_low_nibble().
Referenced by create_connection_for_bd_addr_and_type(), event_handler(), hci_initializing_run(), hci_send_cmd_packet(), hci_shutdown_connection(), le_device_db_add(), le_device_db_dump(), sm_key_distribution_handle_all_received(), and sm_run().
uint32_t big_endian_read_16 | ( | const uint8_t * | buffer, |
int | pos | ||
) |
Read 16/24/32 bit big endian value from buffer.
buffer | |
position | in buffer |
Referenced by hci_transport_h5_process_frame(), sm_handle_encryption_result(), and sm_handle_random_result().
uint32_t big_endian_read_24 | ( | const uint8_t * | buffer, |
int | pos | ||
) |
uint32_t big_endian_read_32 | ( | const uint8_t * | buffer, |
int | pos | ||
) |
void big_endian_store_16 | ( | uint8_t * | buffer, |
uint16_t | pos, | ||
uint16_t | value | ||
) |
Write 16/32 bit big endian value into buffer.
buffer | |
position | in buffer |
value |
Referenced by hci_transport_slip_encode_chunk_and_send(), and sm_d1_d_prime().
void big_endian_store_24 | ( | uint8_t * | buffer, |
uint16_t | pos, | ||
uint32_t | value | ||
) |
void big_endian_store_32 | ( | uint8_t * | buffer, |
uint16_t | pos, | ||
uint32_t | value | ||
) |
Referenced by hci_dump_packet(), sm_handle_random_result(), sm_passkey_input(), and uuid_add_bluetooth_prefix().
uint32_t btstack_atoi | ( | const char * | str | ) |
Parse unsigned number.
str | to parse |
uint8_t btstack_crc8_calc | ( | uint8_t * | data, |
uint16_t | len | ||
) |
References crc8().
uint8_t btstack_crc8_check | ( | uint8_t * | data, |
uint16_t | len, | ||
uint8_t | check_sum | ||
) |
|
inlinestatic |
Swap bytes in 16 bit integer.
|
inlinestatic |
Check for big endian system.
|
inlinestatic |
Check for little endian system.
uint32_t btstack_max | ( | uint32_t | a, |
uint32_t | b | ||
) |
Maximum function for uint32_t.
a | |
b |
uint32_t btstack_min | ( | uint32_t | a, |
uint32_t | b | ||
) |
Minimum function for uint32_t.
a | |
b |
Referenced by att_read_callback_handle_blob(), atwilc3000_write_firmware(), atwilc3000_write_memory(), btstack_ring_buffer_read(), btstack_ring_buffer_write(), device_information_service_read_callback(), event_handler(), and l2cap_run().
char char_for_nibble | ( | int | nibble | ) |
ASCII character for 4-bit nibble.
Referenced by char_for_high_nibble(), and char_for_low_nibble().
int count_set_bits_uint32 | ( | uint32_t | x | ) |
Return number of set bits in a uint32 number.
uint32_number |
uint16_t little_endian_read_16 | ( | const uint8_t * | buffer, |
int | position | ||
) |
Read 16/24/32 bit little endian value from buffer.
buffer | |
position | in buffer |
Referenced by a2dp_subevent_command_accepted_get_a2dp_cid(), a2dp_subevent_command_rejected_get_a2dp_cid(), a2dp_subevent_incoming_connection_established_get_a2dp_cid(), a2dp_subevent_signaling_connection_released_get_a2dp_cid(), a2dp_subevent_signaling_media_codec_other_configuration_get_a2dp_cid(), a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(), a2dp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(), a2dp_subevent_signaling_media_codec_sbc_configuration_get_a2dp_cid(), a2dp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(), a2dp_subevent_stream_established_get_a2dp_cid(), a2dp_subevent_stream_released_get_a2dp_cid(), a2dp_subevent_stream_started_get_a2dp_cid(), a2dp_subevent_stream_stopped_get_a2dp_cid(), a2dp_subevent_stream_suspended_get_a2dp_cid(), a2dp_subevent_streaming_can_send_media_packet_now_get_a2dp_cid(), ad_data_contains_uuid128(), ad_data_contains_uuid16(), ancs_chunk_parser_handle_byte(), att_dump_attributes(), att_event_handle_value_indication_complete_get_attribute_handle(), att_event_handle_value_indication_complete_get_conn_handle(), att_event_mtu_exchange_complete_get_handle(), att_event_mtu_exchange_complete_get_MTU(), att_event_packet_handler(), att_iterator_fetch_next(), att_iterator_match_uuid(), att_iterator_match_uuid16(), att_run_for_context(), att_uuid_for_handle(), att_write_callback(), avdtp_subevent_signaling_accept_get_avdtp_cid(), avdtp_subevent_signaling_connection_established_get_avdtp_cid(), avdtp_subevent_signaling_connection_released_get_avdtp_cid(), avdtp_subevent_signaling_general_reject_get_avdtp_cid(), avdtp_subevent_signaling_media_codec_other_capability_get_avdtp_cid(), avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_information_len(), avdtp_subevent_signaling_media_codec_other_capability_get_media_codec_type(), avdtp_subevent_signaling_media_codec_other_configuration_get_avdtp_cid(), avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_information_len(), avdtp_subevent_signaling_media_codec_other_configuration_get_media_codec_type(), avdtp_subevent_signaling_media_codec_sbc_capability_get_avdtp_cid(), avdtp_subevent_signaling_media_codec_sbc_configuration_get_avdtp_cid(), avdtp_subevent_signaling_media_codec_sbc_configuration_get_sampling_frequency(), avdtp_subevent_signaling_reject_get_avdtp_cid(), avdtp_subevent_signaling_sep_found_get_avdtp_cid(), avdtp_subevent_streaming_can_send_media_packet_now_get_avdtp_cid(), avdtp_subevent_streaming_can_send_media_packet_now_get_sequence_number(), avdtp_subevent_streaming_connection_established_get_avdtp_cid(), avdtp_subevent_streaming_connection_released_get_avdtp_cid(), avrcp_subevent_company_ids_query_get_avrcp_cid(), avrcp_subevent_connection_established_get_avrcp_cid(), avrcp_subevent_connection_released_get_avrcp_cid(), avrcp_subevent_enable_notification_complete_get_avrcp_cid(), avrcp_subevent_event_ids_query_get_avrcp_cid(), avrcp_subevent_notification_available_players_changed_get_avrcp_cid(), avrcp_subevent_notification_now_playing_content_changed_get_avrcp_cid(), avrcp_subevent_notification_playback_status_changed_get_avrcp_cid(), avrcp_subevent_notification_track_changed_get_avrcp_cid(), avrcp_subevent_notification_volume_changed_get_avrcp_cid(), avrcp_subevent_now_playing_album_info_get_avrcp_cid(), avrcp_subevent_now_playing_artist_info_get_avrcp_cid(), avrcp_subevent_now_playing_genre_info_get_avrcp_cid(), avrcp_subevent_now_playing_info_done_get_avrcp_cid(), avrcp_subevent_now_playing_song_length_ms_info_get_avrcp_cid(), avrcp_subevent_now_playing_title_info_get_avrcp_cid(), avrcp_subevent_now_playing_total_tracks_info_get_avrcp_cid(), avrcp_subevent_now_playing_track_info_get_avrcp_cid(), avrcp_subevent_operation_complete_get_avrcp_cid(), avrcp_subevent_operation_get_avrcp_cid(), avrcp_subevent_operation_start_get_avrcp_cid(), avrcp_subevent_play_status_get_avrcp_cid(), avrcp_subevent_play_status_query_get_avrcp_cid(), avrcp_subevent_player_application_value_response_get_avrcp_cid(), avrcp_subevent_set_absolute_volume_response_get_avrcp_cid(), avrcp_subevent_shuffle_and_repeat_mode_get_avrcp_cid(), battery_service_write_callback(), bnep_event_can_send_now_get_bnep_cid(), bnep_event_can_send_now_get_destination_uuid(), bnep_event_can_send_now_get_source_uuid(), bnep_event_channel_closed_get_bnep_cid(), bnep_event_channel_closed_get_destination_uuid(), bnep_event_channel_closed_get_source_uuid(), bnep_event_channel_opened_get_bnep_cid(), bnep_event_channel_opened_get_destination_uuid(), bnep_event_channel_opened_get_mtu(), bnep_event_channel_opened_get_source_uuid(), bnep_event_channel_timeout_get_bnep_cid(), bnep_event_channel_timeout_get_destination_uuid(), bnep_event_channel_timeout_get_source_uuid(), bnep_event_service_registered_get_service_uuid(), characteristic_start_found(), event_handler(), gap_event_inquiry_result_get_clock_offset(), gap_event_security_level_get_handle(), gatt_client_att_packet_handler(), gatt_client_deserialize_characteristic(), gatt_client_deserialize_characteristic_descriptor(), gatt_client_deserialize_service(), gatt_client_hci_event_packet_handler(), get_last_result_handle_from_characteristics_list(), get_last_result_handle_from_included_services_list(), get_last_result_handle_from_service_list(), goep_subevent_can_send_now_get_goep_cid(), goep_subevent_connection_closed_get_goep_cid(), goep_subevent_connection_opened_get_con_handle(), goep_subevent_connection_opened_get_goep_cid(), handle_exchange_mtu_request(), handle_find_by_type_value_request(), handle_find_information_request(), handle_hci_event(), handle_prepare_write_request(), handle_read_blob_request(), handle_read_by_group_type_request(), handle_read_by_type_request(), handle_read_multiple_request2(), handle_read_request(), handle_write_command(), handle_write_request(), hci_event_authentication_complete_event_get_connection_handle(), hci_event_change_connection_link_key_complete_get_connection_handle(), hci_event_command_complete_get_command_opcode(), hci_event_command_status_get_command_opcode(), hci_event_connection_complete_get_connection_handle(), hci_event_connection_packet_type_changed_get_handle(), hci_event_connection_packet_type_changed_get_packet_types(), hci_event_disconnection_complete_get_connection_handle(), hci_event_encryption_change_get_connection_handle(), hci_event_encryption_key_refresh_complete_get_handle(), hci_event_extended_inquiry_response_get_clock_offset(), hci_event_inquiry_result_get_clock_offset(), hci_event_inquiry_result_with_rssi_get_clock_offset(), hci_event_master_link_key_complete_get_connection_handle(), hci_event_max_slots_changed_get_handle(), hci_event_mode_change_event_get_handle(), hci_event_mode_change_event_get_interval(), hci_event_read_clock_offset_complete_get_clock_offset(), hci_event_read_clock_offset_complete_get_handle(), hci_event_synchronous_connection_complete_get_handle(), hci_event_synchronous_connection_complete_get_rx_packet_length(), hci_event_synchronous_connection_complete_get_tx_packet_length(), hci_initializing_event_handler(), hci_initializing_run(), hci_send_acl_packet_fragments(), hci_send_cmd_packet(), hci_subevent_le_connection_complete_get_conn_interval(), hci_subevent_le_connection_complete_get_conn_latency(), hci_subevent_le_connection_complete_get_connection_handle(), hci_subevent_le_connection_complete_get_supervision_timeout(), hci_subevent_le_connection_update_complete_get_conn_interval(), hci_subevent_le_connection_update_complete_get_conn_latency(), hci_subevent_le_connection_update_complete_get_connection_handle(), hci_subevent_le_connection_update_complete_get_supervision_timeout(), hci_subevent_le_data_length_change_get_connection_handle(), hci_subevent_le_data_length_change_get_max_rx_octets(), hci_subevent_le_data_length_change_get_max_rx_time(), hci_subevent_le_data_length_change_get_max_tx_octets(), hci_subevent_le_data_length_change_get_max_tx_time(), hci_subevent_le_enhanced_connection_complete_get_conn_interval(), hci_subevent_le_enhanced_connection_complete_get_conn_latency(), hci_subevent_le_enhanced_connection_complete_get_connection_handle(), hci_subevent_le_enhanced_connection_complete_get_supervision_timeout(), hci_subevent_le_long_term_key_request_get_connection_handle(), hci_subevent_le_long_term_key_request_get_encryption_diversifier(), hci_subevent_le_read_remote_used_features_complete_get_connection_handle(), hci_subevent_le_read_remote_used_features_complete_get_encryption_diversifier(), hci_subevent_le_remote_connection_parameter_request_get_connection_handle(), hci_subevent_le_remote_connection_parameter_request_get_interval_max(), hci_subevent_le_remote_connection_parameter_request_get_interval_min(), hci_subevent_le_remote_connection_parameter_request_get_latency(), hci_subevent_le_remote_connection_parameter_request_get_timeout(), hci_transport_h4_block_read(), hfp_subevent_audio_connection_established_get_handle(), hfp_subevent_service_level_connection_established_get_con_handle(), hid_subevent_can_send_now_get_hid_cid(), hid_subevent_connection_closed_get_hid_cid(), hid_subevent_connection_opened_get_con_handle(), hid_subevent_connection_opened_get_hid_cid(), hids_subevent_boot_keyboard_input_report_enable_get_con_handle(), hids_subevent_boot_mouse_input_report_enable_get_con_handle(), hids_subevent_can_send_now_get_con_handle(), hids_subevent_input_report_enable_get_con_handle(), hids_subevent_protocol_mode_get_con_handle(), hsp_subevent_audio_connection_complete_get_handle(), is_value_valid(), l2cap_acl_classic_handler(), l2cap_acl_le_handler(), l2cap_event_can_send_now_get_local_cid(), l2cap_event_channel_closed_get_local_cid(), l2cap_event_channel_opened_get_flush_timeout(), l2cap_event_channel_opened_get_handle(), l2cap_event_channel_opened_get_local_cid(), l2cap_event_channel_opened_get_local_mtu(), l2cap_event_channel_opened_get_psm(), l2cap_event_channel_opened_get_remote_cid(), l2cap_event_channel_opened_get_remote_mtu(), l2cap_event_connection_parameter_update_request_get_handle(), l2cap_event_connection_parameter_update_request_get_interval_max(), l2cap_event_connection_parameter_update_request_get_interval_min(), l2cap_event_connection_parameter_update_request_get_latencey(), l2cap_event_connection_parameter_update_request_get_timeout_multiplier(), l2cap_event_connection_parameter_update_response_get_handle(), l2cap_event_connection_parameter_update_response_get_result(), l2cap_event_incoming_connection_get_handle(), l2cap_event_incoming_connection_get_local_cid(), l2cap_event_incoming_connection_get_psm(), l2cap_event_incoming_connection_get_remote_cid(), l2cap_event_le_can_send_now_get_local_cid(), l2cap_event_le_channel_closed_get_local_cid(), l2cap_event_le_channel_opened_get_handle(), l2cap_event_le_channel_opened_get_local_cid(), l2cap_event_le_channel_opened_get_local_mtu(), l2cap_event_le_channel_opened_get_psm(), l2cap_event_le_channel_opened_get_remote_cid(), l2cap_event_le_channel_opened_get_remote_mtu(), l2cap_event_le_incoming_connection_get_handle(), l2cap_event_le_incoming_connection_get_local_cid(), l2cap_event_le_incoming_connection_get_psm(), l2cap_event_le_incoming_connection_get_remote_cid(), l2cap_event_le_incoming_connection_get_remote_mtu(), l2cap_event_le_packet_sent_get_local_cid(), l2cap_hci_event_handler(), pbap_subevent_connection_closed_get_goep_cid(), pbap_subevent_connection_opened_get_con_handle(), pbap_subevent_connection_opened_get_pbap_cid(), pbap_subevent_operation_completed_get_goep_cid(), report_gatt_all_characteristic_descriptors(), report_gatt_characteristics(), report_gatt_services(), rfcomm_event_can_send_now_get_rfcomm_cid(), rfcomm_event_channel_closed_get_rfcomm_cid(), rfcomm_event_channel_opened_get_con_handle(), rfcomm_event_channel_opened_get_max_frame_size(), rfcomm_event_channel_opened_get_rfcomm_cid(), rfcomm_event_incoming_connection_get_rfcomm_cid(), rfcomm_event_remote_line_status_get_rfcomm_cid(), rfcomm_event_remote_modem_status_get_rfcomm_cid(), sdp_event_query_attribute_byte_get_attribute_id(), sdp_event_query_attribute_byte_get_attribute_length(), sdp_event_query_attribute_byte_get_data_offset(), sdp_event_query_attribute_byte_get_record_id(), sdp_event_query_attribute_value_get_attribute_id(), sdp_event_query_attribute_value_get_attribute_length(), sdp_event_query_attribute_value_get_record_id(), sdp_event_query_service_record_handle_get_record_index(), sdp_event_query_service_record_handle_get_total_count(), sm_event_packet_handler(), sm_pdu_handler(), and uuid16_from_uuid().
uint32_t little_endian_read_24 | ( | const uint8_t * | buffer, |
int | position | ||
) |
uint32_t little_endian_read_32 | ( | const uint8_t * | buffer, |
int | position | ||
) |
Referenced by att_run_for_context(), avrcp_subevent_now_playing_song_length_ms_info_get_song_length(), avrcp_subevent_play_status_get_song_length(), avrcp_subevent_play_status_get_song_position(), handle_hci_event(), hci_event_user_confirmation_request_get_numeric_value(), sdp_event_query_service_record_handle_get_record_handle(), and sm_handle_random_result().
void little_endian_store_16 | ( | uint8_t * | buffer, |
uint16_t | position, | ||
uint16_t | value | ||
) |
Write 16/32 bit little endian value into buffer.
buffer | |
position | in buffer |
value |
Referenced by acl_handler(), att_db_util_add_attribute_uuid128(), att_db_util_add_attribute_uuid16(), att_db_util_add_characteristic_uuid128(), att_db_util_add_characteristic_uuid16(), att_db_util_add_client_characteristic_configuration(), att_db_util_add_service_uuid16(), att_emit_mtu_event(), att_exchange_mtu_request(), att_find_by_type_value_request(), att_find_information_request(), att_handle_value_indication_notify_client(), att_prepare_write_request(), att_read_blob_request(), att_read_by_type_or_group_request_for_uuid128(), att_read_by_type_or_group_request_for_uuid16(), att_read_callback_handle_little_endian_16(), att_read_multiple_request(), att_read_request(), att_write_request(), battery_service_read_callback(), device_information_service_server_set_ieee_regulatory_certification(), device_information_service_server_set_pnp_id(), device_information_service_server_set_system_id(), emit_gatt_all_characteristic_descriptors_result_event(), emit_gatt_characteristic_query_result_event(), emit_gatt_complete_event(), emit_gatt_included_service_query_result_event(), emit_gatt_service_query_result_event(), gatt_client_write_client_characteristic_configuration(), gatt_server_get_get_handle_range_for_service_with_uuid16(), handle_exchange_mtu_request(), handle_find_by_type_value_request2(), handle_find_information_request2(), handle_read_by_group_type_request2(), handle_read_by_type_request2(), hci_dump_packet(), hci_emit_disconnection_complete(), hci_send_acl_packet_fragments(), hids_device_can_send_now(), hids_device_emit_event_with_uint8(), l2cap_create_signaling_internal(), l2cap_emit_can_send_now(), l2cap_run(), l2cap_setup_header(), notify_client_simple(), notify_client_text(), prepare_handle_value(), send_gatt_by_uuid_request(), setup_characteristic_value_packet(), setup_error(), setup_long_characteristic_value_packet(), sm_pdu_handler(), sm_run(), and sm_setup_event_base().
void little_endian_store_32 | ( | uint8_t * | buffer, |
uint16_t | position, | ||
uint32_t | value | ||
) |
int nibble_for_char | ( | char | c | ) |
void printf_hexdump | ( | const void * | data, |
int | size | ||
) |
Use printf to write hexdump as single line of data.
Referenced by printf_packet().
void reverse_128 | ( | const uint8_t * | src, |
uint8_t * | dest | ||
) |
References reverse_bytes().
Referenced by ad_data_contains_uuid128(), ad_data_contains_uuid16(), att_db_util_add_attribute_uuid128(), att_db_util_add_characteristic_uuid128(), att_db_util_add_service_uuid128(), att_dump_attributes(), att_read_by_type_or_group_request_for_uuid128(), characteristic_start_found(), emit_gatt_all_characteristic_descriptors_result_event(), emit_gatt_characteristic_query_result_event(), emit_gatt_included_service_query_result_event(), emit_gatt_service_query_result_event(), gatt_client_att_packet_handler(), gatt_client_deserialize_characteristic(), gatt_client_deserialize_characteristic_descriptor(), gatt_client_deserialize_service(), report_gatt_all_characteristic_descriptors(), report_gatt_services(), send_gatt_by_uuid_request(), sm_aes128_start(), sm_handle_encryption_result(), sm_pdu_handler(), and sm_run().
void reverse_24 | ( | const uint8_t * | src, |
uint8_t * | dest | ||
) |
Wrapper around reverse_bytes for common buffer sizes.
src | |
dest |
References reverse_bytes().
Referenced by sm_handle_encryption_result().
void reverse_256 | ( | const uint8_t * | src, |
uint8_t * | dest | ||
) |
References reverse_bytes().
Referenced by sm_pdu_handler(), and sm_run().
void reverse_48 | ( | const uint8_t * | src, |
uint8_t * | dest | ||
) |
References reverse_bytes().
void reverse_56 | ( | const uint8_t * | src, |
uint8_t * | dest | ||
) |
References reverse_bytes().
Referenced by sm_c1_t1().
void reverse_64 | ( | const uint8_t * | src, |
uint8_t * | dest | ||
) |
References reverse_bytes().
Referenced by sm_event_packet_handler(), sm_handle_random_result(), sm_pdu_handler(), and sm_run().
References reverse_bytes().
Referenced by a2dp_subevent_incoming_connection_established_get_bd_addr(), a2dp_subevent_stream_established_get_bd_addr(), att_event_packet_handler(), atwilc3000_set_bd_addr_command(), avdtp_subevent_signaling_connection_established_get_bd_addr(), avdtp_subevent_streaming_connection_established_get_bd_addr(), avrcp_subevent_connection_established_get_bd_addr(), bnep_event_can_send_now_get_remote_address(), bnep_event_channel_closed_get_remote_address(), bnep_event_channel_opened_get_remote_address(), bnep_event_channel_timeout_get_remote_address(), event_handler(), gap_event_advertising_report_get_address(), gap_event_dedicated_bonding_completed_get_address(), gap_event_inquiry_result_get_bd_addr(), goep_subevent_connection_opened_get_bd_addr(), hci_emit_dedicated_bonding_result(), hci_event_connection_complete_get_bd_addr(), hci_event_connection_request_get_bd_addr(), hci_event_extended_inquiry_response_get_bd_addr(), hci_event_inquiry_result_get_bd_addr(), hci_event_inquiry_result_with_rssi_get_bd_addr(), hci_event_link_key_request_get_bd_addr(), hci_event_pin_code_request_get_bd_addr(), hci_event_remote_name_request_complete_get_bd_addr(), hci_event_remote_oob_data_request_get_bd_addr(), hci_event_role_change_get_bd_addr(), hci_event_sco_can_send_now_get_handle(), hci_event_simple_pairing_complete_get_bd_addr(), hci_event_synchronous_connection_complete_get_bd_addr(), hci_event_user_confirmation_request_get_bd_addr(), hci_event_user_passkey_request_get_bd_addr(), hci_send_cmd_packet(), hci_subevent_le_connection_complete_get_peer_address(), hci_subevent_le_enhanced_connection_complete_get_local_resolvable_private_addres(), hci_subevent_le_enhanced_connection_complete_get_peer_resolvable_private_addres(), hci_subevent_le_enhanced_connection_complete_get_perr_addresss(), hfp_subevent_audio_connection_established_get_bd_addr(), hfp_subevent_service_level_connection_established_get_bd_addr(), hid_subevent_connection_opened_get_bd_addr(), l2cap_event_channel_opened_get_address(), l2cap_event_incoming_connection_get_address(), l2cap_event_le_channel_opened_get_address(), l2cap_event_le_incoming_connection_get_address(), l2cap_hci_event_handler(), pbap_subevent_connection_opened_get_bd_addr(), rfcomm_event_channel_opened_get_bd_addr(), rfcomm_event_incoming_connection_get_bd_addr(), sm_event_packet_handler(), sm_notify_client_index(), sm_pdu_handler(), sm_run(), and sm_setup_event_base().
void reverse_bytes | ( | const uint8_t * | src, |
uint8_t * | dest, | ||
int | len | ||
) |
Copy from source to destination and reverse byte order.
src | |
dest | |
len |
Referenced by hci_cmd_create_from_template(), hci_subevent_le_generate_dhkey_complete_get_dhkey(), hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_x(), hci_subevent_le_read_local_p256_public_key_complete_get_dhkey_y(), reverse_128(), reverse_24(), reverse_256(), reverse_48(), reverse_56(), reverse_64(), and reverse_bd_addr().
int sscanf_bd_addr | ( | const char * | addr_string, |
bd_addr_t | addr | ||
) |
Parse Bluetooth address.
address_string | |
buffer | for parsed address |
References bd_addr_copy(), BD_ADDR_LEN, and scan_hex_byte().
int string_len_for_uint32 | ( | uint32_t | i | ) |
Return number of digits of a uint32 number.
uint32_number |
char* uuid128_to_str | ( | const uint8_t * | uuid | ) |
Create human readable representation for UUID128.
References char_for_high_nibble(), char_for_low_nibble(), and uuid128_to_str_buffer.
Referenced by att_dump_attributes().
void uuid_add_bluetooth_prefix | ( | uint8_t * | uuid128, |
uint32_t | short_uuid | ||
) |
Constructs UUID128 from 16 or 32 bit UUID using Bluetooth base UUID.
uuid128 | output buffer |
short_uuid |
References big_endian_store_32().
Referenced by ad_data_contains_uuid128(), ad_data_contains_uuid16(), characteristic_start_found(), gatt_client_discover_characteristics_for_handle_range_by_uuid16(), gatt_client_discover_primary_services_by_uuid16(), gatt_client_read_value_of_characteristics_by_uuid16(), report_gatt_all_characteristic_descriptors(), report_gatt_included_service_uuid16(), and report_gatt_services().
int uuid_has_bluetooth_prefix | ( | const uint8_t * | uuid128 | ) |
Checks if UUID128 has Bluetooth base UUID prefix.
uui128 | to test |
Referenced by gatt_client_deserialize_characteristic(), and gatt_client_deserialize_service().