pio: Add 'pragma once' to generated header files (#237)
We can't really use traditional include guards, because the header file may be piped to stdout (which means we might not have a file name).
This commit is contained in:
parent
20b9823aca
commit
090c5cd83b
@ -68,6 +68,8 @@ struct c_sdk_output : public output_format {
|
|||||||
|
|
||||||
header(out, "This file is autogenerated by pioasm; do not edit!");
|
header(out, "This file is autogenerated by pioasm; do not edit!");
|
||||||
|
|
||||||
|
fprintf(out, "#pragma once\n");
|
||||||
|
fprintf(out, "\n");
|
||||||
fprintf(out, "#if !PICO_NO_HARDWARE\n");
|
fprintf(out, "#if !PICO_NO_HARDWARE\n");
|
||||||
fprintf(out, "#include \"hardware/pio.h\"\n");
|
fprintf(out, "#include \"hardware/pio.h\"\n");
|
||||||
fprintf(out, "#endif\n");
|
fprintf(out, "#endif\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user