qmk format-c, qmk format-python

This commit is contained in:
Nick Brassel 2022-03-09 20:01:20 +11:00
parent 575d8c19fc
commit c3ac89d1c9
4 changed files with 13 additions and 9 deletions

View file

@ -1,7 +1,5 @@
"""This script generates the XAP protocol generated header to be compiled into QMK.
"""
import pyhash
from qmk.casing import to_snake
from qmk.constants import GPL2_HEADER_C_LIKE, GENERATED_HEADER_C_LIKE
from qmk.xap.common import latest_xap_defs, route_conditions

View file

@ -113,4 +113,6 @@ void xap_execute_route(xap_token_t token, const xap_route_t *routes, size_t max_
xap_respond_failure(token, XAP_RESPONSE_FLAG_FAILED);
}
void xap_receive(xap_token_t token, const uint8_t *data, size_t length) { xap_execute_route(token, xap_route_table, sizeof(xap_route_table) / sizeof(xap_route_t), data, length); }
void xap_receive(xap_token_t token, const uint8_t *data, size_t length) {
xap_execute_route(token, xap_route_table, sizeof(xap_route_table) / sizeof(xap_route_t), data, length);
}

View file

@ -18,7 +18,9 @@
#include <xap.h>
#include <info_json_gz.h>
void xap_respond_failure(xap_token_t token, xap_response_flags_t response_flags) { xap_send(token, response_flags, NULL, 0); }
void xap_respond_failure(xap_token_t token, xap_response_flags_t response_flags) {
xap_send(token, response_flags, NULL, 0);
}
bool xap_respond_data(xap_token_t token, const void *data, size_t length) {
xap_send(token, XAP_RESPONSE_FLAG_SUCCESS, data, length);
@ -36,4 +38,6 @@ bool xap_respond_u32(xap_token_t token, uint32_t value) {
return true;
}
uint32_t xap_route_qmk_ffffffffffffffff_getter(void) { return 0x12345678; }
uint32_t xap_route_qmk_ffffffffffffffff_getter(void) {
return 0x12345678;
}