BLE Utils declarations.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
#include <asf.h>
Macros | |
#define | ALL_UNUSED(...) ALL_UNUSED_IMPL( VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__ ) |
#define | ALL_UNUSED_IMPL(nargs) ALL_UNUSED_IMPL_(nargs) |
#define | ALL_UNUSED_IMPL_(nargs) UNUSED ## nargs |
#define | BLE_ASSERT (true) |
#define | ble_assert(expr) |
#define | BLE_ROLE_ALL 0x0F |
Device has all role, both peripheral and central. More... | |
#define | BLE_ROLE_BROADCASTER 0x02 |
Broadcaster role. More... | |
#define | BLE_ROLE_CENTRAL 0x05 |
Master/Central role. More... | |
#define | BLE_ROLE_OBSERVER 0x01 |
Observer role. More... | |
#define | BLE_ROLE_PERIPHERAL 0x0A |
Peripheral/Slave role. More... | |
#define | BLE_SDK_BUILD_NO(version) (version & 0x0000FFFF) |
#define | BLE_SDK_MAJOR_NO(version) ((version >> 28) & 0x0000000F) |
BluSDK version. More... | |
#define | BLE_SDK_MINOR_NO(version) ((version >> 24) & 0x0000000F) |
#define | BLE_SDK_MINOR_NO_INC (1) |
#define | BLE_SDK_VERSION BLUSDK_VER_6_1 |
#define | BLU_SDK_API |
#define | BLUSDK_VER_6_0 (0x60000000) |
#define | BLUSDK_VER_6_1 (0x61000000) |
#define | BTLC1000_MR 0x00 |
#define | BTLC1000_ZR 0x01 |
#define | DBG_LOG |
#define | DBG_LOG_ADV |
#define | DBG_LOG_CONT printf |
#define | DBG_LOG_CONT_DEV ALL_UNUSED |
#define | DBG_LOG_DEV ALL_UNUSED |
#define | DBG_LOG_PTS ALL_UNUSED |
#define | IEEE11073_EXPONENT (0xFF000000) |
#define | IEEE754_MANTISA(val) ((uint32_t)(val * 10)) |
#define | IEEE754_TO_IEEE11073_FLOAT(f_val) |
#define | NIBBLE2ASCII(nibble) (((nibble < 0x0A) ? (nibble + '0') : (nibble + 0x57))) |
#define | UNUSED1(x) (void)(x) |
#define | UNUSED2(x, y) (void)(x),(void)(y) |
#define | UNUSED3(x, y, z) (void)(x),(void)(y),(void)(z) |
#define | UNUSED4(a, x, y, z) (void)(a),(void)(x),(void)(y),(void)(z) |
#define | UNUSED5(a, b, x, y, z) (void)(a),(void)(b),(void)(x),(void)(y),(void)(z) |
#define | UNUSED6(a, b, c, x, y, z) (void)(a),(void)(b),(void)(c),(void)(x),(void)(y),(void)(z) |
#define | UNUSED7(a, b, c, d, x, y, z) (void)(a),(void)(b),(void)(c),(void)(d),(void)(x),(void)(y),(void)(z) |
#define | UNUSED8(a, b, c, d, e, x, y, z) (void)(a),(void)(b),(void)(c),(void)(d),(void)(e),(void)(x),(void)(y),(void)(z) |
#define | VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL(__VA_ARGS__, 8, 7, 6, 5, 4, 3, 2, 1) |
#define | VA_NUM_ARGS_IMPL(_1, _2, _3, _4, _5, _6, _7, _8, N,...) N |
Functions | |
static uint32_t | convert_ieee754_ieee11073_float (float f_val) |
static void | dump_hex_buffer (void *buf, uint32_t len) |
uint8_t | getchar_timeout (uint32_t timeout) |
#define ALL_UNUSED | ( | ... | ) | ALL_UNUSED_IMPL( VA_NUM_ARGS(__VA_ARGS__))(__VA_ARGS__ ) |
Referenced by anp_client_disconnected_event_handler(), anp_info_service_discover(), app_connected_event_handler(), app_connected_state_handler(), app_disconnected_event_handler(), app_disconnected_state_handler(), app_htpt_enable_rsp_handler(), app_htpt_meas_intv_upd_rsp(), app_htptp_meas_intv_chg_req(), bat_init_service(), battery_simulation_task(), ble_conn_param_update(), ble_connected_app_event(), ble_connected_state_handler(), ble_device_dead_handler(), ble_device_out_of_sync_handler(), ble_disconnected_app_event(), ble_enc_status_changed_app_event(), ble_encryption_app_event(), ble_observer_scan_data_handler(), ble_paired_app_event(), ble_resolv_rand_addr_handler(), ble_scan_report_app_event(), ble_send_slave_sec_request(), ble_undefined_event_handler(), blp_sensor_disconnect_event_handler(), blp_sensor_init(), csc_prf_disconnect_event_handler(), csc_prf_init(), dis_info_update(), fmp_locator_connected_state_handler(), fmp_locator_disconnect_event_handler(), fmp_target_connected_state_handler(), fmp_target_disconnect_event_handler(), fmp_target_init(), hid_boot_keyboardreport_update(), hid_boot_mousereport_update(), hid_connect_cb(), hid_disconnect_cb(), hid_prf_disconnect_event_handler(), hr_sensor_disconnect_event_handler(), hr_sensor_init(), main(), pas_client_disconnected_event_handler(), pas_client_write_notifications(), platform_init(), pxp_monitor_scan_data_handler(), pxp_reporter_connected_state_handler(), pxp_reporter_disconnect_event_handler(), pxp_reporter_init(), and sps_disconnected_event_handler().
#define ALL_UNUSED_IMPL | ( | nargs | ) | ALL_UNUSED_IMPL_(nargs) |
#define ALL_UNUSED_IMPL_ | ( | nargs | ) | UNUSED ## nargs |
#define BLE_ASSERT (true) |
#define ble_assert | ( | expr | ) |
Referenced by platform_gpio_set(), platform_init(), and platform_send_sync().
#define BLE_ROLE_ALL 0x0F |
Device has all role, both peripheral and central.
#define BLE_ROLE_BROADCASTER 0x02 |
Broadcaster role.
#define BLE_ROLE_CENTRAL 0x05 |
Master/Central role.
#define BLE_ROLE_OBSERVER 0x01 |
Observer role.
#define BLE_ROLE_PERIPHERAL 0x0A |
Peripheral/Slave role.
#define BLE_SDK_BUILD_NO | ( | version | ) | (version & 0x0000FFFF) |
Referenced by ble_sdk_version().
#define BLE_SDK_MAJOR_NO | ( | version | ) | ((version >> 28) & 0x0000000F) |
BluSDK version.
Referenced by ble_sdk_version().
#define BLE_SDK_MINOR_NO | ( | version | ) | ((version >> 24) & 0x0000000F) |
Referenced by ble_sdk_version().
#define BLE_SDK_MINOR_NO_INC (1) |
Referenced by ble_sdk_version().
#define BLE_SDK_VERSION BLUSDK_VER_6_1 |
Referenced by ble_sdk_version().
#define BLU_SDK_API |
#define BLUSDK_VER_6_0 (0x60000000) |
#define BLUSDK_VER_6_1 (0x61000000) |
#define BTLC1000_MR 0x00 |
#define BTLC1000_ZR 0x01 |
#define DBG_LOG |
#define DBG_LOG_ADV |
Referenced by ble_advertisement_data_set().
#define DBG_LOG_CONT printf |
Referenced by ble_heart_rate_process(), ble_observer_scan_info_handler(), ble_pair_key_request_handler(), ble_scan_report_app_event(), blp_char_indication(), display_ringer_setting_info(), dump_hex_buffer(), hr_measurment_send(), lls_alert_read_response(), platform_send_sync(), pxp_monitor_scan_data_handler(), rssi_update(), tis_current_time_read_response(), and tis_dst_change_read_response().
#define DBG_LOG_CONT_DEV ALL_UNUSED |
Referenced by ble_pair_done_handler(), and ble_pair_request_handler().
#define DBG_LOG_DEV ALL_UNUSED |
Referenced by alert_service_discovery(), anp_alert_notify_response(), anp_alert_read_response(), anp_client_characteristic_found_handler(), anp_client_descriptor_found_handler(), anp_client_disable_notification(), anp_client_discovery_complete_handler(), anp_client_security_done_handler(), anp_client_service_found_handler(), anp_client_write_notification_handler(), anp_client_write_response_handler(), app_alert_status_notify(), app_alert_status_read(), app_connected_state(), app_htpt_temp_send_cfm(), app_indication_confirmation_handler(), app_notification_cfm_handler(), app_notification_confirmation_handler(), app_pair_done_event_handler(), app_read_response_cb(), app_ringer_setting_notify(), app_ringer_setting_read(), bat_update_char_value(), ble_advertisement_data_set(), ble_characteristic_write_cmd_complete_handler(), ble_conn_param_update(), ble_connected_state_handler(), ble_disconnected_state_handler(), ble_dummy_handler(), ble_encryption_request_handler(), ble_event_manager(), ble_mtu_changed_cmd_complete_handler(), ble_mtu_changed_indication_handler(), ble_notification_confirmed_app_event(), ble_observer_custom_event(), ble_observer_scan_info_handler(), ble_pair_done_handler(), ble_pair_key_request_handler(), ble_pair_request_handler(), ble_resolv_rand_addr_handler(), ble_scan_info_handler(), ble_sdk_version(), ble_send_slave_sec_request(), ble_slave_security_handler(), ble_trans_char_changed_event(), ble_undefined_event_handler(), BLE_UNUSED2_VAR(), blp_indication_confirmation_handler(), blp_notification_confirmation_handler(), button_cb(), csc_notification_confirmation_handler(), csc_prf_connected_state_handler(), csc_prf_discovery_complete_handler(), csc_prf_service_found_handler(), fmp_locator_discovery_complete_handler(), fmp_locator_service_discover(), heart_rate_update_char_value(), hid_boot_keyboardreport_update(), hid_boot_mousereport_update(), hid_get_reportchar(), hid_get_reportid(), hid_notification_confirmed_cb(), hid_ntf_instance(), hid_prf_boot_ntf_cb(), hid_prf_char_changed_handler(), hid_prf_control_point_ntf_cb(), hid_prf_init(), hid_prf_protocol_mode_ntf_cb(), hid_prf_report_ntf_cb(), hid_serv_get_instance(), hid_serv_report_update(), hid_service_dbreg(), hr_sensor_char_write_request(), hr_sensor_notification_cfm_handler(), hr_sensor_service_define(), l2cap_conn_req(), l2cap_data_recv(), pas_client_char_read_response_handler(), pas_client_char_write_response_handler(), pas_client_characteristic_found_handler(), pas_client_descriptor_found_handler(), pas_client_discovery_complete_handler(), pas_client_notification_handler(), pas_client_start_service_discovery(), pxp_monitor_characteristic_read_response(), pxp_monitor_discovery_complete_handler(), pxp_monitor_service_discover(), pxp_service_define(), sps_notification_confirmed_cb(), sps_scan_refresh_char_update(), time_info_connected_state_handler(), time_info_discovery_complete_handler(), time_info_service_discovery(), tip_app_custom_event(), tip_disconnect_cb(), tip_discovery_complete_cb(), tip_encryption_status_changed_cb(), and tip_pair_done_cb().
#define DBG_LOG_PTS ALL_UNUSED |
#define IEEE11073_EXPONENT (0xFF000000) |
#define IEEE754_MANTISA | ( | val | ) | ((uint32_t)(val * 10)) |
#define IEEE754_TO_IEEE11073_FLOAT | ( | f_val | ) |
Referenced by convert_ieee754_ieee11073_float().
#define NIBBLE2ASCII | ( | nibble | ) | (((nibble < 0x0A) ? (nibble + '0') : (nibble + 0x57))) |
#define UNUSED1 | ( | x | ) | (void)(x) |
#define UNUSED2 | ( | x, | |
y | |||
) | (void)(x),(void)(y) |
#define UNUSED3 | ( | x, | |
y, | |||
z | |||
) | (void)(x),(void)(y),(void)(z) |
#define UNUSED4 | ( | a, | |
x, | |||
y, | |||
z | |||
) | (void)(a),(void)(x),(void)(y),(void)(z) |
#define UNUSED5 | ( | a, | |
b, | |||
x, | |||
y, | |||
z | |||
) | (void)(a),(void)(b),(void)(x),(void)(y),(void)(z) |
#define UNUSED6 | ( | a, | |
b, | |||
c, | |||
x, | |||
y, | |||
z | |||
) | (void)(a),(void)(b),(void)(c),(void)(x),(void)(y),(void)(z) |
#define UNUSED7 | ( | a, | |
b, | |||
c, | |||
d, | |||
x, | |||
y, | |||
z | |||
) | (void)(a),(void)(b),(void)(c),(void)(d),(void)(x),(void)(y),(void)(z) |
#define UNUSED8 | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
x, | |||
y, | |||
z | |||
) | (void)(a),(void)(b),(void)(c),(void)(d),(void)(e),(void)(x),(void)(y),(void)(z) |
#define VA_NUM_ARGS | ( | ... | ) | VA_NUM_ARGS_IMPL(__VA_ARGS__, 8, 7, 6, 5, 4, 3, 2, 1) |
#define VA_NUM_ARGS_IMPL | ( | _1, | |
_2, | |||
_3, | |||
_4, | |||
_5, | |||
_6, | |||
_7, | |||
_8, | |||
N, | |||
... | |||
) | N |
|
inlinestatic |
References IEEE754_TO_IEEE11073_FLOAT.
Referenced by htp_temperature_send().
|
inlinestatic |
References buffer, and DBG_LOG_CONT.
uint8_t getchar_timeout | ( | uint32_t | timeout | ) |