add build instructions

This commit is contained in:
Crispy 2024-04-12 19:42:15 +02:00
parent 1c2cd2ff40
commit dc26664372
2 changed files with 11 additions and 2 deletions

View file

@ -63,7 +63,7 @@ fn main() {
);
let mut export_string = String::from("// Generated by the `encoder` rust app\n");
export_string += "typedef enum {\n";
export_string += "typedef enum Encoding {\n";
for (encoding, count) in stats {
if count > 0 {
export_string += &format!("\tEncoding_{encoding:?} = {},\n", encoding as u8);
@ -81,7 +81,7 @@ fn main() {
export_string += &format!("{byte},");
}
export_string += "\n};\n";
let mut file = File::create("../data.h").unwrap();
let mut file = File::create("../ch32_decoder/data.h").unwrap();
file.write_all(export_string.as_bytes()).unwrap();
}