Skip to content

Commit 6b048cf

Browse files
committed
bump to release 0.17.0
1 parent a33ffa2 commit 6b048cf

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

USBvalve/USBvalve.ino

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
#else
3737

3838
#include "SSD1306AsciiWire.h"
39+
// LED Pin. If solid GREEN everything is OK, otherwise it will be put OFF
40+
#define LED_PIN 25
3941

4042
#endif
4143

@@ -109,7 +111,7 @@ bool activeState = false;
109111
//
110112
// USBvalve globals
111113
//
112-
#define VERSION "USBvalve - 0.16.0"
114+
#define VERSION "USBvalve - 0.17.0"
113115
boolean readme = false;
114116
boolean autorun = false;
115117
boolean written = false;
@@ -240,6 +242,13 @@ void setup() {
240242
delay(1000); // Loop forever
241243
}
242244
}
245+
246+
#if !defined(PIWATCH)
247+
// Set up led PIN
248+
gpio_init(LED_PIN);
249+
gpio_set_dir(LED_PIN, GPIO_OUT);
250+
gpio_put(LED_PIN, 1);
251+
#endif
243252
}
244253

245254
// Core 1 Setup: will be used for the USB host functions for BADUSB detector
@@ -263,6 +272,9 @@ void loop() {
263272
if (readme == true) {
264273
printout("\n[!] README (R)");
265274
readme = false;
275+
#if !defined(PIWATCH)
276+
gpio_put(LED_PIN, 0); // Turn Off LED
277+
#endif
266278
}
267279

268280
if (autorun == true) {
@@ -274,18 +286,27 @@ void loop() {
274286
printout("\n[!] DELETING");
275287
deleted = false;
276288
deleted_reported = true;
289+
#if !defined(PIWATCH)
290+
gpio_put(LED_PIN, 0); // Turn Off LED
291+
#endif
277292
}
278293

279294
if (written == true && written_reported == false) {
280295
printout("\n[!] WRITING");
281296
written = false;
282297
written_reported = true;
298+
#if !defined(PIWATCH)
299+
gpio_put(LED_PIN, 0); // Turn Off LED
300+
#endif
283301
}
284302

285303
if (hid_sent == true && hid_reported == false) {
286304
printout("\n[!!] HID Sending data");
287305
hid_sent = false;
288306
hid_reported = true;
307+
#if !defined(PIWATCH)
308+
gpio_put(LED_PIN, 0); // Turn Off LED
309+
#endif
289310
}
290311

291312
if (BOOTSEL) {
@@ -495,6 +516,9 @@ void tuh_hid_mount_cb(uint8_t dev_addr, uint8_t instance, uint8_t const* desc_re
495516
tuh_vid_pid_get(dev_addr, &vid, &pid);
496517

497518
printout("\n[!!] HID Device");
519+
#if !defined(PIWATCH)
520+
gpio_put(LED_PIN, 0); // Turn Off LED
521+
#endif
498522

499523
SerialTinyUSB.printf("HID device address = %d, instance = %d mounted\r\n", dev_addr, instance);
500524
SerialTinyUSB.printf("VID = %04x, PID = %04x\r\n", vid, pid);
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)