diff --git a/.gitignore b/.gitignore index ce49d46..66ebacf 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,8 @@ *.exe *.out *.app - -.vscode/ + +.vscode/ .DS_Store +build/ \ No newline at end of file diff --git a/README.md b/README.md index 004036f..f5828f2 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,6 @@ * Check your boards `arduino-cli board list` * Compile `arduino-cli compile --profile adafruit_qtpy_m0` * Upload `arduino-cli upload -p COM3` -* Compile and upload `arduino-cli compile --fqbn adafruit:samd:adafruit_qtpy_m0:opt=small,usbstack=tinyusb,debug=off -u -p COM3` \ No newline at end of file +* Compile and upload `arduino-cli compile --fqbn adafruit:samd:adafruit_qtpy_m0:opt=small,usbstack=tinyusb,debug=off -u -p COM3` +* Compile export `arduino-cli compile --fqbn adafruit:samd:adafruit_qtpy_m0:opt=small,usbstack=tinyusb,debug=off --output-dir build/` +* Convert to uf2 `uf2conv build/USBNova.ino.bin -o build/USBNova.ino.uf2` \ No newline at end of file diff --git a/src/duckparser/duckparser.cpp b/src/duckparser/duckparser.cpp index 92506da..c10e9d4 100644 --- a/src/duckparser/duckparser.cpp +++ b/src/duckparser/duckparser.cpp @@ -427,6 +427,17 @@ namespace duckparser { line_list_destroy(l); } + // https://github.com/hathach/tinyusb/blob/fd5bb6e5db8e8e997d66775e689cc73f149e7fc1/src/class/hid/hid.h#L153 + // GAMEPAD PRESS button&dpad + // GAMEPAD RELEASE button&dpad + // GAMEPAD CLICK button&dpad / GAMEPAD button&dpad + // GAMEPAD direction amount + + // Consumer + // https://github.com/hathach/tinyusb/blob/fd5bb6e5db8e8e997d66775e689cc73f149e7fc1/examples/device/hid_composite/src/main.c#L155 + // KEYCODE 2bytecode + // Codes: https://github.com/hathach/tinyusb/blob/ae531a79f654d566790a4daae350730cdc0a01e9/src/class/hid/hid.h#L790 + int getRepeats() { return repeat_num; } diff --git a/src/preferences/preferences.cpp b/src/preferences/preferences.cpp index 24bf46f..8a6df4f 100644 --- a/src/preferences/preferences.cpp +++ b/src/preferences/preferences.cpp @@ -24,13 +24,13 @@ namespace preferences { bool enable_msc { false }; bool enable_led { true }; - std::string hid_vid { "239A" }; - std::string hid_pid { "80CB" }; + std::string hid_vid { "16D0" }; + std::string hid_pid { "11A4" }; std::string hid_rev { "0100" }; - std::string msc_vid { "Adafruit" }; - std::string msc_pid { "External Flash" }; - std::string msc_rev { "1.0" }; + std::string msc_vid { "SpHuhn" }; // max. 8 chars + std::string msc_pid { "USB Nova" }; // max. 16 chars + std::string msc_rev { "1.0" }; // max. 4 chars std::string default_layout { "US" }; int default_delay { 5 }; @@ -198,12 +198,12 @@ namespace preferences { enable_msc = false; enable_led = true; - hid_vid = "239A"; - hid_pid = "80CB"; + hid_vid = "16D0"; + hid_pid = "11A4"; hid_rev = "0100"; - msc_vid = "Adafruit"; - msc_pid = "External Flash"; + msc_vid = "SpHuhn"; + msc_pid = "USB Nova"; msc_rev = "1.0"; default_layout = "US";