Move some trailing comments on long lines.

This commit is contained in:
Martin Ling
2022-08-03 23:34:39 +01:00
parent b50aeb4082
commit ebb9e43fde
3 changed files with 17 additions and 8 deletions

View File

@ -32,12 +32,19 @@ void w25q80bv_target_init(w25q80bv_driver_t* const drv) {
(void)drv; (void)drv;
/* Init SPIFI GPIO to Normal GPIO */ /* 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] // P3_3 SPIFI_SCK => SSP0_SCK
scu_pinmux(P3_5, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_5 SPIFI SPIFI_SIO2 IO2 => GPIO1[15] scu_pinmux(P3_3, (SCU_SSP_IO | SCU_CONF_FUNCTION2));
scu_pinmux(P3_6, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0)); // P3_6 SPIFI SPIFI_CIPO IO1 => GPIO0[6] // P3_4 SPIFI SPIFI_SIO3 IO3 => GPIO1[14]
scu_pinmux(P3_7, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); // P3_7 SPIFI SPIFI_COPI IO0 => GPIO5[10] scu_pinmux(P3_4, (SCU_GPIO_FAST | SCU_CONF_FUNCTION0));
scu_pinmux(P3_8, (SCU_GPIO_FAST | SCU_CONF_FUNCTION4)); // P3_8 SPIFI SPIFI_CS => GPIO5[11] // 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 */ /* configure SSP pins */
scu_pinmux(SCU_SSP0_CIPO, (SCU_SSP_IO | SCU_CONF_FUNCTION5)); scu_pinmux(SCU_SSP0_CIPO, (SCU_SSP_IO | SCU_CONF_FUNCTION5));

View File

@ -135,7 +135,8 @@ int main(int argc, char** argv)
return EXIT_FAILURE; return EXIT_FAILURE;
} }
/* Get size of the file */ /* 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); length = ftell(infile);
/* Move to start */ /* Move to start */
rewind(infile); rewind(infile);

View File

@ -1150,7 +1150,8 @@ int main(int argc, char** argv) {
// This is only an approximate measure, to assist getting receive levels right: // 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 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); 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; dB_full_scale_ratio = -0.0;
fprintf(stderr, "%4.1f MiB / %5.3f sec = %4.1f MiB/second, amplitude %3.1f dBfs", fprintf(stderr, "%4.1f MiB / %5.3f sec = %4.1f MiB/second, amplitude %3.1f dBfs",
(byte_count_now / 1e6f), (byte_count_now / 1e6f),