Skip to content

Commit

Permalink
feat(hid_service): Expose UUIDS for use by others (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
finger563 authored Feb 16, 2025
1 parent a44a1fb commit 9fb6bba
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions components/hid_service/include/hid_service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ namespace espp {
/// \snippet hid_service_example.cpp hid service example
class HidService : public espp::BaseComponent {
public:
static constexpr uint16_t SERVICE_UUID = 0x1812; ///< HID Service UUID
static constexpr uint16_t HID_INFORMATION_UUID = 0x2a4a; ///< HID Information UUID
static constexpr uint16_t REPORT_MAP_UUID = 0x2a4b; ///< Report Map UUID
static constexpr uint16_t HID_CONTROL_POINT_UUID = 0x2a4c; ///< HID Control Point UUID
static constexpr uint16_t PROTOCOL_MODE_UUID = 0x2a4e; ///< Protocol Mode UUID

static constexpr uint16_t REPORT_UUID = 0x2a4d; ///< Report UUID
static constexpr uint16_t REPORT_DESCRIPTOR_UUID = 0x2908; ///< Report Descriptor UUID

/// @brief Constructor
/// @param log_level The verbosity of the logger
explicit HidService(espp::Logger::Verbosity log_level = espp::Logger::Verbosity::WARN)
Expand Down Expand Up @@ -309,15 +318,6 @@ class HidService : public espp::BaseComponent {
}

protected:
static constexpr uint16_t SERVICE_UUID = 0x1812;
static constexpr uint16_t HID_INFORMATION_UUID = 0x2a4a;
static constexpr uint16_t REPORT_MAP_UUID = 0x2a4b;
static constexpr uint16_t HID_CONTROL_POINT_UUID = 0x2a4c;
static constexpr uint16_t PROTOCOL_MODE_UUID = 0x2a4e;

static constexpr uint16_t REPORT_UUID = 0x2a4d;
static constexpr uint16_t REPORT_DESCRIPTOR_UUID = 0x2908;

void make_service(NimBLEServer *server) {
service_ = server->createService(NimBLEUUID(SERVICE_UUID));
if (!service_) {
Expand Down

0 comments on commit 9fb6bba

Please sign in to comment.