Browse Source

Adding cabilities index to kll compiler

- Including remote reload example configuration
master
Jacob Alexander 8 years ago
parent
commit
a0b768211a
3 changed files with 22 additions and 0 deletions
  1. 3
    0
      backends/kiibohd.py
  2. 12
    0
      layouts/remote_reload.kll
  3. 7
    0
      templates/kiibohdDefs.h

+ 3
- 0
backends/kiibohd.py View File

@@ -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 ##

+ 12
- 0
layouts/remote_reload.kll View File

@@ -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;


+ 7
- 0
templates/kiibohdDefs.h View File

@@ -19,6 +19,13 @@

#pragma once

// ----- Enums -----

// Capability Indices
<|CapabilitiesIndices|>



// ----- KLL Variables -----
<|VariableInformation|>