Thread 中讨论的其他器件:EK-TM4C1294XL
您好!
我正在使用 TM4C129XNZAD、我想使用带有串行终端的 UART 代码打印一个整数数据或一些数据包。 您能告诉我打印数据的功能是什么吗? 请与我分享"来"相关代码。 请任何人在这方面帮助我。
谢谢。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
我正在使用 TM4C129XNZAD、我想使用带有串行终端的 UART 代码打印一个整数数据或一些数据包。 您能告诉我打印数据的功能是什么吗? 请与我分享"来"相关代码。 请任何人在这方面帮助我。
谢谢。
您好!
要使用的 API 是 UARTCharPut。 请参见下面的。 您可以在 TivaWare 库中参考一些示例。 请参阅以下路径。
C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\uart_echo
C:\ti\TivaWare_C_Series-2.2.0.295\examples\peripherals\UART\UART_loopback.c
C:\ti\TivaWare_C_Series-2.2.0.295\examples\peripherals\UART\UART_polled.c
您还可以使用 UARTprintf、这是一种类似于 printf 的实用程序函数、可以使用 UART 格式化并打印到终端窗口。 查看简单的 hello 示例并了解其实现方式。 事实上、许多 TivaWare 示例都使用 UARTprintf 函数打印到终端窗口。
C:\ti\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\hello