Skip to content

Commit

Permalink
Rewrote HID cpde to be dymamic (not perfect yet but works)
Browse files Browse the repository at this point in the history
report struct is no though !!!
  • Loading branch information
MNS26 committed Mar 22, 2024
1 parent 5970b95 commit 10795e9
Show file tree
Hide file tree
Showing 6 changed files with 758 additions and 1,903 deletions.
11 changes: 6 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"files.associations": {
"*.embeddedhtml": "html",
"usi_i2c_slave.c": "cpp",
"*.x": "cpp",
"mstd_iterator": "cpp",
"array": "cpp",
Expand Down Expand Up @@ -60,18 +59,20 @@
"streambuf": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp",
"*.bak": "plaintext",
"i2c.pio.h": "c",
"pio.h": "c",
"*.pio": "pio"
},
"C_Cpp.dimInactiveRegions": true,
"editor.insertSpaces": false,
"editor.insertSpaces": true,
"editor.wordBasedSuggestions": "matchingDocuments",
"editor.suggest.insertMode": "replace",
"editor.semanticHighlighting.enabled": true,
"editor.tabSize": 2,
"cmake.configureOnOpen": true,
"cmake.configureOnOpen": false,
"C_Cpp.errorSquiggles": "enabled",
"python.analysis.typeCheckingMode": "basic",
"python.analysis.typeCheckingMode": "strict",
"C_Cpp.codeAnalysis.runAutomatically": true,
"C_Cpp.clang_format_style": "LLVM",
"debug.disassemblyView.showSourceCode": true,
}
66 changes: 33 additions & 33 deletions config/common.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,44 @@ board_build.flash_mode = qio
monitor_filters = default, colorize
monitor_speed = 115200

