![]() |
MT2523 API Reference
LinkIt SDK v4
|
This section defines macros for the GATT Client. More...
This section defines macros for the GATT Client.
Macros | |
| #define | BT_GATTC_EXCHANGE_MTU (BT_MODULE_GATT | 0x00010000) |
| This is the confirmation event, generated from bt_gattc_exchange_mtu(), with bt_gatt_exchange_mtu_rsp_t as the payload. More... | |
| #define | BT_GATTC_DISCOVER_PRIMARY_SERVICE (BT_MODULE_GATT | 0x00020000) |
| This is the confirmation event, generated from bt_gattc_discover_primary_service(), with bt_gattc_read_by_group_type_rsp_t as the payload. More... | |
| #define | BT_GATTC_DISCOVER_PRIMARY_SERVICE_BY_UUID (BT_MODULE_GATT | 0x00030000) |
| This is the confirmation event, generated from bt_gattc_discover_primary_service_by_uuid(), with bt_gattc_find_by_type_value_rsp_t as the payload. More... | |
| #define | BT_GATTC_FIND_INCLUDED_SERVICES (BT_MODULE_GATT | 0x00040000) |
| This is the confirmation event, generated from bt_gattc_find_included_services(), with bt_gattc_read_by_type_rsp_t as the payload. More... | |
| #define | BT_GATTC_DISCOVER_CHARC (BT_MODULE_GATT | 0x00050000) |
| This is the confirmation event, generated from bt_gattc_discover_charc(), with bt_gattc_read_by_type_rsp_t as the payload. More... | |
| #define | BT_GATTC_DISCOVER_CHARC_DESCRIPTOR (BT_MODULE_GATT | 0x00060000) |
| This is the confirmation event, generated from bt_gattc_discover_charc_descriptor(), with bt_gattc_find_info_rsp_t as the payload. More... | |
| #define | BT_GATTC_READ_CHARC (BT_MODULE_GATT | 0x00070000) |
| This is the confirmation event, generated from bt_gattc_read_charc(), with bt_gattc_read_rsp_t as the payload. More... | |
| #define | BT_GATTC_READ_LONG_CHARC (BT_MODULE_GATT | 0x00080000) |
| This is the confirmation event, generated from bt_gattc_read_long_charc(), with bt_gattc_read_rsp_t as the payload. More... | |
| #define | BT_GATTC_READ_USING_CHARC_UUID (BT_MODULE_GATT | 0x00090000) |
| This is the confirmation event, generated from bt_gattc_read_using_charc_uuid(), with bt_gattc_read_by_type_rsp_t as the payload. More... | |
| #define | BT_GATTC_READ_MULTI_CHARC_VALUES (BT_MODULE_GATT | 0x000A0000) |
| This is the confirmation event, generated from bt_gattc_read_multi_charc_values(), with bt_gattc_read_multiple_rsp_t as the payload. More... | |
| #define | BT_GATTC_WRITE_CHARC (BT_MODULE_GATT | 0x000D0000) |
| This is the confirmation event, generated from bt_gattc_write_charc(), with bt_gattc_write_rsp_t as the payload. More... | |
| #define | BT_GATTC_WRITE_LONG_CHARC (BT_MODULE_GATT | 0x000E0000) |
| This is the confirmation event, generated from bt_gattc_prepare_write_charc() that writes long characteristic value or writes long characteristic descriptors, with bt_gattc_execute_write_rsp_t as the payload. More... | |
| #define | BT_GATTC_RELIABLE_WRITE_CHARC (BT_MODULE_GATT | 0x000F0000) |
| This is the confirmation event, generated from bt_gattc_prepare_write_charc() as the reliable writes, with bt_gattc_execute_write_rsp_t as the payload. More... | |
| #define | BT_GATTC_CHARC_VALUE_NOTIFICATION (BT_MODULE_GATT | 0x00110000) |
| This is the notification event with bt_gatt_handle_value_notification_t as the payload. More... | |
| #define | BT_GATTC_CHARC_VALUE_INDICATION (BT_MODULE_GATT | 0x00120000) |
| This is the indication event with bt_gatt_handle_value_indication_t as the payload. More... | |
| #define | BT_GATTC_CHARC_VALUE_CONFIRMATION (BT_MODULE_GATT | 0x00130000) |
| This is the confirmation event, generated from bt_gatts_send_charc_value_notification_indication(), with (uint32_t* connect_handle) as the payload. More... | |
| #define | BT_GATTC_NEW_EXCHANGE_MTU_REQ(name, mtu) |
| This macro creates an exchange MTU request. More... | |
| #define | BT_GATTC_NEW_DISCOVER_PRIMARY_SERVICE_REQ(name) |
| This macro creates a discover primary service request. More... | |
| #define | BT_GATTC_NEW_DISCOVER_PRIMARY_SERVICE_BY_UUID16_REQ(name, uuid16) |
| This macro creates a discover primary service by UUID16 request. More... | |
| #define | BT_GATTC_NEW_DISCOVER_PRIMARY_SERVICE_BY_UUID128_REQ(name, uuid128) |
| This macro creates a discover primary service by UUID128 request. More... | |
| #define | BT_GATTC_NEW_FIND_INCLUDED_SERVICE_REQ(name, start_handle, end_handle) |
| This macro defines a find included service request. More... | |
| #define | BT_GATTC_NEW_DISCOVER_CHARC_REQ(name, start_handle, end_handle) |
| This macro creates a discover characteristic request. More... | |
| #define | BT_GATTC_NEW_DISCOVER_CHARC_BY_UUID_REQ(name, start_handle, end_handle, uuid, len) |
| This macro creates a discover characteristic by UUID request. More... | |
| #define | BT_GATTC_NEW_DISCOVER_CHARC_DESCRIPTOR_REQ(name, start_handle, end_handle) |
| This macro creates a discover characteristic descriptor request. More... | |
| #define | BT_GATTC_NEW_READ_CHARC_REQ(name, attr_handle) |
| This macro creates a read characteristic request. More... | |
| #define | BT_GATTC_NEW_READ_LONG_CHARC_REQ(name, attr_handle, offset) |
| This macro creates a read long characteristic request. More... | |
| #define | BT_GATTC_NEW_READ_USING_CHARC_UUID_REQ(name, start_handle, end_handle, uuid, len) |
| This macro creates a read using characteristic UUID request. More... | |
| #define | BT_GATTC_NEW_WRITE_WITHOUT_RSP_REQ(name, buffer, type, attribute_handle, attribute_value, attribute_len) |
| This macro creates a write command request. More... | |
| #define | BT_GATTC_NEW_WRITE_CHARC_REQ(name, buffer, attribute_handle, attribute_value, attribute_len) |
| This macro creates a write request. More... | |
| #define | BT_GATTC_NEW_PREPARE_WRITE_REQ(name, attr_handle, offset, value, value_len) |
| This macro creates a prepare write request. More... | |
| #define | BT_GATTC_NEW_EXECUTE_WRITE_REQ(name, flag) |
| This macro creates an execute write request. More... | |
| #define BT_GATTC_CHARC_VALUE_CONFIRMATION (BT_MODULE_GATT | 0x00130000) |
This is the confirmation event, generated from bt_gatts_send_charc_value_notification_indication(), with (uint32_t* connect_handle) as the payload.
| #define BT_GATTC_CHARC_VALUE_INDICATION (BT_MODULE_GATT | 0x00120000) |
This is the indication event with bt_gatt_handle_value_indication_t as the payload.
| #define BT_GATTC_CHARC_VALUE_NOTIFICATION (BT_MODULE_GATT | 0x00110000) |
This is the notification event with bt_gatt_handle_value_notification_t as the payload.
| #define BT_GATTC_DISCOVER_CHARC (BT_MODULE_GATT | 0x00050000) |
This is the confirmation event, generated from bt_gattc_discover_charc(), with bt_gattc_read_by_type_rsp_t as the payload.
| #define BT_GATTC_DISCOVER_CHARC_DESCRIPTOR (BT_MODULE_GATT | 0x00060000) |
This is the confirmation event, generated from bt_gattc_discover_charc_descriptor(), with bt_gattc_find_info_rsp_t as the payload.
| #define BT_GATTC_DISCOVER_PRIMARY_SERVICE (BT_MODULE_GATT | 0x00020000) |
This is the confirmation event, generated from bt_gattc_discover_primary_service(), with bt_gattc_read_by_group_type_rsp_t as the payload.
| #define BT_GATTC_DISCOVER_PRIMARY_SERVICE_BY_UUID (BT_MODULE_GATT | 0x00030000) |
This is the confirmation event, generated from bt_gattc_discover_primary_service_by_uuid(), with bt_gattc_find_by_type_value_rsp_t as the payload.
| #define BT_GATTC_EXCHANGE_MTU (BT_MODULE_GATT | 0x00010000) |
This is the confirmation event, generated from bt_gattc_exchange_mtu(), with bt_gatt_exchange_mtu_rsp_t as the payload.
| #define BT_GATTC_FIND_INCLUDED_SERVICES (BT_MODULE_GATT | 0x00040000) |
This is the confirmation event, generated from bt_gattc_find_included_services(), with bt_gattc_read_by_type_rsp_t as the payload.
| #define BT_GATTC_NEW_DISCOVER_CHARC_BY_UUID_REQ | ( | name, | |
| start_handle, | |||
| end_handle, | |||
| uuid, | |||
| len | |||
| ) |
This macro creates a discover characteristic by UUID request.
| [in] | name | is the name of the request. |
| [in] | start_handle | is the starting handle to search. |
| [in] | end_handle | is the ending handle to search. |
| [in] | uuid | is the buffer to hold the UUID to discover. |
| [in] | len | is the buffer length to hold the UUID. |
| #define BT_GATTC_NEW_DISCOVER_CHARC_DESCRIPTOR_REQ | ( | name, | |
| start_handle, | |||
| end_handle | |||
| ) |
This macro creates a discover characteristic descriptor request.
| [in] | name | is the name of the request. |
| [in] | start_handle | is the starting handle to search. |
| [in] | end_handle | is the ending handle to search. |
| #define BT_GATTC_NEW_DISCOVER_CHARC_REQ | ( | name, | |
| start_handle, | |||
| end_handle | |||
| ) |
This macro creates a discover characteristic request.
| [in] | name | is the name of the request. |
| [in] | start_handle | is the starting handle to search. |
| [in] | end_handle | is the ending handle to search. |
| #define BT_GATTC_NEW_DISCOVER_PRIMARY_SERVICE_BY_UUID128_REQ | ( | name, | |
| uuid128 | |||
| ) |
This macro creates a discover primary service by UUID128 request.
| [in] | name | is the name of the request. |
| [in] | uuid128 | is the 128-bit UUID to discover. |
| #define BT_GATTC_NEW_DISCOVER_PRIMARY_SERVICE_BY_UUID16_REQ | ( | name, | |
| uuid16 | |||
| ) |
This macro creates a discover primary service by UUID16 request.
| [in] | name | is the name of the request. |
| [in] | uuid16 | is the 16-bit UUID to discover. |
| #define BT_GATTC_NEW_DISCOVER_PRIMARY_SERVICE_REQ | ( | name | ) |
This macro creates a discover primary service request.
| [in] | name | is the name of the request. |
| #define BT_GATTC_NEW_EXCHANGE_MTU_REQ | ( | name, | |
| mtu | |||
| ) |
This macro creates an exchange MTU request.
| [in] | name | is the name of the request. |
| [in] | mtu | is the client RX MTU to exchange. |
| #define BT_GATTC_NEW_EXECUTE_WRITE_REQ | ( | name, | |
| flag | |||
| ) |
This macro creates an execute write request.
| [in] | name | is the name of the request. |
| [in] | flag | is the flag to determine whether to write or cancel all the prepared values. |
| #define BT_GATTC_NEW_FIND_INCLUDED_SERVICE_REQ | ( | name, | |
| start_handle, | |||
| end_handle | |||
| ) |
This macro defines a find included service request.
| [in] | name | is the name of the request. |
| [in] | start_handle | is the starting handle to search. |
| [in] | end_handle | is the ending handle to search. |
| #define BT_GATTC_NEW_PREPARE_WRITE_REQ | ( | name, | |
| attr_handle, | |||
| offset, | |||
| value, | |||
| value_len | |||
| ) |
This macro creates a prepare write request.
| [in] | name | is the name of the request. |
| [in] | attr_handle | is the handle of the attribute to write. |
| [in] | offset | is the offset to begin writing. |
| [in] | value | is the value to write. |
| [in] | value_len | is the length of the value to write. |
| #define BT_GATTC_NEW_READ_CHARC_REQ | ( | name, | |
| attr_handle | |||
| ) |
This macro creates a read characteristic request.
| [in] | name | is the name of the request. |
| [in] | attr_handle | is the attribute handle to read. |
| #define BT_GATTC_NEW_READ_LONG_CHARC_REQ | ( | name, | |
| attr_handle, | |||
| offset | |||
| ) |
This macro creates a read long characteristic request.
| [in] | name | is the name of the request. |
| [in] | attr_handle | is the attribute handle to read. |
| [in] | offset | is the offset to start reading. |
| #define BT_GATTC_NEW_READ_USING_CHARC_UUID_REQ | ( | name, | |
| start_handle, | |||
| end_handle, | |||
| uuid, | |||
| len | |||
| ) |
This macro creates a read using characteristic UUID request.
| [in] | name | is the name of the request. |
| [in] | start_handle | is the starting handle to search. |
| [in] | end_handle | is the ending handle to search. |
| [in] | uuid | is the buffer to hold the UUID to read. |
| [in] | len | is the buffer length to hold the UUID. |
| #define BT_GATTC_NEW_WRITE_CHARC_REQ | ( | name, | |
| buffer, | |||
| attribute_handle, | |||
| attribute_value, | |||
| attribute_len | |||
| ) |
This macro creates a write request.
| [in] | name | is the name of the request. |
| [in] | buffer | is the buffer to hold the content of the bt_gattc_write_charc_req_t. |
| [in] | attribute_handle | is the handle of the attribute to write. |
| [in] | attribute_value | is the value to write. |
| [in] | attribute_len | is the length of the value to write. |
| #define BT_GATTC_NEW_WRITE_WITHOUT_RSP_REQ | ( | name, | |
| buffer, | |||
| type, | |||
| attribute_handle, | |||
| attribute_value, | |||
| attribute_len | |||
| ) |
This macro creates a write command request.
| [in] | name | is the name of the request. |
| [in] | buffer | is the buffer to hold the content of the bt_att_write_command_t. |
| [in] | type | is the type of the write command, 0-WRITE_COMMAND, 1-SIGNED_WRITE_COMMAND. |
| [in] | attribute_handle | is the handle of the attribute to write. |
| [in] | attribute_value | is the value to write. |
| [in] | attribute_len | is the length of the value to write. |
| #define BT_GATTC_READ_CHARC (BT_MODULE_GATT | 0x00070000) |
This is the confirmation event, generated from bt_gattc_read_charc(), with bt_gattc_read_rsp_t as the payload.
| #define BT_GATTC_READ_LONG_CHARC (BT_MODULE_GATT | 0x00080000) |
This is the confirmation event, generated from bt_gattc_read_long_charc(), with bt_gattc_read_rsp_t as the payload.
| #define BT_GATTC_READ_MULTI_CHARC_VALUES (BT_MODULE_GATT | 0x000A0000) |
This is the confirmation event, generated from bt_gattc_read_multi_charc_values(), with bt_gattc_read_multiple_rsp_t as the payload.
| #define BT_GATTC_READ_USING_CHARC_UUID (BT_MODULE_GATT | 0x00090000) |
This is the confirmation event, generated from bt_gattc_read_using_charc_uuid(), with bt_gattc_read_by_type_rsp_t as the payload.
| #define BT_GATTC_RELIABLE_WRITE_CHARC (BT_MODULE_GATT | 0x000F0000) |
This is the confirmation event, generated from bt_gattc_prepare_write_charc() as the reliable writes, with bt_gattc_execute_write_rsp_t as the payload.
| #define BT_GATTC_WRITE_CHARC (BT_MODULE_GATT | 0x000D0000) |
This is the confirmation event, generated from bt_gattc_write_charc(), with bt_gattc_write_rsp_t as the payload.
| #define BT_GATTC_WRITE_LONG_CHARC (BT_MODULE_GATT | 0x000E0000) |
This is the confirmation event, generated from bt_gattc_prepare_write_charc() that writes long characteristic value or writes long characteristic descriptors, with bt_gattc_execute_write_rsp_t as the payload.