BLE API declarations.
Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | ble_characteristic_descriptors_discover_event_t |
BLEDK3 Discover all characteristic descriptors event parameters. More... | |
struct | ble_client_char_config_desc_t |
The client characteristic configuration descriptor attribute definition, used at ble_char_t. More... | |
struct | ble_config_mode_status_event_t |
BLEDK3 BLE Config mode status event parameters. More... | |
struct | ble_descriptor_attribute_data |
BLEDK3 Descriptor attribute data parameters used at ble_characteristic_descriptors_discover_event_t. More... | |
struct | ble_end_test_result_event_t |
BLEDK3 BLE end test result event parameters. More... | |
struct | ble_platform_api_list_t |
Platform APIs registration list used at platform_init_t. More... | |
struct | ble_primary_service_characteristics_discover_event_t |
BLEDK3 Discover primary service/characteristic event parameters. More... | |
struct | ble_primary_service_discover_all_event_t |
BLEDK3 Discover all primary service event parameters. More... | |
struct | ble_status_report_event_t |
BLEDK3 Status report event parameters. More... | |
struct | ble_uuid_t |
UUID. More... | |
union | ble_uuid_val_t |
UUID value. More... | |
struct | bm_cmd_frame_t |
struct | char_desc_discovery_resp_t |
Discover descriptor response event parameters. More... | |
struct | event_mem_t |
Event memory init used at platform_init_t. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | PACKED |
Blue-tooth Low Energy address Type. More... | |
struct | platform_init_t |
Platform initialization, includes event memory init and platform APIs registration. More... | |
Macros | |
#define | ADV_INTERVAL_100_MS 160 |
#define | ADV_INTERVAL_1_S 1600 /* (1600 * 625 us) */ |
#define | ADV_PARAM_DIRECT_ADDR_INDEX 4 |
#define | ADV_PARAM_DIRECT_ADDR_TYPE_INDEX 3 |
#define | ADV_PARAM_INTERVAL_INDEX_HIGH 0 |
#define | ADV_PARAM_INTERVAL_INDEX_LOW 1 |
#define | ADV_PARAM_TYPE_INDEX 2 |
#define | AT_BLE_ADV_INTERVAL_MAX 0x4000 |
Maximum Advertising interval in 625 us units, i.e. More... | |
#define | AT_BLE_ADV_INTERVAL_MIN 0x0020 |
Minimum Advertising interval in 625 us units, i.e. More... | |
#define | BLE_ADDR_LEN 6 |
#define | BLE_ATT_ATTRIBUTE_VALUE_LEN 23 |
The Maximum Length of Attribute Value. More... | |
#define | BLE_ATT_DEFAULT_MTU_LENGTH 23 |
ATT default MTU size. More... | |
#define | BLE_ATTRIB_UUID_LENGTH_16 16 |
Characteristic properties. More... | |
#define | BLE_ATTRIB_UUID_LENGTH_2 2 |
BLE Attribute UUID lengths. More... | |
#define | BLE_ATTRIB_UUID_LENGTH_4 4 |
128-bit Bluetooth UUID. More... | |
#define | BLE_CCCD_INDICATION_ENABLED 0x0002 |
#define | BLE_CCCD_NOTIFICATION_ENABLED 0x0001 |
#define | BLE_CCCD_UUID 0x2902 |
DEFINES. More... | |
#define | BLE_CHAR_BROADCST (0x01 << 0) |
#define | BLE_CHAR_EXT_PROP_RELIABLE_WRITE (0x0001 << 0) |
#define | BLE_CHAR_EXT_PROP_WRITABLE_AUX (0x0001 << 1) |
#define | BLE_CHAR_EXT_PROPERTIES (0x01 << 7) |
Characteristic extended properties. More... | |
#define | BLE_CHAR_INDICATE (0x01 << 5) |
#define | BLE_CHAR_NOTIFY (0x01 << 4) |
#define | BLE_CHAR_READ (0x01 << 1) |
#define | BLE_CHAR_SIGNED_WRITE (0x01 << 6) |
#define | BLE_CHAR_WRITE (0x01 << 3) |
#define | BLE_CHAR_WRITE_WITHOUT_RESPONSE (0x01 << 2) |
#define | BLE_MAX_SERVICE_BUF_LEN 0x01FF |
#define | BLE_PAIR_CONFIRM_NO false |
#define | BLE_PAIR_CONFIRM_YES true |
#define | BLE_PM_MANUAL_READ_RESP 0x80 |
Authorization Permission: Manual sending read response configuration. More... | |
#define | BLE_PM_MANUAL_WRITE_RESP 0x40 |
Authorization Permission: Manual sending write response configuration. More... | |
#define | BLE_PM_SECURITY_READ_ENABLE 0x04 |
Encryption/Authentication Permission on READ property attribute. More... | |
#define | BLE_PM_SECURITY_WRITE_ENABLE 0x08 |
Encryption/Authentication Permission on WRITE property attribute. More... | |
#define | BLE_PM_WRITABLE 0x02 |
< Attribute Permissions. More... | |
#define | BLE_UUID_128B_LEN (1 << BLE_UUID_128B) |
#define | BLE_UUID_16B_LEN (1 << BLE_UUID_16B) |
#define | BM70_BLUETOOTH_DEVICE 2 |
#define | BM77_BLUETOOTH_DEVICE 0 |
#define | BM78_BLUETOOTH_DEVICE 1 |
#define | BMXX_DEVICE (BM70_BLUETOOTH_DEVICE) |
#define | MAX_CHAR_WRITE_VALUE 20 |
#define | MAX_CONN_INTERVAL 0x0C80 |
#define | MAX_SCAN_INTERVAL 0x4000 |
#define | MAX_SCAN_WINDOW 0x4000 |
#define | MAX_SLAVE_LATENCY 0x01F4 |
#define | MAX_SV_TIMEOUT 0x0C80 |
#define | MIN_CONN_INTERVAL 0x0006 |
#define | MIN_SCAN_INTERVAL 0x0004 |
#define | MIN_SCAN_WINDOW 0x0004 |
#define | MIN_SLAVE_LATENCY 0x0000 |
#define | MIN_SV_TIMEOUT 0x000A |
Typedefs | |
typedef struct PACKED | attrib_aggr_format_desc_t |
The Presentation format descriptor attribute definition. More... | |
typedef struct PACKED | attrib_ccd_desc_t |
The Client Characteristic Configuration Descriptor attribute definition. More... | |
typedef struct PACKED | attrib_char_t |
The characteristic attribute definition. More... | |
typedef struct PACKED | attrib_char_value_t |
The characteristic value attribute definition. More... | |
typedef struct PACKED | attrib_ext_prop_desc_t |
The Extended property descriptor attribute definition. More... | |
typedef struct PACKED | attrib_pres_format_desc_t |
The Presentation format descriptor attribute definition. More... | |
typedef struct PACKED | attrib_service_t |
The service attribute definition. More... | |
typedef struct PACKED | attrib_user_desc_t |
The User descriptor attribute definition. More... | |
typedef struct PACKED | ble_addr_t |
Blue-tooth Low Energy address Type. More... | |
typedef struct PACKED | ble_adv_report_event_t |
BLEDK3 Advertisement report event parameters. More... | |
typedef uint8_t | ble_attr_permissions_t |
typedef struct PACKED | ble_char_ext_properties_t |
The characteristic extended properties descriptor attribute definition, used at ble_char_t. More... | |
typedef struct PACKED | ble_char_presentation_format_t |
The characteristic presentation format descriptor attribute definition, used at ble_char_t. More... | |
typedef uint8_t | ble_char_properties_t |
typedef struct PACKED | ble_char_t |
The characteristic attribute definition, used at ble_service_t. More... | |
typedef struct PACKED | ble_char_val_t |
The characteristic value attribute definition, used at ble_char_t. More... | |
typedef struct PACKED | ble_characteristic_attribute_data |
BLEDK3 Characteristic attribute data parameters used at ble_primary_service_characteristics_discover_event_t. More... | |
typedef struct PACKED | ble_characteristic_value_received_event_t |
BLEDK3 Characteristic value received event parameters. More... | |
typedef struct PACKED | ble_characteristic_value_write_event_t |
typedef struct PACKED | ble_cmd_complete_event_t |
BLEDK3 Command complete event parameters. More... | |
typedef struct PACKED | ble_conn_complete_event_t |
BLEDK3 Connection complete event parameters. More... | |
typedef struct PACKED | ble_conn_param_t |
BLE Connection parameters. More... | |
typedef struct PACKED | ble_conn_param_update_event_t |
BLEDK3 Connection parameter update event parameters. More... | |
typedef struct PACKED | ble_disconnect_complete_event_t |
BLEDK3 Disconnect complete event parameters. More... | |
typedef struct PACKED | ble_enable_transparent_uart_t |
BLEDK3 Enable TransparentUART command parameters. More... | |
typedef struct PACKED | ble_generic_att_private_desc_t |
The private descriptor attribute definition. More... | |
typedef struct PACKED | ble_generic_att_public_desc_t |
The public descriptor attribute definition. More... | |
typedef struct PACKED | ble_generic_desc_t |
The generic descriptor attribute definition, used at ble_char_t. More... | |
typedef uint16_t | ble_handle_t |
typedef bool | ble_pair_confirm_t |
typedef struct PACKED | ble_rand_addr_changed_t |
typedef ble_client_char_config_desc_t | ble_server_char_config_desc_t |
The server characteristic configuration descriptor attribute definition, used at ble_char_t. More... | |
typedef struct PACKED | ble_service_attribute_data |
BLEDK3 Service attribute data parameters used at ble_primary_service_discover_all_event_t. More... | |
typedef struct PACKED | ble_service_t |
The service attribute definition. More... | |
typedef struct PACKED | ble_set_conn_param_t |
BLEDK3 Set connection parameter command parameters. More... | |
typedef struct PACKED | ble_transparent_uart_data_received_event_t |
BLEDK3 TransparentUART data received event parameters. More... | |
typedef struct PACKED | ble_transparent_uart_data_write_event_t |
typedef struct PACKED | ble_user_desc_t |
The user descriptor attribute definition, used at ble_char_t. More... | |
typedef struct PACKED | ble_write_char_value_event_t |
BLEDK3 Write characteristic value event parameters. More... | |
typedef BM_APPLICATION_EVENT_OPCODE | bm_app_event_opcode_t |
typedef void *(* | create_timer_cb_t )(void(*)(void *)) |
Create timer callback type. More... | |
typedef void(* | delete_timer_cb_t )(void *) |
Delete timer callback type. More... | |
typedef void(* | gpio_set_cb_t )(gpio_pin_t, gpio_status_t) |
GPIO set callback type. More... | |
typedef void(* | mode_get_cb_t )(BM_MODE *) |
Mode get callback type. More... | |
typedef void(* | mode_set_cb_t )(BM_MODE) |
Mode set callback type. More... | |
typedef struct PACKED | primary_service_char_discovery_resp_t |
Discover service, characteristic response event parameters. More... | |
typedef void(* | sleep_timer_cb_t )(uint32_t) |
Sleep timer callback type. More... | |
typedef void(* | start_timer_cb_t )(void *, uint32_t) |
Start timer callback type. More... | |
typedef void(* | stop_timer_cb_t )(void *) |
Stop timer callback type. More... | |
typedef void(* | uart_read_async_cb_t )(void(*)(uint16_t)) |
UART read asynchronous callback type. More... | |
typedef void(* | uart_recv_async_cb_t )(uint16_t) |
UART receive asynchronous callback type. More... | |
typedef void(* | uart_write_sync_cb_t )(uint8_t *, uint32_t) |
UART write synchronous callback type. More... | |
#define ADV_INTERVAL_100_MS 160 |
#define ADV_INTERVAL_1_S 1600 /* (1600 * 625 us) */ |
#define ADV_PARAM_DIRECT_ADDR_INDEX 4 |
Referenced by ble_adv_param_set().
#define ADV_PARAM_DIRECT_ADDR_TYPE_INDEX 3 |
Referenced by ble_adv_param_set().
#define ADV_PARAM_INTERVAL_INDEX_HIGH 0 |
Referenced by ble_adv_param_set().
#define ADV_PARAM_INTERVAL_INDEX_LOW 1 |
Referenced by ble_adv_param_set().
#define ADV_PARAM_TYPE_INDEX 2 |
Referenced by ble_adv_param_set().
#define AT_BLE_ADV_INTERVAL_MAX 0x4000 |
#define AT_BLE_ADV_INTERVAL_MIN 0x0020 |
#define BLE_ADDR_LEN 6 |
Referenced by app_connected_cb(), ble_adv_param_set(), and ble_mgr_connected_cb().
#define BLE_ATT_ATTRIBUTE_VALUE_LEN 23 |
The Maximum Length of Attribute Value.
Refer to ATT default MTU size.
Referenced by ble_gatt_service_create().
#define BLE_ATT_DEFAULT_MTU_LENGTH 23 |
ATT default MTU size.
#define BLE_ATTRIB_UUID_LENGTH_16 16 |
Characteristic properties.
#define BLE_ATTRIB_UUID_LENGTH_2 2 |
BLE Attribute UUID lengths.
< 16-bit Bluetooth UUID. 32-bit Bluetooth UUID.
Referenced by ble_gatt_service_create().
#define BLE_ATTRIB_UUID_LENGTH_4 4 |
128-bit Bluetooth UUID.
#define BLE_CCCD_INDICATION_ENABLED 0x0002 |
#define BLE_CCCD_NOTIFICATION_ENABLED 0x0001 |
#define BLE_CCCD_UUID 0x2902 |
DEFINES.
#define BLE_CHAR_BROADCST (0x01 << 0) |
#define BLE_CHAR_EXT_PROP_RELIABLE_WRITE (0x0001 << 0) |
#define BLE_CHAR_EXT_PROP_WRITABLE_AUX (0x0001 << 1) |
#define BLE_CHAR_EXT_PROPERTIES (0x01 << 7) |
Characteristic extended properties.
#define BLE_CHAR_INDICATE (0x01 << 5) |
#define BLE_CHAR_NOTIFY (0x01 << 4) |
Referenced by acc_gyro_sensor_service_init().
#define BLE_CHAR_READ (0x01 << 1) |
Referenced by acc_gyro_sensor_service_init().
#define BLE_CHAR_SIGNED_WRITE (0x01 << 6) |
#define BLE_CHAR_WRITE (0x01 << 3) |
#define BLE_CHAR_WRITE_WITHOUT_RESPONSE (0x01 << 2) |
#define BLE_MAX_SERVICE_BUF_LEN 0x01FF |
Referenced by ble_gatt_service_create().
#define BLE_PAIR_CONFIRM_NO false |
#define BLE_PAIR_CONFIRM_YES true |
#define BLE_PM_MANUAL_READ_RESP 0x80 |
Authorization Permission: Manual sending read response configuration.
Application can send read response with data manually.
#define BLE_PM_MANUAL_WRITE_RESP 0x40 |
Authorization Permission: Manual sending write response configuration.
Application can send write response manually.
#define BLE_PM_SECURITY_READ_ENABLE 0x04 |
Encryption/Authentication Permission on READ property attribute.
If enabled, it requires pairing to device to access the attribute. Note that Encryption or Authentication permission is based on IO capability of device.
#define BLE_PM_SECURITY_WRITE_ENABLE 0x08 |
Encryption/Authentication Permission on WRITE property attribute.
If enabled, it requires pairing to device to access the attribute. Note that Encryption or Authentication permission is based on IO capability of device.
#define BLE_PM_WRITABLE 0x02 |
< Attribute Permissions.
All attributes are readable as default. Access Permission: Writeable.
Referenced by acc_gyro_sensor_service_init().
#define BLE_UUID_128B_LEN (1 << BLE_UUID_128B) |
#define BLE_UUID_16B_LEN (1 << BLE_UUID_16B) |
#define BM70_BLUETOOTH_DEVICE 2 |
#define BM77_BLUETOOTH_DEVICE 0 |
#define BM78_BLUETOOTH_DEVICE 1 |
#define BMXX_DEVICE (BM70_BLUETOOTH_DEVICE) |
#define MAX_CHAR_WRITE_VALUE 20 |
#define MAX_CONN_INTERVAL 0x0C80 |
Referenced by ble_update_connection_parameters().
#define MAX_SCAN_INTERVAL 0x4000 |
Referenced by ble_scan_param_set().
#define MAX_SCAN_WINDOW 0x4000 |
Referenced by ble_scan_param_set().
#define MAX_SLAVE_LATENCY 0x01F4 |
Referenced by ble_update_connection_parameters().
#define MAX_SV_TIMEOUT 0x0C80 |
Referenced by ble_update_connection_parameters().
#define MIN_CONN_INTERVAL 0x0006 |
Referenced by ble_update_connection_parameters().
#define MIN_SCAN_INTERVAL 0x0004 |
Referenced by ble_scan_param_set().
#define MIN_SCAN_WINDOW 0x0004 |
Referenced by ble_scan_param_set().
#define MIN_SLAVE_LATENCY 0x0000 |
#define MIN_SV_TIMEOUT 0x000A |
Referenced by ble_update_connection_parameters().
typedef struct PACKED attrib_aggr_format_desc_t |
The Presentation format descriptor attribute definition.
This will be used as part of GATT-Service Create request
typedef struct PACKED attrib_ccd_desc_t |
The Client Characteristic Configuration Descriptor attribute definition.
This will be used as part of GATT-Service Create request
typedef struct PACKED attrib_char_t |
The characteristic attribute definition.
This will be used as part of GATT-Service Create request
typedef struct PACKED attrib_char_value_t |
The characteristic value attribute definition.
This will be used as part of GATT-Service Create request
typedef struct PACKED attrib_ext_prop_desc_t |
The Extended property descriptor attribute definition.
This will be used as part of GATT-Service Create request
typedef struct PACKED attrib_pres_format_desc_t |
The Presentation format descriptor attribute definition.
This will be used as part of GATT-Service Create request
typedef struct PACKED attrib_service_t |
The service attribute definition.
This will be used as part of GATT-Service Create request
typedef struct PACKED attrib_user_desc_t |
The User descriptor attribute definition.
This will be used as part of GATT-Service Create request
typedef struct PACKED ble_addr_t |
Blue-tooth Low Energy address Type.
typedef struct PACKED ble_adv_report_event_t |
BLEDK3 Advertisement report event parameters.
typedef uint8_t ble_attr_permissions_t |
typedef struct PACKED ble_char_ext_properties_t |
The characteristic extended properties descriptor attribute definition, used at ble_char_t.
typedef struct PACKED ble_char_presentation_format_t |
The characteristic presentation format descriptor attribute definition, used at ble_char_t.
typedef uint8_t ble_char_properties_t |
typedef struct PACKED ble_char_t |
The characteristic attribute definition, used at ble_service_t.
typedef struct PACKED ble_char_val_t |
The characteristic value attribute definition, used at ble_char_t.
typedef struct PACKED ble_characteristic_attribute_data |
BLEDK3 Characteristic attribute data parameters used at ble_primary_service_characteristics_discover_event_t.
typedef struct PACKED ble_characteristic_value_received_event_t |
BLEDK3 Characteristic value received event parameters.
typedef struct PACKED ble_characteristic_value_write_event_t |
typedef struct PACKED ble_cmd_complete_event_t |
BLEDK3 Command complete event parameters.
typedef struct PACKED ble_conn_complete_event_t |
BLEDK3 Connection complete event parameters.
typedef struct PACKED ble_conn_param_t |
BLE Connection parameters.
typedef struct PACKED ble_conn_param_update_event_t |
BLEDK3 Connection parameter update event parameters.
typedef struct PACKED ble_disconnect_complete_event_t |
BLEDK3 Disconnect complete event parameters.
typedef struct PACKED ble_enable_transparent_uart_t |
BLEDK3 Enable TransparentUART command parameters.
typedef struct PACKED ble_generic_att_private_desc_t |
The private descriptor attribute definition.
This will be used as part of GATT-Service Create request
typedef struct PACKED ble_generic_att_public_desc_t |
The public descriptor attribute definition.
This will be used as part of GATT-Service Create request
typedef struct PACKED ble_generic_desc_t |
The generic descriptor attribute definition, used at ble_char_t.
typedef uint16_t ble_handle_t |
typedef bool ble_pair_confirm_t |
typedef struct PACKED ble_rand_addr_changed_t |
The server characteristic configuration descriptor attribute definition, used at ble_char_t.
typedef struct PACKED ble_service_attribute_data |
BLEDK3 Service attribute data parameters used at ble_primary_service_discover_all_event_t.
typedef struct PACKED ble_service_t |
The service attribute definition.
typedef struct PACKED ble_set_conn_param_t |
BLEDK3 Set connection parameter command parameters.
typedef struct PACKED ble_transparent_uart_data_received_event_t |
BLEDK3 TransparentUART data received event parameters.
typedef struct PACKED ble_transparent_uart_data_write_event_t |
typedef struct PACKED ble_user_desc_t |
The user descriptor attribute definition, used at ble_char_t.
typedef struct PACKED ble_write_char_value_event_t |
BLEDK3 Write characteristic value event parameters.
typedef void*(* create_timer_cb_t)(void(*)(void *)) |
Create timer callback type.
typedef void(* delete_timer_cb_t)(void *) |
Delete timer callback type.
typedef void(* gpio_set_cb_t)(gpio_pin_t, gpio_status_t) |
GPIO set callback type.
typedef void(* mode_get_cb_t)(BM_MODE *) |
Mode get callback type.
typedef void(* mode_set_cb_t)(BM_MODE) |
Mode set callback type.
typedef struct PACKED primary_service_char_discovery_resp_t |
Discover service, characteristic response event parameters.
typedef void(* sleep_timer_cb_t)(uint32_t) |
Sleep timer callback type.
typedef void(* start_timer_cb_t)(void *, uint32_t) |
Start timer callback type.
typedef void(* stop_timer_cb_t)(void *) |
Stop timer callback type.
typedef void(* uart_read_async_cb_t)(void(*)(uint16_t)) |
UART read asynchronous callback type.
typedef void(* uart_recv_async_cb_t)(uint16_t) |
UART receive asynchronous callback type.
typedef void(* uart_write_sync_cb_t)(uint8_t *, uint32_t) |
UART write synchronous callback type.
anonymous enum |
BLEDK3 events.
enum ble_addr_type_t |
BLE can accept to kinds of addresses, either public or random addresses.
enum ble_adv_event_type_t |
BLEDK3 advertisement event type used at ble_adv_report_event_t.
Enumerator | |
---|---|
ADV_IND | |
ADV_DIRECT_IND | |
ADV_SCAN_IND | |
ADV_NONCONN_IND | |
SCAN_RESP |
enum ble_adv_mode_t |
enum ble_adv_type_t |
Advertising Types.
enum ble_char_ext_prop_t |
Characteristic extended properties used at ble_char_ext_properties_t.
Enumerator | |
---|---|
BLE_EXT_PROP_RELIABLE_WRITE | |
BLE_EXT_PROP_WRITABLE_AUX |
Characteristic presentation format used at ble_char_presentation_format_t.
Connection filter used at ble_create_connection.
Enumerator | |
---|---|
BLE_CONN_WHITELIST_FILTER_DISABLED | |
BLE_CONN_WHITELIST_FILTER_ENABLED |
enum ble_event_types_t |
enum ble_public_uuids_t |
Scan filter duplicate used at ble_scan_start.
Enumerator | |
---|---|
BLE_SCAN_DUPLICATE_FILTER_DISABLED | |
BLE_SCAN_DUPLICATE_FILTER_ENABLED |
enum ble_scan_enable_t |
Scan enable used at ble_scan_start.
Enumerator | |
---|---|
BLE_SCAN_DISABLED | |
BLE_SCAN_ENABLED |
enum ble_scan_type_t |
Scan types used at ble_scan_param_set.
Enumerator | |
---|---|
BLE_SCAN_PASSIVE | |
BLE_SCAN_ACTIVE |
enum ble_service_type_t |
Service type used at ble_service_t.
Enumerator | |
---|---|
SECONDARY_SERVICE | |
PRIMARY_SERVICE |
enum ble_status_t |
BLE Host SDK status messages.
enum ble_uuid_type_t |
enum bledk3_status_t |
GATT Descriptor UUID defined by SIG.
enum gpio_pin_t |
enum gpio_status_t |
ble_status_t ble_adv_data_set | ( | uint8_t const * | adv_data, |
uint8_t | adv_data_len | ||
) |
ble_status_t ble_adv_param_set | ( | BM_ADV_TYPE | type, |
ble_addr_t * | peer_addr, | ||
uint16_t | interval | ||
) |
References PACKED::addr, ADV_PARAM_DIRECT_ADDR_INDEX, ADV_PARAM_DIRECT_ADDR_TYPE_INDEX, ADV_PARAM_INTERVAL_INDEX_HIGH, ADV_PARAM_INTERVAL_INDEX_LOW, ADV_PARAM_TYPE_INDEX, AT_BLE_ADV_INTERVAL_MAX, AT_BLE_ADV_INTERVAL_MIN, BLE_ADDR_LEN, ble_command_complete_parser(), BLE_INVALID_COMMAND_PARAMETERS, BLE_SUCCESS, BM_ADV_PARAM_SET, BM_ADV_PROPRIETARY_BEACON, BM_APPLICATION_AdvertisementParameterSetPkt(), COMMAND_COMPLETE, interface_cmd_send_wait(), NULL, and PACKED::type.
Referenced by app_adv_param_set(), app_ibeacon_init(), and ble_mgr_adv_start().
ble_status_t ble_adv_start | ( | void | ) |
ble_status_t ble_adv_stop | ( | void | ) |
References ble_command_complete_parser(), BLE_SUCCESS, BM_APPLICATION_AdvertisementEnableSetPkt(), BM_SET_ADV_ENABLE, COMMAND_COMPLETE, and interface_cmd_send_wait().
Referenced by ble_mgr_adv_stop().
ble_status_t ble_cancel_connection | ( | void | ) |
ble_status_t ble_characteristic_attribute_read_request | ( | ble_handle_t | conn_handle, |
ble_handle_t | characteristic_handle, | ||
uint16_t | offset | ||
) |
ble_status_t ble_characteristic_attribute_read_response | ( | ble_handle_t | conn_handle, |
ble_handle_t | characteristic_handle, | ||
uint8_t * | data, | ||
uint16_t | length | ||
) |
ble_status_t ble_characteristic_read | ( | ble_handle_t | conn_handle, |
ble_handle_t | characteristic_handle, | ||
void * | data, | ||
uint16_t * | data_len | ||
) |
ble_status_t ble_characteristic_read_by_uuid | ( | ble_handle_t | conn_handle, |
ble_uuid_t * | characteristic_uuid, | ||
void * | data, | ||
uint16_t * | data_len | ||
) |
ble_status_t ble_characteristic_reliable_write_request_cancel | ( | ble_handle_t | conn_handle | ) |
ble_status_t ble_characteristic_reliable_write_request_execute | ( | ble_handle_t | conn_handle | ) |
ble_status_t ble_characteristic_reliable_write_request_prepare | ( | ble_handle_t | conn_handle, |
ble_handle_t | characteristic_handle, | ||
uint16_t | offset, | ||
uint8_t * | data, | ||
uint16_t | length | ||
) |
ble_status_t ble_characteristic_reliable_write_response_execute | ( | ble_handle_t | conn_handle | ) |
ble_status_t ble_characteristic_reliable_write_response_prepare | ( | ble_handle_t | conn_handle, |
ble_handle_t | characteristic_handle, | ||
uint16_t | offset, | ||
uint8_t * | data, | ||
uint16_t | length | ||
) |
ble_status_t ble_characteristic_value_read | ( | ble_handle_t | characteristic_handle, |
void * | data, | ||
uint16_t * | data_len | ||
) |
ble_status_t ble_characteristic_value_send | ( | ble_handle_t | conn_handle, |
ble_handle_t | characteristic_handle, | ||
uint8_t * | data, | ||
uint16_t | length | ||
) |
ble_status_t ble_characteristic_value_update | ( | ble_handle_t | characteristic_handle, |
uint8_t * | data, | ||
uint16_t | length | ||
) |
ble_status_t ble_characteristic_write_with_response | ( | ble_handle_t | conn_handle, |
ble_handle_t | characteristic_handle, | ||
uint8_t * | data, | ||
uint16_t | length | ||
) |
References ble_command_complete_parser(), BLE_INVALID_COMMAND_PARAMETERS, BLE_SUCCESS, BM_APPLICATION_ClientCharacteristicHandleWritePkt(), BM_CLIENT_CHARACTERISTIC_WRITE, COMMAND_COMPLETE, interface_cmd_send_wait(), and NULL.
Referenced by ble_mgr_characteristic_indicate_set(), and ble_mgr_characteristic_notify_set().
ble_status_t ble_characteristic_write_without_respose | ( | ble_handle_t | conn_handle, |
ble_handle_t | characteristic_handle, | ||
uint8_t * | data, | ||
uint16_t | length | ||
) |
ble_status_t ble_create_connection | ( | ble_connection_filter_t | conn_filter, |
ble_addr_t * | address | ||
) |
References PACKED::addr, BLE_INVALID_COMMAND_PARAMETERS, BM_APPLICATION_ConnectDevicePkt(), interface_cmd_send_no_wait(), NULL, and PACKED::type.
Referenced by ble_mgr_adv_report_cb(), and ble_mgr_start_connection().
void ble_disconnect_device | ( | uint8_t | conn_handle | ) |
References BM_APPLICATION_DisconnectDevicePkt(), and interface_cmd_send_no_wait().
ble_status_t ble_error_response_send | ( | ble_handle_t | conn_handle, |
ble_handle_t | characteristic_handle, | ||
uint8_t | req_opcode, | ||
uint8_t | err_code | ||
) |
void ble_event_cb_handler | ( | bm_cmd_frame_t * | bm_cmd | ) |
ble_status_t ble_gatt_service_create | ( | ble_service_t * | ble_service | ) |
References PACKED::additional_desc_count, PACKED::additional_desc_list, BLE_ATT_ATTRIBUTE_VALUE_LEN, BLE_ATTRIB_UUID_LENGTH_2, ble_gatt_service_create_parser(), BLE_INSUFFICIENT_RESOURCES, BLE_INVALID_COMMAND_PARAMETERS, BLE_MAX_SERVICE_BUF_LEN, BLE_SUCCESS, BLE_UUID_128B, BLE_UUID_128B_LEN, BLE_UUID_16B, BLE_UUID_16B_LEN, BM_APPLICATION_ServerCreateService(), ble_client_char_config_desc_t::ccd_included, PACKED::ccd_value, ble_client_char_config_desc_t::ccd_value, PACKED::char_count, CHAR_EXTENDED_PROPERTIES, PACKED::char_handle, PACKED::char_list, CHAR_PRESENTATION_FORMAT, CHAR_USER_DESCRIPTION, PACKED::char_val, CLIENT_CHAR_CONFIGURATION, PACKED::client_config_desc, COMMAND_COMPLETE, PACKED::desc_uuid, PACKED::desc_val_length, PACKED::desc_value, PACKED::description, PACKED::end_handle, PACKED::ep_included, PACKED::exponent, PACKED::ext_properties, PACKED::ext_property, PACKED::extend_property, PACKED::format, PACKED::handle, ble_client_char_config_desc_t::handle, PACKED::init_value, interface_cmd_send_wait(), PACKED::len, PACKED::length, PACKED::name_space, NULL, ble_client_char_config_desc_t::perm, PACKED::perm, PACKED::permission, PACKED::permissions, PACKED::pf_included, PACKED::presentation_format, PACKED::properties, SECONDARY_SERVICE, SERVER_CHAR_CONFIGURATION, PACKED::server_config_desc, PACKED::start_handle, PACKED::type, ble_uuid_t::type, PACKED::type_length, PACKED::ud_length, PACKED::unit, PACKED::user_desc, ble_uuid_t::uuid, PACKED::uuid, ble_uuid_val_t::uuid_128b, ble_uuid_val_t::uuid_16b, UUID_CHARACTERISTIC, UUID_PRIMARY_SERVICE, UUID_SECONDARY_SERVICE, PACKED::value, PACKED::value_handle, and PACKED::value_length.
ble_status_t ble_gatt_service_read | ( | ble_service_t * | ble_service | ) |
References ble_event_get(), BLE_EVENT_Q_EMPTY, ble_gatt_service_read_parser(), BLE_SUCCESS, BLE_UUID_128B_LEN, BLE_UUID_16B_LEN, BM_APPLICATION_ServerReadService(), BM_CLIENT_DISCOVER_CHARACTERISTICS_DESCRIPTORS_RESULT, BM_CLIENT_DISCOVER_CHARACTERISTICS_RESULT, PACKED::char_count, PACKED::char_handle, PACKED::char_list, PACKED::char_val, PACKED::client_config_desc, COMMAND_COMPLETE, event_msg_t::data, event_t::event_id, event_t::event_msg, PACKED::handle, ble_client_char_config_desc_t::handle, i, interface_cmd_send_wait(), memcpy_inplace_reorder(), NULL, PACKED::properties, SERVICE_DISCO_EVENT_BUFFER_LENGTH, PACKED::uuid, ble_uuid_val_t::uuid_128b, ble_uuid_val_t::uuid_16b, and PACKED::value_handle.
Referenced by main().
ble_status_t ble_init | ( | platform_init_t * | platform_init | ) |
References ble_status_report_parser(), BLE_SUCCESS, BM_APPLICATION_Init(), BM_APPLICATION_PatternSetPkt(), BM_APPLICATION_ResetPkt(), BM_MODE_APPLICATION, BM_PATTERN_SET, COMMAND_COMPLETE, i, IDLE_MODE, interface_cmd_send_wait(), interface_cmd_send_wait_time(), interface_event_wait_time(), interface_init(), ble_platform_api_list_t::mode_set, platform_init_t::platform_api_list, and STATUS_REPORT.
Referenced by ble_device_init(), ble_dtm_init(), ble_mgr_device_init(), and main().
ble_status_t ble_pair_device_delete | ( | uint8_t | index | ) |
ble_status_t ble_pair_device_erase_all | ( | void | ) |
ble_status_t ble_pair_mode_get | ( | void | ) |
ble_status_t ble_pair_mode_set | ( | BM_PAIR_MODE | mode | ) |
ble_status_t ble_pair_passkey_clear | ( | ble_handle_t | conn_handle | ) |
ble_status_t ble_pair_passkey_confirm | ( | ble_handle_t | conn_handle, |
ble_pair_confirm_t | confirm | ||
) |
ble_status_t ble_pair_passkey_enter | ( | ble_handle_t | conn_handle, |
uint8_t * | passkey, | ||
uint8_t | length | ||
) |
ble_status_t ble_pair_passkey_erase_digits | ( | ble_handle_t | conn_handle, |
uint8_t | length | ||
) |
ble_status_t ble_pair_passkey_reply | ( | ble_handle_t | conn_handle | ) |
ble_status_t ble_pair_request | ( | ble_handle_t | conn_handle | ) |
ble_status_t ble_primary_service_characteristics_discover | ( | ble_handle_t | conn_handle, |
ble_uuid_t * | service_uuid | ||
) |
References ble_command_complete_parser(), BLE_INVALID_COMMAND_PARAMETERS, BLE_SUCCESS, BLE_UUID_INVALID, BM_APPLICATION_ClientCharacteristicsDiscoverPkt(), BM_CLIENT_DISCOVER_CHARACTERISTICS, COMMAND_COMPLETE, interface_cmd_send_wait(), NULL, ble_uuid_t::type, and ble_uuid_t::uuid.
Referenced by main().
ble_status_t ble_primary_service_characteristics_read | ( | ble_uuid_t * | service_uuid | ) |
ble_status_t ble_primary_service_discover_all | ( | ble_handle_t | conn_handle | ) |
ble_status_t ble_primary_service_read_all | ( | void | ) |
ble_status_t ble_read_response_send | ( | ble_handle_t | conn_handle, |
uint8_t | rsp_type, | ||
uint8_t * | data, | ||
uint16_t | length | ||
) |
ble_status_t ble_rssi_read | ( | uint8_t | conn_handle, |
uint8_t * | rssi | ||
) |
ble_status_t ble_scan_param_set | ( | uint16_t | scan_interval, |
uint16_t | scan_window, | ||
ble_scan_type_t | scan_type | ||
) |
References ble_command_complete_parser(), BLE_INVALID_COMMAND_PARAMETERS, BLE_SCAN_ACTIVE, BLE_SUCCESS, BM_APPLICATION_ScanParameterSetPkt(), BM_SCAN_PARAM_SET, COMMAND_COMPLETE, interface_cmd_send_wait(), MAX_SCAN_INTERVAL, MAX_SCAN_WINDOW, MIN_SCAN_INTERVAL, and MIN_SCAN_WINDOW.
Referenced by ble_mgr_scan_start().
ble_status_t ble_scan_resp_data_set | ( | uint8_t const * | scan_data, |
uint8_t | scan_data_len | ||
) |
References ble_command_complete_parser(), BLE_INVALID_COMMAND_PARAMETERS, BLE_SUCCESS, BM_APPLICATION_ScanDataWritePkt(), BM_SCAN_DATA_WRITE, COMMAND_COMPLETE, interface_cmd_send_wait(), and NULL.
Referenced by app_adv_param_set(), and ble_mgr_adv_start().
ble_status_t ble_scan_start | ( | ble_scan_enable_t | scan_enable, |
ble_scan_duplicate_filter_t | scan_dup_filter | ||
) |
ble_status_t ble_set_connection_params | ( | ble_set_conn_param_t * | conn_params | ) |
References ble_command_complete_parser(), BLE_INVALID_COMMAND_PARAMETERS, BLE_SUCCESS, BM_APPLICATION_ConnParameterSetPkt(), BM_CONN_PARAM_SET, COMMAND_COMPLETE, PACKED::conn_latency, interface_cmd_send_wait(), PACKED::link_sv_to, PACKED::max_conn_interval, PACKED::min_conn_interval, and NULL.
Referenced by main().
ble_status_t ble_set_device_name | ( | const uint8_t * | device_name, |
uint8_t | length | ||
) |
References ble_command_complete_parser(), BLE_INVALID_COMMAND_PARAMETERS, BLE_SUCCESS, BM_APPLICATION_DeviceNameWritePkt(), BM_NAME_WRITE, COMMAND_COMPLETE, interface_cmd_send_wait(), and NULL.
Referenced by ble_device_init().
ble_status_t ble_shutdown | ( | void | ) |
ble_status_t ble_transparent_uart_data_send | ( | ble_handle_t | conn_handle, |
uint8_t * | data, | ||
uint8_t | datalen | ||
) |
ble_status_t ble_transparent_uart_enable | ( | ble_enable_transparent_uart_t * | enable_transparent_uart | ) |
References ble_command_complete_parser(), BLE_INVALID_COMMAND_PARAMETERS, BLE_SUCCESS, BM_APPLICATION_EnableTransparentUartSetPkt(), BM_TRANSPARENT_ENABLE, PACKED::client_transparent_mode, COMMAND_COMPLETE, PACKED::conn_handle, interface_cmd_send_wait(), NULL, and PACKED::server_transparent_cntrl.
Referenced by ble_mgr_transparent_uart_disable(), and ble_mgr_transparent_uart_enable().
ble_status_t ble_update_connection_parameters | ( | uint8_t | conn_handle, |
ble_conn_param_t * | conn_param | ||
) |
References ble_command_complete_parser(), BLE_INVALID_COMMAND_PARAMETERS, BLE_SUCCESS, BM_APPLICATION_ConnectionParameterUpdatePkt(), BM_CONNECTION_PARAM_UPDATE, COMMAND_COMPLETE, PACKED::conn_interval, PACKED::conn_latency, interface_cmd_send_wait(), PACKED::link_sv_to, MAX_CONN_INTERVAL, MAX_SLAVE_LATENCY, MAX_SV_TIMEOUT, MIN_CONN_INTERVAL, MIN_SV_TIMEOUT, and NULL.
ble_status_t ble_write_response_send | ( | ble_handle_t | conn_handle, |
ble_handle_t | attr_handle, | ||
uint8_t | err_code | ||
) |
uint8_t interface_process_fifo_data | ( | void | ) |
References ble_response_check(), BM_MODE_APPLICATION, BM_MODE_PROGRAM, dfu_response_check(), fifo_empty(), fifo_get(), INTERFACE_EVENT_READY, INTERFACE_EVENT_WAITING, is_fifo_full, ble_platform_api_list_t::mode_get, result, store_uart_data(), and ble_platform_api_list_t::uart_rx_cb.
Referenced by interface_event_get(), and interface_event_process().
void register_ble_event_cb_handlers | ( | ble_event_types_t | event_type, |
const void * | event_handler | ||
) |