mirror of
https://github.com/cecio/USBvalve.git
synced 2025-12-06 03:41:45 +00:00
bump to release 0.17.0
This commit is contained in:
@@ -36,6 +36,8 @@
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
#include "SSD1306AsciiWire.h"
|
#include "SSD1306AsciiWire.h"
|
||||||
|
// LED Pin. If solid GREEN everything is OK, otherwise it will be put OFF
|
||||||
|
#define LED_PIN 25
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -109,7 +111,7 @@ bool activeState = false;
|
|||||||
//
|
//
|
||||||
// USBvalve globals
|
// USBvalve globals
|
||||||
//
|
//
|
||||||
#define VERSION "USBvalve - 0.16.0"
|
#define VERSION "USBvalve - 0.17.0"
|
||||||
boolean readme = false;
|
boolean readme = false;
|
||||||
boolean autorun = false;
|
boolean autorun = false;
|
||||||
boolean written = false;
|
boolean written = false;
|
||||||
@@ -240,6 +242,13 @@ void setup() {
|
|||||||
delay(1000); // Loop forever
|
delay(1000); // Loop forever
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(PIWATCH)
|
||||||
|
// Set up led PIN
|
||||||
|
gpio_init(LED_PIN);
|
||||||
|
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||||
|
gpio_put(LED_PIN, 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Core 1 Setup: will be used for the USB host functions for BADUSB detector
|
// Core 1 Setup: will be used for the USB host functions for BADUSB detector
|
||||||
@@ -263,6 +272,9 @@ void loop() {
|
|||||||
if (readme == true) {
|
if (readme == true) {
|
||||||
printout("\n[!] README (R)");
|
printout("\n[!] README (R)");
|
||||||
readme = false;
|
readme = false;
|
||||||
|
#if !defined(PIWATCH)
|
||||||
|
gpio_put(LED_PIN, 0); // Turn Off LED
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (autorun == true) {
|
if (autorun == true) {
|
||||||
@@ -274,18 +286,27 @@ void loop() {
|
|||||||
printout("\n[!] DELETING");
|
printout("\n[!] DELETING");
|
||||||
deleted = false;
|
deleted = false;
|
||||||
deleted_reported = true;
|
deleted_reported = true;
|
||||||
|
#if !defined(PIWATCH)
|
||||||
|
gpio_put(LED_PIN, 0); // Turn Off LED
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (written == true && written_reported == false) {
|
if (written == true && written_reported == false) {
|
||||||
printout("\n[!] WRITING");
|
printout("\n[!] WRITING");
|
||||||
written = false;
|
written = false;
|
||||||
written_reported = true;
|
written_reported = true;
|
||||||
|
#if !defined(PIWATCH)
|
||||||
|
gpio_put(LED_PIN, 0); // Turn Off LED
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hid_sent == true && hid_reported == false) {
|
if (hid_sent == true && hid_reported == false) {
|
||||||
printout("\n[!!] HID Sending data");
|
printout("\n[!!] HID Sending data");
|
||||||
hid_sent = false;
|
hid_sent = false;
|
||||||
hid_reported = true;
|
hid_reported = true;
|
||||||
|
#if !defined(PIWATCH)
|
||||||
|
gpio_put(LED_PIN, 0); // Turn Off LED
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BOOTSEL) {
|
if (BOOTSEL) {
|
||||||
@@ -495,6 +516,9 @@ void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* desc_re
|
|||||||
tuh_vid_pid_get(dev_addr, &vid, &pid);
|
tuh_vid_pid_get(dev_addr, &vid, &pid);
|
||||||
|
|
||||||
printout("\n[!!] HID Device");
|
printout("\n[!!] HID Device");
|
||||||
|
#if !defined(PIWATCH)
|
||||||
|
gpio_put(LED_PIN, 0); // Turn Off LED
|
||||||
|
#endif
|
||||||
|
|
||||||
SerialTinyUSB.printf("HID device address = %d, instance = %d mounted\r\n", dev_addr, instance);
|
SerialTinyUSB.printf("HID device address = %d, instance = %d mounted\r\n", dev_addr, instance);
|
||||||
SerialTinyUSB.printf("VID = %04x, PID = %04x\r\n", vid, pid);
|
SerialTinyUSB.printf("VID = %04x, PID = %04x\r\n", vid, pid);
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user