1#ifndef BLUETOE_SERVICES_HID_HPP
2#define BLUETOE_SERVICES_HID_HPP
4#include <bluetoe/service.hpp>
5#include <bluetoe/characteristic.hpp>
13 using service_uuid = service_uuid16< 0x1812 >;
15 using protocol_mode_uuid = characteristic_uuid16< 0x2A4E >;
16 using report_uuid = characteristic_uuid16< 0x2A4D >;
17 using report_map_uuid = characteristic_uuid16< 0x2A4B >;
18 using boot_keyboard_input_report_uuid = characteristic_uuid16< 0x2A22 >;
19 using boot_keyboard_output_report_uuid = characteristic_uuid16< 0x2A32 >;
20 using boot_mouse_input_report_uuid = characteristic_uuid16< 0x2A33 >;
21 using hid_information_uuid = characteristic_uuid16< 0x2A4A >;
22 using hid_control_point_uuid = characteristic_uuid16< 0x2A4C >;
24 static constexpr std::uint16_t report_reference_descriptor_uuid = 0x2908;
26 enum class report_type : std::uint8_t {
33 template < std::u
int8_t ReportID, report_type Type >
34 struct report_reference_impl {
35 static const std::uint8_t data[ 2 ];
37 using descriptor =
bluetoe::descriptor< report_reference_descriptor_uuid, data,
sizeof( data ) >;
40 template < std::u
int8_t ReportID, report_type Type >
41 const std::uint8_t report_reference_impl< ReportID, Type >::data[ 2 ] = { ReportID,
static_cast< std::uint8_t
>( Type ) };
48 template < std::u
int8_t ReportID >
49 using input_report_reference =
typename details::report_reference_impl< ReportID, report_type::input >::descriptor;
54 template < std::u
int8_t ReportID >
55 using output_report_reference =
typename details::report_reference_impl< ReportID, report_type::output >::descriptor;
60 template < std::u
int8_t ReportID >
61 using feature_report_reference =
typename details::report_reference_impl< ReportID, report_type::feature >::descriptor;
User defined descriptor.
Definition: descriptor.hpp:22