Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
MicroPython
UART
micropython导入uart出现大的问题
发布于 2021-11-15 23:35:58 浏览:1354
订阅该版
``` 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.4k
关于作者
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
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
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
rt-smart启动流程分析
2
EtherKit快速上手PROFINET
3
RTThread USB转串口无法接收数据
4
HC32F4A0 SD卡挂载及热插拔的实现
5
vscode插件 - RT-Thread Studio项目助手 | 跨平台开发
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
UART
WIZnet_W5500
ota在线升级
cubemx
PWM
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
编译报错
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
MicroPython
C++_cpp
本月问答贡献
出出啊
1517
个答案
342
次被采纳
小小李sunny
1444
个答案
290
次被采纳
张世争
812
个答案
177
次被采纳
crystal266
547
个答案
161
次被采纳
whj467467222
1222
个答案
149
次被采纳
本月文章贡献
出出啊
1
篇文章
2
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
1
次点赞
crystal266
2
篇文章
2
次点赞
whj467467222
2
篇文章
2
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部