查看: 31|回复: 0

关于OpenHarmony 中 HDF Uart的操作问题

[复制链接]

1

主题

0

回帖

205

积分

中级会员

Rank: 3Rank: 3

积分
205
发表于 前天 17:26 | 显示全部楼层 |阅读模式
(为了高效,请按如下格式提问)

硬件主板型号:YY3568
固件名称/系统版本: OpenHarmony 4.1
自编的或固件下载地址:
Log日志:
01-01 08:06:34.367  1203  1203 E C02500/hdf_syscall_adapter: <private>: load dev_mgr driver failed
01-01 08:06:34.367  1203  1203 E C02500/hdf_devmgr_adapter: HdfLoadDriverByServiceName failed to get <private> service
01-01 08:06:34.367  1203  1203 E C02500/hdf_syscall_adapter: <private>: load HDF_PLATFORM_UART_3 driver failed
01-01 08:06:34.367  1203  1203 E C02510/uart_if_u_c: UartOpen: get handle error!



问题描述及复现步骤:

  实现一个读串口的程序,引入libhdf_platform.z.so 以及 uart_if.h
调用接口
/**
* @brief Obtains the UART device handle.
*
* Before accessing the UART device, you must call this function to obtain the UART device handle.
*
* @param port Indicates the UART port.
*
* @return Returns the pointer to the UART device handle if the handle is obtained; returns <b>NULL</b> otherwise.
* @since 1.0
*/
DevHandle UartOpen(uint32_t port);



传参 uartOpen(3, 9600)  ,但hdf报错如上Log

此程序基于其他的rk3568的开发版OpenHarmony 4.0 系统是OK的,此移植到yy3568的4.1系统,且更新了libhdf_platform.z.so,
我的问题
1. 是否我串口连接有误,我当前连接到ttyS3这个物理口,如图
image.png
不知道1~4的顺序是如图方向的从左到右吗?还是从右到左
2. 其中开发板子文档的标记的TX/RX是不是需要和我设备的标准的TX/RX交叉对应? 还是一一对应?
3. 鸿蒙的hdf驱动是否需要修改,才能调用Uart_if的接口?



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|风火轮WIKI|手机版|小黑屋|深圳风火轮团队 ( 粤ICP备17095099号 )

GMT+8, 2025-7-6 06:12 , Processed in 0.061485 second(s), 26 queries .

快速回复 返回顶部 返回列表
 
【客服1】 商务合作 15289193
【客服2】 业务洽谈 13257599
【客服3】 售前咨询 510313198
【邮箱】
smartfire@smartfire.cn