Initial implementation of XAP protocol.
This commit is contained in:
parent
f4c447f2df
commit
eba91c6e28
34 changed files with 1934 additions and 4 deletions
|
@ -66,6 +66,9 @@ subcommands = [
|
|||
'qmk.cli.new.keymap',
|
||||
'qmk.cli.pyformat',
|
||||
'qmk.cli.pytest',
|
||||
'qmk.cli.xap.generate_docs',
|
||||
'qmk.cli.xap.generate_json',
|
||||
'qmk.cli.xap.generate_qmk',
|
||||
]
|
||||
|
||||
|
||||
|
|
0
lib/python/qmk/cli/xap/__init__.py
Executable file
0
lib/python/qmk/cli/xap/__init__.py
Executable file
11
lib/python/qmk/cli/xap/generate_docs.py
Executable file
11
lib/python/qmk/cli/xap/generate_docs.py
Executable file
|
@ -0,0 +1,11 @@
|
|||
"""This script generates the XAP protocol documentation.
|
||||
"""
|
||||
from milc import cli
|
||||
from qmk.xap.gen_docs.generator import generate_docs
|
||||
|
||||
|
||||
@cli.subcommand('Generates the XAP protocol documentation.', hidden=False if cli.config.user.developer else True)
|
||||
def xap_generate_docs(cli):
|
||||
"""Generates the XAP protocol documentation by merging the definitions files, and producing the corresponding Markdown document under `/docs/`.
|
||||
"""
|
||||
generate_docs()
|
13
lib/python/qmk/cli/xap/generate_json.py
Executable file
13
lib/python/qmk/cli/xap/generate_json.py
Executable file
|
@ -0,0 +1,13 @@
|
|||
"""This script generates the consolidated XAP protocol definitions.
|
||||
"""
|
||||
import hjson
|
||||
from milc import cli
|
||||
from qmk.xap.common import latest_xap_defs
|
||||
|
||||
|
||||
@cli.subcommand('Generates the consolidated XAP protocol definitions.', hidden=False if cli.config.user.developer else True)
|
||||
def xap_generate_json(cli):
|
||||
"""Generates the consolidated XAP protocol definitions.
|
||||
"""
|
||||
defs = latest_xap_defs()
|
||||
print(hjson.dumps(defs))
|
24
lib/python/qmk/cli/xap/generate_qmk.py
Executable file
24
lib/python/qmk/cli/xap/generate_qmk.py
Executable file
|
@ -0,0 +1,24 @@
|
|||
"""This script generates the XAP protocol generated sources to be compiled into QMK firmware.
|
||||
"""
|
||||
from milc import cli
|
||||
|
||||
from qmk.path import normpath
|
||||
from qmk.xap.gen_firmware.inline_generator import generate_inline
|
||||
from qmk.xap.gen_firmware.header_generator import generate_header
|
||||
|
||||
|
||||
@cli.argument('-o', '--output', type=normpath, help='File to write to')
|
||||
@cli.subcommand('Generates the XAP protocol include.', hidden=False if cli.config.user.developer else True)
|
||||
def xap_generate_qmk_inc(cli):
|
||||
"""Generates the XAP protocol inline codegen file, generated during normal build.
|
||||
"""
|
||||
generate_inline(cli.args.output)
|
||||
|
||||
|
||||
@cli.argument('-o', '--output', type=normpath, help='File to write to')
|
||||
@cli.argument('-kb', '--keyboard', help='Name of the keyboard')
|
||||
@cli.subcommand('Generates the XAP protocol include.', hidden=False if cli.config.user.developer else True)
|
||||
def xap_generate_qmk_h(cli):
|
||||
"""Generates the XAP protocol header file, generated during normal build.
|
||||
"""
|
||||
generate_header(cli.args.output, cli.args.keyboard)
|
Loading…
Add table
Add a link
Reference in a new issue