Skip to content

Commit 9fb6bba

Browse files
authored
feat(hid_service): Expose UUIDS for use by others (#371)
1 parent a44a1fb commit 9fb6bba

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

components/hid_service/include/hid_service.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ namespace espp {
3636
/// \snippet hid_service_example.cpp hid service example
3737
class HidService : public espp::BaseComponent {
3838
public:
39+
static constexpr uint16_t SERVICE_UUID = 0x1812; ///< HID Service UUID
40+
static constexpr uint16_t HID_INFORMATION_UUID = 0x2a4a; ///< HID Information UUID
41+
static constexpr uint16_t REPORT_MAP_UUID = 0x2a4b; ///< Report Map UUID
42+
static constexpr uint16_t HID_CONTROL_POINT_UUID = 0x2a4c; ///< HID Control Point UUID
43+
static constexpr uint16_t PROTOCOL_MODE_UUID = 0x2a4e; ///< Protocol Mode UUID
44+
45+
static constexpr uint16_t REPORT_UUID = 0x2a4d; ///< Report UUID
46+
static constexpr uint16_t REPORT_DESCRIPTOR_UUID = 0x2908; ///< Report Descriptor UUID
47+
3948
/// @brief Constructor
4049
/// @param log_level The verbosity of the logger
4150
explicit HidService(espp::Logger::Verbosity log_level = espp::Logger::Verbosity::WARN)
@@ -309,15 +318,6 @@ class HidService : public espp::BaseComponent {
309318
}
310319

311320
protected:
312-
static constexpr uint16_t SERVICE_UUID = 0x1812;
313-
static constexpr uint16_t HID_INFORMATION_UUID = 0x2a4a;
314-
static constexpr uint16_t REPORT_MAP_UUID = 0x2a4b;
315-
static constexpr uint16_t HID_CONTROL_POINT_UUID = 0x2a4c;
316-
static constexpr uint16_t PROTOCOL_MODE_UUID = 0x2a4e;
317-
318-
static constexpr uint16_t REPORT_UUID = 0x2a4d;
319-
static constexpr uint16_t REPORT_DESCRIPTOR_UUID = 0x2908;
320-
321321
void make_service(NimBLEServer *server) {
322322
service_ = server->createService(NimBLEUUID(SERVICE_UUID));
323323
if (!service_) {

0 commit comments

Comments
 (0)