15 #ifndef MAIN_NIMBLE2904_H_
16 #define MAIN_NIMBLE2904_H_
18 #if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
20 #include "NimBLEDescriptor.h"
27 uint16_t m_description;
29 } __attribute__((packed));
43 static const uint8_t FORMAT_BOOLEAN = 1;
44 static const uint8_t FORMAT_UINT2 = 2;
45 static const uint8_t FORMAT_UINT4 = 3;
46 static const uint8_t FORMAT_UINT8 = 4;
47 static const uint8_t FORMAT_UINT12 = 5;
48 static const uint8_t FORMAT_UINT16 = 6;
49 static const uint8_t FORMAT_UINT24 = 7;
50 static const uint8_t FORMAT_UINT32 = 8;
51 static const uint8_t FORMAT_UINT48 = 9;
52 static const uint8_t FORMAT_UINT64 = 10;
53 static const uint8_t FORMAT_UINT128 = 11;
54 static const uint8_t FORMAT_SINT8 = 12;
55 static const uint8_t FORMAT_SINT12 = 13;
56 static const uint8_t FORMAT_SINT16 = 14;
57 static const uint8_t FORMAT_SINT24 = 15;
58 static const uint8_t FORMAT_SINT32 = 16;
59 static const uint8_t FORMAT_SINT48 = 17;
60 static const uint8_t FORMAT_SINT64 = 18;
61 static const uint8_t FORMAT_SINT128 = 19;
62 static const uint8_t FORMAT_FLOAT32 = 20;
63 static const uint8_t FORMAT_FLOAT64 = 21;
64 static const uint8_t FORMAT_SFLOAT16 = 22;
65 static const uint8_t FORMAT_SFLOAT32 = 23;
66 static const uint8_t FORMAT_IEEE20601 = 24;
67 static const uint8_t FORMAT_UTF8 = 25;
68 static const uint8_t FORMAT_UTF16 = 26;
69 static const uint8_t FORMAT_OPAQUE = 27;
Descriptor for Characteristic Presentation Format.
Definition: NimBLE2904.h:40
void setNamespace(uint8_t namespace_value)
Set the namespace.
Definition: NimBLE2904.cpp:70
void setDescription(uint16_t)
Set the description.
Definition: NimBLE2904.cpp:43
void setExponent(int8_t exponent)
Set the exponent.
Definition: NimBLE2904.cpp:52
void setFormat(uint8_t format)
Set the format.
Definition: NimBLE2904.cpp:61
void setUnit(uint16_t unit)
Set the units for this value. It should be one of the encoded values defined here: https://www....
Definition: NimBLE2904.cpp:81
The model of a BLE Characteristic.
Definition: NimBLECharacteristic.h:62
A model of a BLE descriptor.
Definition: NimBLEDescriptor.h:42