Printf

From ElectroDragon
Jump to navigation Jump to search
  • printf("%#08x\n", i); // gives 0x000007
  • printf("addr:0x%x, data:0x%x\r\n", addr, flash_data); // ... 0xFF

Purchar STM32

PUTCHAR_PROTOTYPE
{
 /* Place your implementation of fputc here */
 /* e.g. write a character to the EVAL_COM1 and Loop until the end of transmission */
 HAL_UART_Transmit(&huart1, (uint8_t *)&ch, 1, 0xFFFF);

 return ch;
}