From ebb9e43fde10475ccc2fa2132c2a6e2a88a9efa6 Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Wed, 3 Aug 2022 23:34:39 +0100 Subject: [PATCH] Move some trailing comments on long lines. --- firmware/common/w25q80bv_target.c | 19 +++++++++++++------ host/hackrf-tools/src/hackrf_cpldjtag.c | 3 ++- host/hackrf-tools/src/hackrf_transfer.c | 3 ++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/firmware/common/w25q80bv_target.c b/firmware/common/w25q80bv_target.c index df12d342..3dd3a284 100644 --- a/firmware/common/w25q80bv_target.c +++ b/firmware/common/w25q80bv_target.c @@ -32,12 +32,19 @@ void w25q80bv_target_init(w25q80bv_driver_t* const drv) { (void)drv; /* Init SPIFI GPIO to Normal GPIO */ - scu_pinmux(P3_3, (SCU_SSP_IO | SCU_CONF_FUNCTION2)); // P3_3 SPIFI_SCK => SSP0_SCK - scu_pinmux(P3_4, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_4 SPIFI SPIFI_SIO3 IO3 => GPIO1[14] - scu_pinmux(P3_5, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_5 SPIFI SPIFI_SIO2 IO2 => GPIO1[15] - scu_pinmux(P3_6, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_6 SPIFI SPIFI_CIPO IO1 => GPIO0[6] - scu_pinmux(P3_7, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); // P3_7 SPIFI SPIFI_COPI IO0 => GPIO5[10] - scu_pinmux(P3_8, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); // P3_8 SPIFI SPIFI_CS => GPIO5[11] + + // P3_3 SPIFI_SCK => SSP0_SCK + scu_pinmux(P3_3, (SCU_SSP_IO | SCU_CONF_FUNCTION2)); + // P3_4 SPIFI SPIFI_SIO3 IO3 => GPIO1[14] + scu_pinmux(P3_4, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); + // P3_5 SPIFI SPIFI_SIO2 IO2 => GPIO1[15] + scu_pinmux(P3_5, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); + // P3_6 SPIFI SPIFI_CIPO IO1 => GPIO0[6] + scu_pinmux(P3_6, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); + // P3_7 SPIFI SPIFI_COPI IO0 => GPIO5[10] + scu_pinmux(P3_7, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); + // P3_8 SPIFI SPIFI_CS => GPIO5[11] + scu_pinmux(P3_8, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); /* configure SSP pins */ scu_pinmux(SCU_SSP0_CIPO, (SCU_SSP_IO | SCU_CONF_FUNCTION5)); diff --git a/host/hackrf-tools/src/hackrf_cpldjtag.c b/host/hackrf-tools/src/hackrf_cpldjtag.c index 1ddca19e..1735f93e 100644 --- a/host/hackrf-tools/src/hackrf_cpldjtag.c +++ b/host/hackrf-tools/src/hackrf_cpldjtag.c @@ -135,7 +135,8 @@ int main(int argc, char** argv) return EXIT_FAILURE; } /* Get size of the file */ - fseek(infile, 0, SEEK_END); /* Not really portable but work on major OS Linux/Win32 */ + /* Not really portable but work on major OS Linux/Win32 */ + fseek(infile, 0, SEEK_END); length = ftell(infile); /* Move to start */ rewind(infile); diff --git a/host/hackrf-tools/src/hackrf_transfer.c b/host/hackrf-tools/src/hackrf_transfer.c index 33a87d74..6c65894e 100644 --- a/host/hackrf-tools/src/hackrf_transfer.c +++ b/host/hackrf-tools/src/hackrf_transfer.c @@ -1150,7 +1150,8 @@ int main(int argc, char** argv) { // This is only an approximate measure, to assist getting receive levels right: double full_scale_ratio = ((double)stream_amplitude_now / (byte_count_now ? byte_count_now : 1))/128; double dB_full_scale_ratio = 10*log10(full_scale_ratio); - if (dB_full_scale_ratio > 1) // Guard against ridiculous reports + // Guard against ridiculous reports + if (dB_full_scale_ratio > 1) dB_full_scale_ratio = -0.0; fprintf(stderr, "%4.1f MiB / %5.3f sec = %4.1f MiB/second, amplitude %3.1f dBfs", (byte_count_now / 1e6f),