Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
MicroPython
UART
micropython导入uart出现大的问题
发布于 2021-11-15 23:35:58 浏览:1410
订阅该版
``` 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. 添加串口引脚复用配置代码  
撰写答案
登录
注册新账号
关注者
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-Thread 屏蔽在线软件包的方法
2
RT-Thread OS应用开发实战线上师资培训通知
3
【ci】【github】【bsp】RT-Thread仓库的CI自动编译测试
4
免费解锁MCU超能力!4月AIoT实战培训三城巡演
5
rt-thread主仓 BSP瘦身指南
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
I2C_IIC
cubemx
ESP8266
WIZnet_W5500
UART
ota在线升级
PWM
BSP
flash
freemodbus
packages_软件包
潘多拉开发板_Pandora
GD32
定时器
ADC
flashDB
编译报错
socket
中断
rt_mq_消息队列_msg_queue
keil_MDK
Debug
SFUD
msh
ulog
C++_cpp
at_device
本月问答贡献
RTT_逍遥
4
个答案
2
次被采纳
聚散无由
3
个答案
2
次被采纳
踩姑娘的小蘑菇
5
个答案
1
次被采纳
a1012112796
4
个答案
1
次被采纳
winfeng
2
个答案
1
次被采纳
本月文章贡献
出出啊
1
篇文章
2
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
5
次点赞
crystal266
2
篇文章
1
次点赞
whj467467222
2
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部