SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
bin2cc.py File Reference

Convert file string to zlib compressed C array. More...

Go to the source code of this file.

Functions

str bin2cc.bin2cc (bytes data, str var_name)
 Generate a C char array from bytes Args: data (bytes): The bytes var_name (str): The C variable name.
 
 bin2cc.main ()
 Main Function.
 

Variables

int bin2cc.LINE_LEN = 8
 

Detailed Description

Convert file string to zlib compressed C array.

Author
LeHuman
Version
0.1
Date
2021-10-31

https://nachtimwald.com/2019/10/09/python-binary-to-c-header/

Definition in file bin2cc.py.

Function Documentation

◆ bin2cc()

str bin2cc.bin2cc ( bytes  data,
str  var_name 
)

Generate a C char array from bytes Args: data (bytes): The bytes var_name (str): The C variable name.

Returns: str: The string of C code

Definition at line 20 of file bin2cc.py.

◆ main()

bin2cc.main ( void  )

Main Function.

Definition at line 61 of file bin2cc.py.

Variable Documentation

◆ LINE_LEN

int bin2cc.LINE_LEN = 8

Definition at line 17 of file bin2cc.py.