CLI: Parse USB device version BCD (#14580)
* CLI: Parse USB device version BCD * Apply suggestions
This commit is contained in:
parent
557fbbd6af
commit
c72ed7c024
42 changed files with 88 additions and 52 deletions
|
@ -108,6 +108,12 @@ def generate_config_items(kb_info_json, config_h_lines):
|
|||
config_h_lines.append(f'#ifndef {key}')
|
||||
config_h_lines.append(f'# define {key} {value}')
|
||||
config_h_lines.append(f'#endif // {key}')
|
||||
elif key_type == 'bcd_version':
|
||||
(major, minor, revision) = config_value.split('.')
|
||||
config_h_lines.append('')
|
||||
config_h_lines.append(f'#ifndef {config_key}')
|
||||
config_h_lines.append(f'# define {config_key} 0x{major.zfill(2)}{minor}{revision}')
|
||||
config_h_lines.append(f'#endif // {config_key}')
|
||||
else:
|
||||
config_h_lines.append('')
|
||||
config_h_lines.append(f'#ifndef {config_key}')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue