Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
MicroPython
UART
micropython导入uart出现大的问题
发布于 2021-11-15 23:35:58 浏览:1121
订阅该版
``` packages\micropython-v1.12.0\port\modules\machine\machine_uart.c: In function 'machine_uart_print': packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:52:30: error: dereferencing pointer to incomplete type 'struct rt_serial_device' self->uart_device->parent.parent.name, ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c: In function 'machine_uart_init_helper': packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:119:12: error: variable 'config' has initializer but incomplete type struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:119:38: error: 'RT_SERIAL_CONFIG_DEFAULT' undeclared (first use in this function) struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:119:38: note: each undeclared identifier is reported only once for each function it appears in packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:119:29: error: storage size of 'config' isn't known struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:127:25: error: 'PARITY_NONE' undeclared (first use in this function) config.parity = PARITY_NONE; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:130:40: error: 'PARITY_ODD' undeclared (first use in this function) config.parity = (parity & 1) ? PARITY_ODD : PARITY_EVEN; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:130:53: error: 'PARITY_EVEN' undeclared (first use in this function) config.parity = (parity & 1) ? PARITY_ODD : PARITY_EVEN; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:136:28: error: 'DATA_BITS_8' undeclared (first use in this function) config.data_bits = DATA_BITS_8; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:138:28: error: 'DATA_BITS_9' undeclared (first use in this function) config.data_bits = DATA_BITS_9; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:140:28: error: 'DATA_BITS_7' undeclared (first use in this function) config.data_bits = DATA_BITS_7; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:147:36: error: 'STOP_BITS_1' undeclared (first use in this function) case 1: config.stop_bits = STOP_BITS_1; break; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:148:37: error: 'STOP_BITS_2' undeclared (first use in this function) default: config.stop_bits = STOP_BITS_2; break; ^ packages\micropython-v1.12.0\port\modules\machine\machine_uart.c: In function 'machine_uart_ioctl': packages\micropython-v1.12.0\port\modules\machine\machine_uart.c:247:12: warning: return makes integer from pointer without a cast [-Wint-conversion] return NULL; ^ CC build\packages\micropython-v1.12.0\port\modules\modfile.o scons: *** [build\packages\micropython-v1.12.0\port\modules\machine\machine_uart.o] Error 1 scons: building terminated because of errors. ``` 请问谁知道如何解决??
查看更多
RTT_逍遥
认证专家
2021-11-16
https://github.com/supperthomas
@jevian 请用最新的latest版本
2
个回答
默认排序
按发布时间排序
出出啊
2021-11-16
恃人不如自恃,人之为己者不如己之自为也
1. 启用串口设备 2. 选择串口端口 3. 添加串口引脚复用配置代码 ![image.png](https://oss-club.rt-thread.org/uploads/20211116/02ca40393d12849f3c0865c1863e08b3.png) ![image.png](https://oss-club.rt-thread.org/uploads/20211116/89628092e6b18e8a56e44896913c91f9.png)
撰写答案
登录
注册新账号
关注者
0
被浏览
1.1k
关于作者
jevian
这家伙很懒,什么也没写!
提问
8
回答
2
被采纳
0
关注TA
发私信
相关问题
1
rt thread 2.0.2 usart 接收缓存问题
2
关于STM32串口通信的问题
3
STM32F1+RTT串口接收终端数据丢失问题
4
UART TX丢数据?
5
RTT打开串口的时候如何自定义波特率呢?
6
STM32F4的USART数据接收问题
7
串口1234使用问题
8
串口接收回调函数
9
LPC18xx UART问题讨论
10
x1000串口配置的失败问题
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
机器人操作系统 (ROS2) 和 RT-Thread 通信
4
国产MCU移植系列教程汇总,欢迎查看!
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
基于FRDM-MCXN94的TFT模块评测
2
FRDM-MCXN947 Flash实践----使用RTT fal组件
3
RTT下的I2C框架
4
【学习分享】libc的版本探测
5
恩智浦mcxn947的RT-Thread的PIN驱动测评
热门标签
RT-Thread Studio
串口
LWIP
SPI
Env
Bootloader
AT
ART-Pi
Hardfault
CAN总线
FinSH
USB
文件系统
DMA
RT-Thread
SCons
线程
RT-Thread Nano
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
ota在线升级
WIZnet_W5500
I2C_IIC
UART
flash
cubemx
packages_软件包
freemodbus
PWM
潘多拉开发板_Pandora
定时器
ADC
BSP
中断
编译报错
socket
keil_MDK
MicroPython
GD32
msh
Debug
ulog
SDIO总线
SFUD
rt_mq_消息队列_msg_queue
C++_cpp
本月问答贡献
用户名由3_15位
17
个答案
3
次被采纳
xiaorui
7
个答案
3
次被采纳
sakumisu
4
个答案
3
次被采纳
三世执戟
31
个答案
1
次被采纳
梦笑真美
20
个答案
1
次被采纳
本月文章贡献
比特饼干
2
篇文章
6
次点赞
Z_Y
2
篇文章
5
次点赞
xusiwei1236
2
篇文章
3
次点赞
yinxiangxv
2
篇文章
3
次点赞
Alipay
2
篇文章
3
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部