;board_build.f_cpu = 40000000L ;40Mhz (custom)
;board_build.f_cpu = 45000000L ;45Mhz (custom)
;board_build.f_cpu = 40000000L ;40Mhz (UC) (custom)
;board_build.f_cpu = 45000000L ;45Mhz (UC) (custom)
;board_build.f_cpu = 50000000L ;50Mhz (default min)
;board_build.f_cpu = 55000000L ;55Mhz (custom)
;board_build.f_cpu = 60000000L ;60Mhz (custom)
;board_build.f_cpu = 65000000L ;65Mhz (custom)
;board_build.f_cpu = 70000000L ;70Mhz (custom)
;board_build.f_cpu = 75000000L ;75Mhz (custom)
;board_build.f_cpu = 80000000L ;80Mhz (custom)
;board_build.f_cpu = 85000000L ;85Mhz (custom)
;board_build.f_cpu = 90000000L ;90Mhz (custom)
;board_build.f_cpu = 95000000L ;95Mhz (custom)
;board_build.f_cpu = 100000000L ;100Mhz (custom)
;board_build.f_cpu = 120000000L ;120Mhz (custom)
;board_build.f_cpu = 55000000L ;55Mhz (UC) (custom)
;board_build.f_cpu = 60000000L ;60Mhz (UC) (custom)
;board_build.f_cpu = 65000000L ;65Mhz (UC) (custom)
;board_build.f_cpu = 70000000L ;70Mhz (UC) (custom)
;board_build.f_cpu = 75000000L ;75Mhz (UC) (custom)
;board_build.f_cpu = 80000000L ;80Mhz (UC) (custom)
;board_build.f_cpu = 85000000L ;85Mhz (UC) (custom)
;board_build.f_cpu = 90000000L ;90Mhz (UC) (custom)
;board_build.f_cpu = 95000000L ;95Mhz (UC) (custom)
;board_build.f_cpu = 100000000L ;100Mhz (UC) (custom)
;board_build.f_cpu = 120000000L ;120Mhz (UC) (custom)
;board_build.f_cpu = 125000000L ;125Mhz (default)
;board_build.f_cpu = 130000000L ;130Mhz (custom)
;board_build.f_cpu = 133000000L ;133Mhz (default)
;board_build.f_cpu = 140000000L ;140Mhz (overclock) (custom)
;board_build.f_cpu = 145000000L ;145Mhz (overclock) (custom)
;board_build.f_cpu = 140000000L ;140Mhz (OC) (custom)
;board_build.f_cpu = 145000000L ;145Mhz (OC) (custom)
board_build.f_cpu = 150000000L ;150Mhz (overclock)
;board_build.f_cpu = 155000000L ;155Mhz (overclock) (custom)
;board_build.f_cpu = 160000000L ;160Mhz (overclock) (custom)
;board_build.f_cpu = 165000000L ;165Mhz (overclock) (custom)
;board_build.f_cpu = 170000000L ;170Mhz (overclock) (custom)
;board_build.f_cpu = 175000000L ;175Mhz (overclock) (does not run)
;board_build.f_cpu = 180000000L ;180Mhz (overclock) (custom)
;board_build.f_cpu = 185000000L ;185Mhz (overclock) (custom)
;board_build.f_cpu = 190000000L ;190Mhz (overclock) (custom)
;board_build.f_cpu = 195000000L ;195Mhz (overclock) (custom)
;board_build.f_cpu = 200000000L ;200Mhz (overclock) (custom)
;board_build.f_cpu = 205000000L ;205Mhz (overclock) (custom)
;board_build.f_cpu = 210000000L ;210Mhz (overclock) (custom)
;board_build.f_cpu = 215000000L ;215Mhz (overclock) (custom)
;board_build.f_cpu = 220000000L ;220Mhz (overclock) (custom)
;board_build.f_cpu = 225000000L ;225Mhz (overclock)
;board_build.f_cpu = 240000000L ;240Mhz (overclock)
;board_build.f_cpu = 250000000L ;250Mhz (overclock)
;board_build.f_cpu = 270000000L ;270Mhz (overclock) (custom)
;board_build.f_cpu = 155000000L ;155Mhz (OC) (custom)
;board_build.f_cpu = 160000000L ;160Mhz (OC) (custom)
;board_build.f_cpu = 165000000L ;165Mhz (OC) (custom)
;board_build.f_cpu = 170000000L ;170Mhz (OC) (custom)
;board_build.f_cpu = 175000000L ;175Mhz (OC) (does not run... idk why)
;board_build.f_cpu = 180000000L ;180Mhz (OC) (custom)
;board_build.f_cpu = 185000000L ;185Mhz (OC) (custom)
;board_build.f_cpu = 190000000L ;190Mhz (OC) (custom)
;board_build.f_cpu = 195000000L ;195Mhz (OC) (custom)
;board_build.f_cpu = 200000000L ;200Mhz (OC) (custom)
;board_build.f_cpu = 205000000L ;205Mhz (OC) (custom)
;board_build.f_cpu = 210000000L ;210Mhz (OC) (custom)
;board_build.f_cpu = 215000000L ;215Mhz (OC) (custom)
;board_build.f_cpu = 220000000L ;220Mhz (OC) (custom)
;board_build.f_cpu = 225000000L ;225Mhz (OC)
;board_build.f_cpu = 240000000L ;240Mhz (OC)
;board_build.f_cpu = 250000000L ;250Mhz (OC)
;board_build.f_cpu = 270000000L ;270Mhz (OC) (custom)



Expand Down
2 changes: 1 addition & 1 deletion include/HID_Report.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

typedef struct TU_ATTR_PACKED
{
uint32_t buttons ; ///< Buttons mask for currently pressed buttons
int16_t x ; ///< Delta x movement of left analog-stick
int16_t y ; ///< Delta y movement of left analog-stick
int16_t z ; ///< Delta z movement of analog right trigger
Expand All @@ -12,6 +11,7 @@ typedef struct TU_ATTR_PACKED
int16_t rz ; ///< Delta Rz movement of right analog-joystick
int16_t slider ; ///< Delta Ry movement of analog right trigger
int16_t dial ; ///< Delta Ry movement of analog right trigger
uint32_t buttons ; ///< Buttons mask for currently pressed buttons
uint8_t hat1 :4 ; ///< Buttons mask for currently pressed buttons in the DPad/hat
uint8_t hat2 :4 ; ///< Buttons mask for currently pressed buttons in the DPad/hat
}hid_Joystick_report_t;
Expand Down
Loading

0 comments on commit 10795e9

Please sign in to comment.