From 847b6bcc3370e89894ca6236caeec434752a76de Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 13 Aug 2019 17:51:11 +0200 Subject: [PATCH] remove tabs --- Makefile | 11 ++++++++--- doc/cheatsheet.md | 2 +- fpga/fpga_lf.v | 14 +++++++------- fpga/lo_adc.v | 20 ++++++++++---------- include/pm3_cmd.h | 2 +- 5 files changed, 27 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 58c61281f..9be67311b 100644 --- a/Makefile +++ b/Makefile @@ -164,11 +164,16 @@ style: # Detecting weird codepages and tabs. checks: - find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "Makefile" -or -name "*.v" \) \ + @echo "Files with suspicious chars:" + @find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "Makefile" -or -name "*.v" \) \ -exec sh -c "cat {} |recode utf8.. >/dev/null || echo {}" \; - find . \( -name "*.[ch]" -or \( -name "*.cpp" -and -not -name "*.moc.cpp" \) -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "*.md" -or -name "*.txt" -or -name "*.awk" -or -name "*.v" \) \ - -exec grep -lP '\t' {} \; + @echo "Files with tabs:" # to remove tabs within lines, one can try with: vi $file -c ':set tabstop=4' -c ':set et|retab' -c ':wq' + @find . \( -name "*.[ch]" -or \( -name "*.cpp" -and -not -name "*.moc.cpp" \) -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "*.md" -or -name "*.txt" -or -name "*.awk" -or -name "*.v" \) \ + -exec grep -lP '\t' {} \; +# @echo "Files with printf \\\\t:" +# @find . \( -name "*.[ch]" -or \( -name "*.cpp" -and -not -name "*.moc.cpp" \) -or -name "*.lua" -or -name "*.py" -or -name "*.pl" -or -name "*.md" -or -name "*.txt" -or -name "*.awk" -or -name "*.v" \) \ +# -exec grep -lP '\\t' {} \; # Dummy target to test for GNU make availability _test: diff --git a/doc/cheatsheet.md b/doc/cheatsheet.md index 3fcaf9876..ecef56d9d 100644 --- a/doc/cheatsheet.md +++ b/doc/cheatsheet.md @@ -448,7 +448,7 @@ Convert .bin to .eml ``` Options --- -i : Specifies the dump-file (input). If omitted, 'dumpdata.bin' is used +i : Specifies the dump-file (input). If omitted, 'dumpdata.bin' is used script run dumptoemul -i xxxxxxxxxxxxxx.bin ``` diff --git a/fpga/fpga_lf.v b/fpga/fpga_lf.v index 20d2ca440..88b22b7ca 100644 --- a/fpga/fpga_lf.v +++ b/fpga/fpga_lf.v @@ -102,13 +102,13 @@ lo_edge_detect le( ); lo_adc la( - pck0, - la_pwr_lo, la_pwr_hi, la_pwr_oe1, la_pwr_oe2, la_pwr_oe3, la_pwr_oe4, - adc_d, la_adc_clk, - la_ssp_frame, la_ssp_din, ssp_dout, la_ssp_clk, - cross_hi, cross_lo, - la_dbg, divisor, - lo_is_125khz, lf_field + pck0, + la_pwr_lo, la_pwr_hi, la_pwr_oe1, la_pwr_oe2, la_pwr_oe3, la_pwr_oe4, + adc_d, la_adc_clk, + la_ssp_frame, la_ssp_din, ssp_dout, la_ssp_clk, + cross_hi, cross_lo, + la_dbg, divisor, + lo_is_125khz, lf_field ); // Major modes: diff --git a/fpga/lo_adc.v b/fpga/lo_adc.v index dff9fda3f..57e9eebc8 100644 --- a/fpga/lo_adc.v +++ b/fpga/lo_adc.v @@ -55,28 +55,28 @@ assign ssp_frame = (pck_divider[7:3] == 5'd1) && !clk_state; always @(posedge pck0) begin - if(pck_divider == divisor[7:0]) + if(pck_divider == divisor[7:0]) begin - pck_divider <= 8'd0; - clk_state = !clk_state; + pck_divider <= 8'd0; + clk_state = !clk_state; end - else - begin - pck_divider <= pck_divider + 1; - end + else + begin + pck_divider <= pck_divider + 1; + end end always @(posedge pck0) begin - if((pck_divider == 8'd7) && !clk_state) + if((pck_divider == 8'd7) && !clk_state) begin to_arm_shiftreg <= adc_d; end else - begin + begin to_arm_shiftreg[7:1] <= to_arm_shiftreg[6:0]; to_arm_shiftreg[0] <= 1'b0; - end + end end endmodule diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index 742f45f6e..035e85405 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -299,7 +299,7 @@ typedef struct { #define CMD_SPIFFS_PRINT_FSINFO 0x2133 #define CMD_SPIFFS_DOWNLOAD 0x2134 #define CMD_SPIFFS_DOWNLOADED 0x2135 -#define CMD_SPIFFS_CHECK 0x3000 +#define CMD_SPIFFS_CHECK 0x3000 // more ?