diff --git a/README.md b/README.md index de07bb3..faaf329 100644 --- a/README.md +++ b/README.md @@ -170,8 +170,8 @@ I grouped most of the variables you may want to modify in this section ([see Doc Obviously you can also build your own firmware. To build the *standard* one I used: -- Arduino IDE `2.3.1` -- `Adafruit TinyUSB Library` version `3.0.0`, `Pico-PIO-USB` version `0.5.2`, Board `Raspberry Pi RP2040 (3.7.2)` setting Tools=>CPU Speed at `120MHz` and Tools=>USB Stack to `Adafruit TinyUSB` +- Arduino IDE `2.3.2` +- `Adafruit TinyUSB Library` version `3.1.1`, `Pico-PIO-USB` version `0.5.2`, Board `Raspberry Pi RP2040 (3.7.2)` setting Tools=>CPU Speed at `120MHz` and Tools=>USB Stack to `Adafruit TinyUSB` - `ssd1306` OLED library version `1.8.3` If you want to re-create a new fake filesystem, you may want to have a look to the `utils` folder, where I placed some utilities to build a new one. diff --git a/USBvalve/USBvalve.ino b/USBvalve/USBvalve.ino index f38c43f..238a7a1 100644 --- a/USBvalve/USBvalve.ino +++ b/USBvalve/USBvalve.ino @@ -109,7 +109,7 @@ bool activeState = false; // // USBvalve globals // -#define VERSION "USBvalve - 0.15.1" +#define VERSION "USBvalve - 0.16.0" boolean readme = false; boolean autorun = false; boolean written = false; @@ -244,7 +244,7 @@ void setup() { // Core 1 Setup: will be used for the USB host functions for BADUSB detector void setup1() { - // Set a custom clock (multiple of 12Mhz) to achieve maximum compatibility + // Set a custom clock (multiple of 12Mhz) to achieve maximum compatibility for HID set_sys_clock_khz(144000, true); pio_usb_configuration_t pio_cfg = PIO_USB_DEFAULT_CONFIG; @@ -666,3 +666,31 @@ void cursor_movement(int8_t x, int8_t y, int8_t wheel) { } // END of BADUSB detector section + +// +// OTHER Host devices detection section +// + +// Invoked when a device with MassStorage interface is mounted +void tuh_msc_mount_cb(uint8_t dev_addr) { + printout("\n[++] Mass Device"); + SerialTinyUSB.printf("Mass Device attached, address = %d\r\n", dev_addr); +} + +// Invoked when a device with MassStorage interface is unmounted +void tuh_msc_umount_cb(uint8_t dev_addr) { + SerialTinyUSB.printf("Mass Device unmounted, address = %d\r\n", dev_addr); +} + +// Invoked when a device with CDC (Communication Device Class) interface is mounted +void tuh_cdc_mount_cb(uint8_t idx) { + printout("\n[++] CDC Device"); + SerialTinyUSB.printf("CDC Device attached, idx = %d\r\n", idx); +} + +// Invoked when a device with CDC (Communication Device Class) interface is unmounted +void tuh_cdc_umount_cb(uint8_t idx) { + SerialTinyUSB.printf("CDC Device unmounted, idx = %d\r\n", idx); +} + +// END of OTHER Host devices detector section diff --git a/firmware/USBvalve-0.15.1-32.uf2 b/firmware/USBvalve-0.16.0-32.uf2 similarity index 73% rename from firmware/USBvalve-0.15.1-32.uf2 rename to firmware/USBvalve-0.16.0-32.uf2 index c549c0b..8d0b68e 100644 Binary files a/firmware/USBvalve-0.15.1-32.uf2 and b/firmware/USBvalve-0.16.0-32.uf2 differ diff --git a/firmware/USBvalve-0.15.1-64.uf2 b/firmware/USBvalve-0.16.0-64.uf2 similarity index 73% rename from firmware/USBvalve-0.15.1-64.uf2 rename to firmware/USBvalve-0.16.0-64.uf2 index 52be67a..e42e20f 100644 Binary files a/firmware/USBvalve-0.15.1-64.uf2 and b/firmware/USBvalve-0.16.0-64.uf2 differ diff --git a/firmware/USBvalve-0.15.1-PIWATCH.uf2 b/firmware/USBvalve-0.16.0-PIWATCH.uf2 similarity index 68% rename from firmware/USBvalve-0.15.1-PIWATCH.uf2 rename to firmware/USBvalve-0.16.0-PIWATCH.uf2 index 51285b4..9ddf2f8 100644 Binary files a/firmware/USBvalve-0.15.1-PIWATCH.uf2 and b/firmware/USBvalve-0.16.0-PIWATCH.uf2 differ diff --git a/pictures/version1_2.png b/pictures/version1_2.png new file mode 100644 index 0000000..ca8bcb2 Binary files /dev/null and b/pictures/version1_2.png differ