ESP32 S2 C++ host library compatible with arduino, esp-idf.

Overview

Info

I would like to announce USB host library for esp32 S2 compatible with arduino, esp-idf and PIO (when pio will be updated to most recent esp-idf). I have some working library with simple host example and host mouse example is working too.

I will try to make library more user friendly and maybe in future will add more USB device class (will add CDC for sure). Here is example log with connected mouse:

start
[   575][I][port.cpp:96] init(): USB host setup properly
[   575][I][port.cpp:101] init(): Port is power ON now
[   835][I][mouse.ino:135] port_cb(): PORT event: 1
[   835][I][mouse.ino:139] port_cb(): physical connection detected
[   895][I][pipe.cpp:30] USBHostPipe(): constructor
[   895][I][pipe.cpp:82] init(): Creating pipe

[   895][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 225003
[   900][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 224903
[   901][I][mouse.ino:63] ctrl_pipe_cb(): 

[   913][I][mouse.ino:103] ctrl_pipe_cb(): address set: 2
[   918][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 224923
[   925][I][mouse.ino:98] ctrl_pipe_cb(): set current configuration: 1
[   931][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 224923

[   944][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 224667
[   951][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 224587


Config:
Number of Interfaces: 1
Attributes: 0xa0
Max power: 100 mA

Interface:
bInterfaceNumber: 0
bAlternateSetting: 0
bNumEndpoints: 1
bInterfaceClass: 0x03 (HID)
bInterfaceSubClass: 0x01
bInterfaceProtocol: 0x02

Endpoint:
bEndpointAddress: 0x81
bmAttributes: 0x03
bDescriptorType: 5
wMaxPacketSize: 6
bInterval: 10 ms
[   995][I][pipe.cpp:30] USBHostPipe(): constructor
[   999][I][pipe.cpp:82] init(): Creating pipe

[  1004][I][pipe.cpp:92] init(): EP: 0x3ffc6ecb
[  1008][I][pipe.cpp:93] init(): EP: 7, 10
[  1012][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 218651
[  1019][I][mousepipe.cpp:8] inData(): EP: 0x01
[  1023][I][mouse.ino:111] ctrl_pipe_cb(): unknown request handled
[  1029][I][mouse.ino:63] ctrl_pipe_cb(): 
get descriptor 1: 8704
[  1035][I][mouse.ino:89] ctrl_pipe_cb(): HID report map
[ 14405][I][mouse.ino:24] hid_pipe_cb(): 1
[ 14406][I][mouse.ino:25] hid_pipe_cb(): 0
[ 14406][I][mouse.ino:26] hid_pipe_cb(): 0/0/0
[ 14406][I][mouse.ino:27] hid_pipe_cb(): 0

[  3017][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 219307
[  3024][I][mousepipe.cpp:8] inData(): EP: 0x01
[ 10200][I][mouse.ino:24] hid_pipe_cb(): HID REPORT ID: 1
[ 10200][I][mouse.ino:25] hid_pipe_cb(): Mouse buttons: 1
[ 10200][I][mouse.ino:26] hid_pipe_cb(): X/Y axes(raw bytes): 0/0/0
[ 10205][I][mouse.ino:27] hid_pipe_cb(): Mouse wheel: 0

[ 10210][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 219315
[ 10217][I][mousepipe.cpp:8] inData(): EP: 0x01
[ 10296][I][mouse.ino:24] hid_pipe_cb(): HID REPORT ID: 1
[ 10296][I][mouse.ino:25] hid_pipe_cb(): Mouse buttons: 0
[ 10296][I][mouse.ino:26] hid_pipe_cb(): X/Y axes(raw bytes): 0/0/0
[ 10301][I][mouse.ino:27] hid_pipe_cb(): Mouse wheel: 0

[ 10306][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 219315
[ 10313][I][mousepipe.cpp:8] inData(): EP: 0x01
[ 12864][I][mouse.ino:24] hid_pipe_cb(): HID REPORT ID: 1
[ 12864][I][mouse.ino:25] hid_pipe_cb(): Mouse buttons: 2
[ 12864][I][mouse.ino:26] hid_pipe_cb(): X/Y axes(raw bytes): 0/0/0
[ 12869][I][mouse.ino:27] hid_pipe_cb(): Mouse wheel: 0

[ 12874][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 219315
[ 12881][I][mousepipe.cpp:8] inData(): EP: 0x01
[ 13048][I][mouse.ino:24] hid_pipe_cb(): HID REPORT ID: 1
[ 13048][I][mouse.ino:25] hid_pipe_cb(): Mouse buttons: 0
[ 13048][I][mouse.ino:26] hid_pipe_cb(): X/Y axes(raw bytes): 0/0/0
[ 13053][I][mouse.ino:27] hid_pipe_cb(): Mouse wheel: 0

[ 13058][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 219315
[ 13065][I][mousepipe.cpp:8] inData(): EP: 0x01
[ 14632][I][mouse.ino:24] hid_pipe_cb(): HID REPORT ID: 1
[ 14633][I][mouse.ino:25] hid_pipe_cb(): Mouse buttons: 0
[ 14633][I][mouse.ino:26] hid_pipe_cb(): X/Y axes(raw bytes): 0/0/0
[ 14638][I][mouse.ino:27] hid_pipe_cb(): Mouse wheel: 0

[ 14643][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 219315
[ 14650][I][mousepipe.cpp:8] inData(): EP: 0x01
[ 14664][I][mouse.ino:24] hid_pipe_cb(): HID REPORT ID: 1
[ 14665][I][mouse.ino:25] hid_pipe_cb(): Mouse buttons: 0
[ 14665][I][mouse.ino:26] hid_pipe_cb(): X/Y axes(raw bytes): 48/16/254
[ 14670][I][mouse.ino:27] hid_pipe_cb(): Mouse wheel: 0

[ 14676][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 219315
[ 14683][I][mousepipe.cpp:8] inData(): EP: 0x01
[ 14688][I][mouse.ino:24] hid_pipe_cb(): HID REPORT ID: 1
[ 14692][I][mouse.ino:25] hid_pipe_cb(): Mouse buttons: 0
[ 14697][I][mouse.ino:26] hid_pipe_cb(): X/Y axes(raw bytes): 71/96/252
[ 14703][I][mouse.ino:27] hid_pipe_cb(): Mouse wheel: 0

[ 14709][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 219315
[ 14715][I][mousepipe.cpp:8] inData(): EP: 0x01
[ 14720][I][mouse.ino:24] hid_pipe_cb(): HID REPORT ID: 1
[ 14725][I][mouse.ino:25] hid_pipe_cb(): Mouse buttons: 0
[ 14730][I][mouse.ino:26] hid_pipe_cb(): X/Y axes(raw bytes): 3/32/0
[ 14736][I][mouse.ino:27] hid_pipe_cb(): Mouse wheel: 0

[ 14741][I][pipe.cpp:241] allocateIRP(): Creating new IRP, free memory: 219315
[ 14748][I][mousepipe.cpp:8] inData(): EP: 0x01
[ 14760][I][mouse.ino:24] hid_pipe_cb(): HID REPORT ID: 1
[ 14761][I][mouse.ino:25] hid_pipe_cb(): Mouse buttons: 0
[ 14763][I][mouse.ino:26] hid_pipe_cb(): X/Y axes(raw bytes): 0/0/0
[ 14769][I][mouse.ino:27] hid_pipe_cb(): Mouse wheel: 0
To simplify the development of ESP32 in ESP-IDF, Easyio provides a complete driver library

Easyio 开源驱动库 Easyio 是一款适配于ESP-IDF框架的开源驱动库,以支持ESP32的简便开发。目的是简化乐鑫ESP-IDF开发框架的使用难度。(真要方便的话,有现成的Arduino和Platform可以用,不过实在迫于工作要求,有的开源东西不让用,同时便于对接FAE,于是就有了 E

null 163 Jul 6, 2022
Add tensilica esp32 cpu and a board to qemu and dump the rom to learn more about esp-idf

qemu_esp32 Add tensilica esp32 cpu and a board to qemu and dump the rom to learn more about esp-idf ESP32 in QEMU. This documents how to add an esp32

null 334 Jul 5, 2022
An Arduino wrapper to @sdima1357's usb_soft_host esp-idf example

ESP32 USB Soft Host library for Arduino IDE This is mainly a wrapper around the excellent work of Dmitry Samsonov (@sdima1357) with esp32_usb_soft_hos

tobozo 102 Jun 19, 2022
idf.py.exe, wrapper tool to invoke idf.py on Windows

IDF wrapper tool (idf.py.exe) This tools helps invoke idf.py in Windows CMD shell. In Windows CMD shell, python scripts can be executed directly (by t

Espressif Systems 3 Dec 13, 2021
GFX Demo for the ESP-IDF

Display Drivers and Demo for GFX This is a Demo of GFX With Several Display Drivers This is not GFX itself, but it includes it. GFX Documentation is b

honey the codewitch 61 May 17, 2022
使用ESP-IDF、ESP-ADF、LVGL等库,基于ESP32S2实现简单的网络收音机和FM收音机功能。

【电子森林项目】网络收音机/FM收音机 这个项目是报名《硬禾“暑期一起练”第3个平台 - 基于ESP32-S2模块的网络收音机和音频信号处理》所做的。 基本功能: 可以连接WiFi收听HLS协议的网络电台节目 收听空中的FM电台88MHz~108MHz OLED0.96寸显示 四个独立按键控制两种模

DaMi 12 Jun 3, 2022
LVGL8 for ESP-IDF

X-UI LVGL8 for ESP-IDF 移植自X-TRACK项目的页面栈框架,新增支持异步通信的订阅发布数据中心 特点 使用C语言重构,方便继承复用 核心文件 ui_page_manager.h、ui_page_manager.c 实现页面栈、订阅发布数据中心 完整页面生命周期 MVC架构 数

Zing 11 Apr 19, 2022
Additional components for ESP-IDF, maintained by Espressif

Espressif IDF Extra Components This repository aims to store ESP-IDF extra components which have been seperated and uploaded into IDF Component Manage

Espressif Systems 15 Jun 6, 2022
This FreeRTOS example builds a simple Timer application for Linux using the ESP-IDF

Supported Targets Linux This FreeRTOS example builds a simple Timer application for Linux using the ESP-IDF. Build Source the IDF environment as usual

null 13 Apr 4, 2022
SX1276/77/78/79 Low Power Long Range Transceiver driver for esp-idf

esp-idf-sx127x SX1276/77/78/79 Low Power Long Range Transceiver driver for esp-idf. I based on this. Changes from the original Added support for ESP32

null 11 Jun 21, 2022
WireGuard Implementation for ESP-IDF

esp_wireguard, WireGuard Implementation for ESP-IDF This is an implementation of the WireGuard® for ESP-IDF, based on WireGuard Implementation for lwI

Tomoyuki Sakurai 76 Jun 24, 2022
SX1262//68 Low Power Long Range Transceiver driver for esp-idf

esp-idf-sx126x SX1262//68 Low Power Long Range Transceiver driver for esp-idf. I ported from here. Ai-Thinker offers several LoRa modules. You can get

null 3 May 9, 2022
SI4432 ISM Transceiver driver for esp-idf

esp-idf-si4432 SI4432 ISM Transceiver driver for esp-idf. I refered this. Software requirements esp-idf v4.4 or later. This is because this version su

null 3 May 29, 2022
CC2500 Low-Cost Low-Power 2.4 GHz RF Transceiver driver for esp-idf

esp-idf-cc2500 CC2500 Low-Cost Low-Power 2.4 GHz RF Transceiver driver for esp-idf. I ported from this. 2.00mm pitch External Antena 1.27mm pitch PCB

null 3 May 29, 2022
Collection of additional Ethernet drivers for ESP-IDF

Collection of additional Ethernet drivers for ESP-IDF This repository aims to store additional Ethernet drivers which are not available directly in ES

Espressif Systems 3 May 9, 2022
Adafruit GFX compatible arduino library for using cat thermal printers with the ESP32

CatGFX This library offers a Adafruit GFX "driver" for ESP32 and the cheap cat (or rabbit?) BLE thermal printers like this one: For usage information

Claus Näveke 2 May 19, 2022
Bluetooth LE Keyboard library for the ESP32 (Arduino IDE compatible)

ESP32 BLE Keyboard library This library allows you to make the ESP32 act as a Bluetooth Keyboard and control what it does. You might also be intereste

null 1.2k Jul 5, 2022
Arduino/ESP32 firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.

Arduino/ESP32 firmware for DIY haptic gloves. Officially compatible with LucidVR gloves.

null 1.3k Jul 4, 2022
ESP32-Skid-Steer - Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on the model.

ESP32-Skid-Steer Bruder Catepillar Skid Steer model converted to RC, controlled by an ESP32 with 2 analog joysticks and a receiver that is an ESP32 on

null 5 Feb 4, 2022