mithro / HDMI2USB-litex-firmware-old

Opsis SoC based on LiteX
BSD 2-Clause "Simplified" License
1 stars 6 forks source link

Reuse the PRINTF thingy that Joel added #9

Closed mithro closed 7 years ago

mithro commented 7 years ago

3d19e65e8df7deb44b0b31b100730a61acf9d363

 #ifdef CSR_HDMI_IN0_FREQ_BASE
-   wprintf(" (@ %d kHz)", hdmi_in0_freq_value_read() / 1000);
+   wprintf(" (@ %3d.%2d MHz)", hdmi_in0_freq_value_read() / 1000000,
+                               (hdmi_in0_freq_value_read() / 10000) % 100);
 #endif
    wprintf("\r\n");
 #endif
mithro commented 7 years ago

@joeladdison