|
Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
Generic Attribute Profile (GATT) More...
Modules | |
| GATT Client APIs | |
| GATT Server APIs | |
Data Structures | |
| struct | bt_gatt_attr |
| GATT Attribute structure. More... | |
| struct | bt_gatt_service_static |
| GATT Service structure. More... | |
| struct | bt_gatt_service |
| GATT Service structure. More... | |
| struct | bt_gatt_service_val |
| Service Attribute Value. More... | |
| struct | bt_gatt_include |
| Include Attribute Value. More... | |
| struct | bt_gatt_cb |
| GATT callback structure. More... | |
| struct | bt_gatt_authorization_cb |
| GATT authorization callback structure. More... | |
| struct | bt_gatt_chrc |
| Characteristic Attribute Value. More... | |
| struct | bt_gatt_cep |
| Characteristic Extended Properties Attribute Value. More... | |
| struct | bt_gatt_ccc |
| Client Characteristic Configuration Attribute Value. More... | |
| struct | bt_gatt_scc |
| Server Characteristic Configuration Attribute Value. More... | |
| struct | bt_gatt_cpf |
| GATT Characteristic Presentation Format Attribute Value. More... | |
Macros | |
| #define | BT_GATT_ERR(_att_err) (-(_att_err)) |
| Construct error return value for attribute read and write callbacks. | |
| #define | BT_GATT_CHRC_BROADCAST 0x01 |
| Characteristic Properties Bit field values. | |
| #define | BT_GATT_CHRC_READ 0x02 |
| Characteristic read property. | |
| #define | BT_GATT_CHRC_WRITE_WITHOUT_RESP 0x04 |
| Characteristic write without response property. | |
| #define | BT_GATT_CHRC_WRITE 0x08 |
| Characteristic write with response property. | |
| #define | BT_GATT_CHRC_NOTIFY 0x10 |
| Characteristic notify property. | |
| #define | BT_GATT_CHRC_INDICATE 0x20 |
| Characteristic indicate property. | |
| #define | BT_GATT_CHRC_AUTH 0x40 |
| Characteristic Authenticated Signed Writes property. | |
| #define | BT_GATT_CHRC_EXT_PROP 0x80 |
| Characteristic Extended Properties property. | |
| #define | BT_GATT_CEP_RELIABLE_WRITE 0x0001 |
| Characteristic Extended Properties Bit field values. | |
| #define | BT_GATT_CEP_WRITABLE_AUX 0x0002 |
| #define | BT_GATT_CCC_NOTIFY 0x0001 |
| Client Characteristic Configuration Values. | |
| #define | BT_GATT_CCC_INDICATE 0x0002 |
| Client Characteristic Configuration Indication. | |
| #define | BT_GATT_SCC_BROADCAST 0x0001 |
| Server Characteristic Configuration Values. | |
Typedefs | |
| typedef ssize_t(* | bt_gatt_attr_read_func_t) (struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset) |
| Attribute read callback. | |
| typedef ssize_t(* | bt_gatt_attr_write_func_t) (struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf, uint16_t len, uint16_t offset, uint8_t flags) |
| Attribute write callback. | |
Enumerations | |
| enum | bt_gatt_perm { BT_GATT_PERM_NONE = 0 , BT_GATT_PERM_READ = BIT(0) , BT_GATT_PERM_WRITE = BIT(1) , BT_GATT_PERM_READ_ENCRYPT = BIT(2) , BT_GATT_PERM_WRITE_ENCRYPT = BIT(3) , BT_GATT_PERM_READ_AUTHEN = BIT(4) , BT_GATT_PERM_WRITE_AUTHEN = BIT(5) , BT_GATT_PERM_PREPARE_WRITE = BIT(6) , BT_GATT_PERM_READ_LESC = BIT(7) , BT_GATT_PERM_WRITE_LESC = BIT(8) } |
| GATT attribute permission bit field values. More... | |
| enum | { BT_GATT_WRITE_FLAG_PREPARE = BIT(0) , BT_GATT_WRITE_FLAG_CMD = BIT(1) , BT_GATT_WRITE_FLAG_EXECUTE = BIT(2) } |
| GATT attribute write flags. More... | |
Generic Attribute Profile (GATT)
| #define BT_GATT_CCC_INDICATE 0x0002 |
#include <include/zephyr/bluetooth/gatt.h>
Client Characteristic Configuration Indication.
If set, changes to Characteristic Value shall be indicated.
| #define BT_GATT_CCC_NOTIFY 0x0001 |
#include <include/zephyr/bluetooth/gatt.h>
Client Characteristic Configuration Values.
Client Characteristic Configuration Notification.
If set, changes to Characteristic Value shall be notified.
| #define BT_GATT_CEP_RELIABLE_WRITE 0x0001 |
#include <include/zephyr/bluetooth/gatt.h>
Characteristic Extended Properties Bit field values.
| #define BT_GATT_CEP_WRITABLE_AUX 0x0002 |
#include <include/zephyr/bluetooth/gatt.h>
| #define BT_GATT_CHRC_AUTH 0x40 |
#include <include/zephyr/bluetooth/gatt.h>
Characteristic Authenticated Signed Writes property.
If set, permits signed writes to the Characteristic Value.
| #define BT_GATT_CHRC_BROADCAST 0x01 |
#include <include/zephyr/bluetooth/gatt.h>
Characteristic Properties Bit field values.
Characteristic broadcast property.
If set, permits broadcasts of the Characteristic Value using Server Characteristic Configuration Descriptor.
| #define BT_GATT_CHRC_EXT_PROP 0x80 |
#include <include/zephyr/bluetooth/gatt.h>
Characteristic Extended Properties property.
If set, additional characteristic properties are defined in the Characteristic Extended Properties Descriptor.
| #define BT_GATT_CHRC_INDICATE 0x20 |
#include <include/zephyr/bluetooth/gatt.h>
Characteristic indicate property.
If set, permits indications of a Characteristic Value with acknowledgment.
| #define BT_GATT_CHRC_NOTIFY 0x10 |
#include <include/zephyr/bluetooth/gatt.h>
Characteristic notify property.
If set, permits notifications of a Characteristic Value without acknowledgment.
| #define BT_GATT_CHRC_READ 0x02 |
#include <include/zephyr/bluetooth/gatt.h>
Characteristic read property.
If set, permits reads of the Characteristic Value.
| #define BT_GATT_CHRC_WRITE 0x08 |
#include <include/zephyr/bluetooth/gatt.h>
Characteristic write with response property.
If set, permits write of the Characteristic Value with response.
| #define BT_GATT_CHRC_WRITE_WITHOUT_RESP 0x04 |
#include <include/zephyr/bluetooth/gatt.h>
Characteristic write without response property.
If set, permits write of the Characteristic Value without response.
| #define BT_GATT_ERR | ( | _att_err | ) | (-(_att_err)) |
#include <include/zephyr/bluetooth/gatt.h>
Construct error return value for attribute read and write callbacks.
| _att_err | ATT error code |
| #define BT_GATT_SCC_BROADCAST 0x0001 |
#include <include/zephyr/bluetooth/gatt.h>
Server Characteristic Configuration Values.
Server Characteristic Configuration Broadcast
If set, the characteristic value shall be broadcast in the advertising data when the server is advertising.
| bt_gatt_attr_read_func_t |
#include <include/zephyr/bluetooth/gatt.h>
Attribute read callback.
The callback can also be used locally to read the contents of the attribute in which case no connection will be set.
| conn | The connection that is requesting to read |
| attr | The attribute that's being read |
| buf | Buffer to place the read result in |
| len | Length of data to read |
| offset | Offset to start reading from |
BT_GATT_ERR() with a specific BT_ATT_ERR_* error code. | bt_gatt_attr_write_func_t |
#include <include/zephyr/bluetooth/gatt.h>
Attribute write callback.
| conn | The connection that is requesting to write |
| attr | The attribute that's being written |
| buf | Buffer with the data to write |
| len | Number of bytes in the buffer |
| offset | Offset to start writing from |
| flags | Flags (BT_GATT_WRITE_FLAG_*) |
BT_GATT_ERR() with a specific BT_ATT_ERR_* error code. | anonymous enum |
#include <include/zephyr/bluetooth/gatt.h>
GATT attribute write flags.
| enum bt_gatt_perm |
#include <include/zephyr/bluetooth/gatt.h>
GATT attribute permission bit field values.