Disable default line-buffering of stdout

As discussed in #52. Application can re-enable buffering on stdout with setbuf() or setbuf()
This commit is contained in:
Angus Gratton 2015-10-11 09:21:30 +11:00
parent a095a87409
commit f3ca012b47

View file

@ -431,6 +431,8 @@ static void user_start_phase2(void) {
phy_info = malloc(PHY_INFO_SIZE);
sdk_spi_flash_read(sdk_flashchip.chip_size - sdk_flashchip.sector_size * 4, (uint32_t *)phy_info, PHY_INFO_SIZE);
// Disable default buffering on stdout
setbuf(stdout, NULL);
// Wait for UARTs to finish sending anything in their queues.
uart_flush_txfifo(0);
uart_flush_txfifo(1);