From a0b768211af354188b833e29ccf5ae18f2bbfb31 Mon Sep 17 00:00:00 2001 From: Jacob Alexander Date: Fri, 18 Sep 2015 00:09:17 -0700 Subject: [PATCH] Adding cabilities index to kll compiler - Including remote reload example configuration --- backends/kiibohd.py | 3 +++ layouts/remote_reload.kll | 12 ++++++++++++ templates/kiibohdDefs.h | 7 +++++++ 3 files changed, 22 insertions(+) create mode 100644 layouts/remote_reload.kll diff --git a/backends/kiibohd.py b/backends/kiibohd.py index 4eb427f..70fd58c 100644 --- a/backends/kiibohd.py +++ b/backends/kiibohd.py @@ -131,6 +131,7 @@ class Backend( BackendBase ): ## Capabilities ## self.fill_dict['CapabilitiesFuncDecl'] = "" self.fill_dict['CapabilitiesList'] = "const Capability CapabilitiesList[] = {\n" + self.fill_dict['CapabilitiesIndices'] = "typedef enum CapabilityIndex {\n" # Keys are pre-sorted for key in capabilities.keys(): @@ -138,8 +139,10 @@ class Backend( BackendBase ): argByteWidth = capabilities.totalArgBytes( key ) self.fill_dict['CapabilitiesList'] += "\t{{ {0}, {1} }},\n".format( funcName, argByteWidth ) self.fill_dict['CapabilitiesFuncDecl'] += "void {0}( uint8_t state, uint8_t stateType, uint8_t *args );\n".format( funcName ) + self.fill_dict['CapabilitiesIndices'] += "\t{0}_index,\n".format( funcName ) self.fill_dict['CapabilitiesList'] += "};" + self.fill_dict['CapabilitiesIndices'] += "} CapabilityIndex;" ## Results Macros ## diff --git a/layouts/remote_reload.kll b/layouts/remote_reload.kll new file mode 100644 index 0000000..9ae9178 --- /dev/null +++ b/layouts/remote_reload.kll @@ -0,0 +1,12 @@ +Name = RemoteReload; +Version = 0.1; +Author = "HaaTa (Jacob Alexander) 2015"; +KLL = 0.3c; + +# Modified Date +Date = 2015-09-01; + + +# Bootloader Remote Reload Enable +flashModeEnabled = 1; + diff --git a/templates/kiibohdDefs.h b/templates/kiibohdDefs.h index 93531b0..259de78 100644 --- a/templates/kiibohdDefs.h +++ b/templates/kiibohdDefs.h @@ -19,6 +19,13 @@ #pragma once +// ----- Enums ----- + +// Capability Indices +<|CapabilitiesIndices|> + + + // ----- KLL Variables ----- <|VariableInformation|> -- 2.39.2