summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/python/qmk/cli/generate/config_h.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py
index 31b8d70635..51051ef610 100755
--- a/lib/python/qmk/cli/generate/config_h.py
+++ b/lib/python/qmk/cli/generate/config_h.py
@@ -126,6 +126,13 @@ def generate_encoder_config(encoder_json, config_h_lines, postfix=''):
config_h_lines.append(generate_define(f'ENCODER_RESOLUTIONS{postfix}', f'{{ {", ".join(map(str,resolutions))} }}'))
+def generate_pointing_device_config(pointing_device_json, config_h_lines, postfix=''):
+
+ rotation = pointing_device_json.get('rotation', 0)
+
+ generate_define(f'POINTING_DEVICE_ROTATION_{rotation}{postfix}')
+
+
def generate_split_config(kb_info_json, config_h_lines):
"""Generate the config.h lines for split boards."""
if 'primary' in kb_info_json['split']:
@@ -156,6 +163,9 @@ def generate_split_config(kb_info_json, config_h_lines):
if 'right' in kb_info_json['split'].get('encoder', {}):
generate_encoder_config(kb_info_json['split']['encoder']['right'], config_h_lines, '_RIGHT')
+ if 'right' in kb_info_json['split'].get('pointing_device', {}):
+ generate_pointing_device_config(kb_info_json['split']['pointing_device']['right'], config_h_lines, '_RIGHT')
+
def generate_led_animations_config(led_feature_json, config_h_lines, prefix):
for animation in led_feature_json.get('animations', {}):
@@ -207,5 +217,8 @@ def generate_config_h(cli):
if 'rgblight' in kb_info_json:
generate_led_animations_config(kb_info_json['rgblight'], config_h_lines, 'RGBLIGHT_EFFECT_')
+ if 'pointing_device' in kb_info_json:
+ generate_pointing_device_config(kb_info_json['pointing_device'], config_h_lines)
+
# Show the results
dump_lines(cli.args.output, config_h_lines, cli.args.quiet)