diff --git a/esphome/components/usb_host/usb_host.h b/esphome/components/usb_host/usb_host.h index 99b8437421..f1600aa0cf 100644 --- a/esphome/components/usb_host/usb_host.h +++ b/esphome/components/usb_host/usb_host.h @@ -57,7 +57,7 @@ struct TransferRequest { }; // Lightweight event types for queue -enum EventType { +enum EventType : uint8_t { EVENT_DEVICE_NEW, EVENT_DEVICE_GONE, EVENT_TRANSFER_COMPLETE, diff --git a/esphome/components/usb_uart/usb_uart.h b/esphome/components/usb_uart/usb_uart.h index aab36c52b5..0ac710e4c5 100644 --- a/esphome/components/usb_uart/usb_uart.h +++ b/esphome/components/usb_uart/usb_uart.h @@ -75,7 +75,7 @@ class RingBuffer { struct UsbDataChunk { static constexpr size_t MAX_CHUNK_SIZE = 64; // USB packet size uint8_t data[MAX_CHUNK_SIZE]; - size_t length; + uint8_t length; // Max 64 bytes, so uint8_t is sufficient USBUartChannel *channel; // Required for EventPool - reset to clean state