X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=backends%2Fkiibohd.py;h=70fd58c8e7c97dae0a121c36ed6223cf4fc974ca;hb=a0b768211af354188b833e29ccf5ae18f2bbfb31;hp=ae7d97fa5cb6563978931ed3f646b37d8474b15e;hpb=114d666bd873a7044917eea5d5e061ed4e45aafd;p=kiibohd-kll.git diff --git a/backends/kiibohd.py b/backends/kiibohd.py index ae7d97f..70fd58c 100644 --- a/backends/kiibohd.py +++ b/backends/kiibohd.py @@ -129,15 +129,20 @@ 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(): funcName = capabilities.funcName( key ) 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 ##