Skip to content

wakwak-koba/EspUsbHost

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a library for using USB Host with ESP32.

Target board

  • ESP32-S3-DevKitC
  • M5Stack ATOMS3
  • M5Stack StampS3

function

  • USB Keyboard
  • USB Mouse
  • USB Serial

Usage

#include "EspUsbHostKeyboard.h"

class MyEspUsbHostKeyboard : public EspUsbHostKeyboard {
public:
  void onReceive(usb_transfer_t *transfer) {
    uint8_t *const p = transfer->data_buffer;
    Serial.printf("onKey %02x %02x %02x %02x %02x %02x %02x %02x\n", p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
  }
};

MyEspUsbHostKeyboard usbDev;

void setup() {
  Serial.begin(115200);
  usbDev.begin();
}

void loop() {
  usbDev.task();
}

About

Library for using USB Host with ESP32

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%