diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2020-09-01 11:28:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-01 11:28:05 -0700 |
| commit | f0e60da51f22f89f7486cedf78d716a37f6276ee (patch) | |
| tree | c365cde71c914b99593cfdad8f52ce1b6beb4fb5 /shared-module | |
| parent | ee1b142f5d22f13658395b7eb2fc5420b88b45c0 (diff) | |
| parent | 4e3cb55ce705878a811cad2c68317391c7b5497d (diff) | |
Merge pull request #3310 from dhalbert/ble_hci
_bleio HCI implementation
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/_bleio/Characteristic.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/shared-module/_bleio/Characteristic.h b/shared-module/_bleio/Characteristic.h index 409a57c76..7776b1fa5 100644 --- a/shared-module/_bleio/Characteristic.h +++ b/shared-module/_bleio/Characteristic.h @@ -27,6 +27,9 @@ #ifndef MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CHARACTERISTIC_H #define MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CHARACTERISTIC_H +// These are not the Bluetooth spec values. They are what is used by the Nordic SoftDevice. +// The bit values are in different positions. + typedef enum { CHAR_PROP_NONE = 0, CHAR_PROP_BROADCAST = 1u << 0, @@ -40,4 +43,14 @@ typedef enum { } bleio_characteristic_properties_enum_t; typedef uint8_t bleio_characteristic_properties_t; +// Bluetooth spec property values +#define BT_GATT_CHRC_BROADCAST 0x01 +#define BT_GATT_CHRC_READ 0x02 +#define BT_GATT_CHRC_WRITE_WITHOUT_RESP 0x04 +#define BT_GATT_CHRC_WRITE 0x08 +#define BT_GATT_CHRC_NOTIFY 0x10 +#define BT_GATT_CHRC_INDICATE 0x20 +#define BT_GATT_CHRC_AUTH 0x40 +#define BT_GATT_CHRC_EXT_PROP 0x80 + #endif // MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CHARACTERISTIC_H |
