USB SDK files explanation

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

USB SDK files explanation

跳至解决方案
1,830 次查看
patriciocohen
Contributor IV

Hi guys,

I will appreciate if someone can explain me the purpose of the following files:

1) serial_port_uart.c

2) serial_manager.c

3) lpuart_adapter.c

I would like to know how they work, but code comments are almost non existent.

Where do I define that the UART has to be connected to the USB PHY, to create an USB COM port?

Thank you,

Patricio

标签 (1)
1 解答
1,614 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi   Patricio

serial_port_uart.c defined LPUART APIs with user-defined settings, such as baudrate, parity mode....  please see functions Serial_UartInit/Read/write/...

These Serial_Uartxxx functions will call HAL_Uartxxxx, they are defined in LPUART_adapter.c

I would suggest refer to the uart demo for how to use lpuart driver .

SDK_2.6.0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\lpuart

Please also read SDK API reference Manual: chapter 24 LPUART.

Regards

Daniel

在原帖中查看解决方案

4 回复数
1,614 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi

The purpose of the serial manger is to mask the differences in multiple hardware modules.

The architecture of the serial manger is shown below:

pastedImage_1.png

For your case, serial_manage.c is in a high level.

Regards

Daniel

1,614 次查看
patriciocohen
Contributor IV

Hi Daniel,

Thanks for your reply.

And what about the other 2 files ( serial_port_uart.c and lpuart_adapter.c) ?

Thank you!

0 项奖励
回复
1,615 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi   Patricio

serial_port_uart.c defined LPUART APIs with user-defined settings, such as baudrate, parity mode....  please see functions Serial_UartInit/Read/write/...

These Serial_Uartxxx functions will call HAL_Uartxxxx, they are defined in LPUART_adapter.c

I would suggest refer to the uart demo for how to use lpuart driver .

SDK_2.6.0_EVK-MIMXRT1020\boards\evkmimxrt1020\driver_examples\lpuart

Please also read SDK API reference Manual: chapter 24 LPUART.

Regards

Daniel

1,614 次查看
patriciocohen
Contributor IV

Thank you Daniel

0 项奖励
回复