mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-30 05:50:43 +02:00
Render request/response in XAP docs
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
{%- if subroute.request_type == 'struct' -%}
|
||||
<br>__Request:__
|
||||
{%- for member in subroute.request_struct_members -%}
|
||||
<br>{{ " "|safe*4 }}* {{ member.name }}: `{{ member.type }}`
|
||||
{%- endfor -%}
|
||||
{%- elif subroute.request_type -%}
|
||||
<br>__Request:__ `{{ subroute.request_type }}`
|
||||
{%- endif -%}
|
||||
@@ -0,0 +1,8 @@
|
||||
{%- if subroute.return_type == 'struct' -%}
|
||||
<br>__Response:__
|
||||
{%- for member in subroute.return_struct_members -%}
|
||||
<br>{{ " "|safe*4 }}* {{ member.name }}: `{{ member.type }}`
|
||||
{%- endfor -%}
|
||||
{%- elif subroute.return_type -%}
|
||||
<br>__Response:__ `{{ subroute.return_type }}`
|
||||
{%- endif -%}
|
||||
@@ -3,10 +3,10 @@
|
||||
{{ route.description }}
|
||||
|
||||
{% if route.routes %}
|
||||
| Name | Route | Tags | Definition |
|
||||
| -- | -- | -- | -- |
|
||||
| Name | Route | Tags | Payloads | Description |
|
||||
| -- | -- | -- | -- | -- |
|
||||
{%- for subid, subroute in route.routes | dictsort %}
|
||||
| {{ subroute.name }} | `{{ id }} {{ subid }}` | {% if 'secure' == subroute.permissions %}__Secure__{% endif %} | {{ subroute.description.replace('\n', '<br>') }} |
|
||||
| {{ subroute.name }} | `{{ id }} {{ subid }}` | {% if 'secure' == subroute.permissions %}__Secure__{% endif %} | {%- include 'route_request.md.j2' -%}{%- include 'route_response.md.j2' -%} | {{ subroute.description.replace('\n', '<br>') }}|
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
@@ -223,8 +223,6 @@
|
||||
|
||||
* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`
|
||||
* e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.
|
||||
* Response:
|
||||
* `u32` value.
|
||||
'''
|
||||
return_type: u32
|
||||
return_purpose: bcd-version
|
||||
|
||||
@@ -226,8 +226,6 @@
|
||||
|
||||
* Returns the BCD-encoded version in the format of XX.YY.ZZZZ => `0xXXYYZZZZ`
|
||||
* e.g. 3.2.115 will match `0x03020115`, or bytes {0x15,0x01,0x02,0x03}.
|
||||
* Response:
|
||||
* `u32` value.
|
||||
'''
|
||||
return_type: u32
|
||||
return_purpose: bcd-version
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
type: command
|
||||
name: Get Layer Count
|
||||
define: GET_LAYER_COUNT
|
||||
description: TODO
|
||||
description: Query maximum number of layers that can be addressed within the keymap.
|
||||
return_type: u8
|
||||
return_constant: DYNAMIC_KEYMAP_LAYER_COUNT
|
||||
}
|
||||
@@ -36,7 +36,7 @@
|
||||
type: command
|
||||
name: Get Keycode
|
||||
define: GET_KEYMAP_KEYCODE
|
||||
description: TODO
|
||||
description: Query the Keycode at the requested location.
|
||||
request_type: struct
|
||||
request_struct_length: 3
|
||||
request_struct_members: [
|
||||
@@ -60,7 +60,7 @@
|
||||
type: command
|
||||
name: Set Keycode
|
||||
define: SET_KEYMAP_KEYCODE
|
||||
description: TODO
|
||||
description: Modify the Keycode at the requested location.
|
||||
permissions: secure
|
||||
request_type: struct
|
||||
request_struct_length: 5
|
||||
@@ -113,7 +113,7 @@
|
||||
type: command
|
||||
name: Get Keycode
|
||||
define: GET_ENCODER_KEYCODE
|
||||
description: TODO
|
||||
description: Query the Keycode at the requested location.
|
||||
request_type: struct
|
||||
request_struct_length: 3
|
||||
request_struct_members: [
|
||||
@@ -138,7 +138,7 @@
|
||||
name: Set Keycode
|
||||
define: SET_ENCODER_KEYCODE
|
||||
permissions: secure
|
||||
description: TODO
|
||||
description: Modify the Keycode at the requested location.
|
||||
request_type: struct
|
||||
request_struct_length: 5
|
||||
request_struct_members: [
|
||||
|
||||
Reference in New Issue
Block a user