28 lines
580 B
C
28 lines
580 B
C
![]() |
/*
|
|||
|
* Ʒ<EFBFBD>ǿƼ<EFBFBD>
|
|||
|
* S32Kϵ<EFBFBD><EFBFBD>Printf<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
#include"cpu.h"
|
|||
|
#include"uart.h"
|
|||
|
|
|||
|
#include <stdio.h>
|
|||
|
#include <string.h>
|
|||
|
#include "stdarg.h"
|
|||
|
#include <stdint.h>
|
|||
|
#include <stdbool.h>
|
|||
|
|
|||
|
char USART1_TX_BUF[200];
|
|||
|
|
|||
|
void u1_printf(char* fmt,...)
|
|||
|
{
|
|||
|
uint32_t bytesRemaining;
|
|||
|
va_list ap;
|
|||
|
va_start(ap,fmt);
|
|||
|
vsprintf((char*)USART1_TX_BUF,fmt,ap);
|
|||
|
va_end(ap);
|
|||
|
LPUART_DRV_SendData(INST_LPUART1, (uint8_t *)USART1_TX_BUF, strlen(USART1_TX_BUF)); //<2F><><EFBFBD><EFBFBD>
|
|||
|
while (LPUART_DRV_GetTransmitStatus(INST_LPUART1, &bytesRemaining)
|
|||
|
!= STATUS_SUCCESS) {}
|
|||
|
}
|
|||
|
|