예제 #1
0
void usart1_transmit_string_format(const char * szFormat, ... )
{
	va_list varpars;
	int nLen;

	va_start(varpars, szFormat);
	nLen = vsprintf( (char*)usart_format_buff, szFormat, varpars);
	va_end(varpars);

	usart_format_buff[nLen] = 0x00;

	usart_transmit_string(USART1, usart_format_buff);	
}
void usart_transmit_int_as_string(int i)
{
    char num_string[6];
    sprintf(num_string,"%d",i);
    usart_transmit_string(num_string);
}
예제 #3
0
void usart1_transmit_string(const void *data)
{
	usart_transmit_string(USART1, data);
}