1#if defined(USE_ESP32_VARIANT_ESP32P4) || defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3) || \
2 defined(USE_ESP32_VARIANT_ESP32S31) || defined(USE_ESP32_VARIANT_ESP32H4)
29 ESP_LOGV(TAG,
"No host, dropping report");
36 if (tud_suspended()) {
42 if (!tud_remote_wakeup()) {
43 ESP_LOGV(TAG,
"Host did not allow remote wakeup");
53 uint8_t keycodes[6] = {this->
keycode_};
54 if (tud_hid_keyboard_report(REPORT_ID_KEYBOARD, this->
modifiers_, keycodes)) {
59 tud_hid_report(REPORT_ID_CONSUMER, &this->
usage_,
sizeof(this->
usage_))) {
80 uint8_t * , uint16_t ) {
86 const uint8_t * , uint16_t ) {}
void enable_loop()
Enable this component's loop.
void disable_loop()
Disable this component's loop.
void dump_config() override
void flush_()
Sends whatever changed; a report the endpoint cannot take yet is retried from loop()
void set_keyboard_(uint8_t keycode, uint8_t modifiers)
void set_consumer_(uint16_t usage)
uint16_t tud_hid_get_report_cb(uint8_t, uint8_t, hid_report_type_t, uint8_t *, uint16_t)
const uint8_t * tud_hid_descriptor_report_cb(uint8_t)
void tud_hid_set_report_cb(uint8_t, uint8_t, hid_report_type_t, const uint8_t *, uint16_t)
ESPHOME_LOG_TAG(TAG, "tinyusb_keyboard")
constexpr uint8_t HID_REPORT_DESCRIPTOR[]