12345678910111213141516171819202122232425262728293031323334 |
- #include "common.h"
- #include "io.h"
- #include "abcio.h"
- #include "sys.h"
- #include "console.h"
- #include "boardinfo_fpga.h"
- void __hot main(void)
- {
- unsigned int max_abc_latency = 0;
- unsigned int abc_latency;
- init();
- while (1) {
- wait_for_irq();
- if (unlikely(do_write_rtc))
- write_rtc();
- if (unlikely(do_update_boardinfo))
- rom_update_boardinfo();
- abcdisk_io_poll();
- abc_latency = ABC_LATENCY;
- if (abc_latency > max_abc_latency) {
- max_abc_latency = abc_latency;
- con_printf("\nWorst ABC-bus latency: %u SDRAM cycles%s\n",
- abc_latency & 255,
- (abc_latency >> 8) ? " UNDERRUN" : "");
- }
- }
- }
|