void printByteToInt(char a) { char c = a % 10 + '0'; a /= 10; char d = a % 10 + '0'; a /= 10; char e = a % 10 + '0'; UART001_WriteData(UART001_Handle0, e); UART001_WriteData(UART001_Handle0, d); UART001_WriteData(UART001_Handle0, c); }
/** * @brief This function will transmit the input data to PC Hyperterminal * * @param[in]: p start address of character buffer * @return void * */ void uart_printf(const char *p) { while(*p){ while( 0 != ((UART001_Handle0.UartRegs->TRBSR) & (USIC_CH_TRBSR_TFULL_Msk))); UART001_WriteData(UART001_Handle0,*p); p++; } }