OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 7261|回复: 8

如何用NRF24L01发送图片?

[复制链接]

9

主题

43

帖子

0

精华

初级会员

Rank: 2

积分
131
金钱
131
注册时间
2012-7-26
在线时间
14 小时
发表于 2012-8-3 17:39:36 | 显示全部楼层 |阅读模式
如何用NRF24L01发送图片?看例程里用的是一个一维数组,一个一个发送。图片的话我改为二维数组,但是函数不对。是不是要改函数库呢?keil提示的错误<br />
main.c(142): error: &nbsp;#167: argument of type "u8 (*)[16]" is incompatible with parameter of type "u8 *"<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(NRF24L01_RxPacket(tmp_buf)==0)//一旦接收到信息,则显示出来.</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^</div>
<div>main.c(144): warning: &nbsp;#175-D: subscript out of range</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmp_buf[16][16]=0;//加入字符串结束符</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^</div>
<div>main.c(145): error: &nbsp;#167: argument of type "u8 (*)[16]" is incompatible with parameter of type "const u8 *"</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LCD_ShowString(0,190,tmp_buf);&nbsp;</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^</div>
<div>main.c(162): error: &nbsp;#167: argument of type "u8 (*)[16]" is incompatible with parameter of type "u8 *"</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(NRF24L01_TxPacket(tmp_buf)==TX_OK)</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^</div>
<div>main.c(165): error: &nbsp;#167: argument of type "u8 (*)[16]" is incompatible with parameter of type "const u8 *"</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LCD_ShowString(0,190,tmp_buf);&nbsp;</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^</div>
<div>main.c(188): error: &nbsp;#29: expected an expression</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{ &nbsp;tmp_buf[x][y]={Pen_Point.X0,Pen_Point.Y0};</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^</div>
<div>main.c(195): warning: &nbsp;#175-D: subscript out of range</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tmp_buf[16][16]=0;//加入字符串结束符 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div>
<div>main.c: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;^</div>
<div>main.c: main.c: 2 warnings, 5 errors</div>
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165186
金钱
165186
注册时间
2010-12-1
在线时间
2106 小时
发表于 2012-8-3 17:46:45 | 显示全部楼层
数据类型不匹配.
<br>加强制转换吧.
<br>另外,为何要二维数组?
我是开源电子网www.openedv.com站长,有关站务问题请与我联系。
正点原子STM32开发板购买店铺http://openedv.taobao.com
正点原子官方微信公众平台,点击这里关注“正点原子”
回复 支持 反对

使用道具 举报

33

主题

489

帖子

6

精华

金牌会员

Rank: 6Rank: 6

积分
1565
金钱
1565
注册时间
2011-12-10
在线时间
4 小时
发表于 2012-8-3 18:11:27 | 显示全部楼层
回复【楼主位】翱翔蓝天535421:
<br>---------------------------------
<br>用24L01传图片我之前做过了,可以交流一下.
学习交流请加Q群:242876057(STM32F4交流群)
回复 支持 反对

使用道具 举报

9

主题

43

帖子

0

精华

初级会员

Rank: 2

积分
131
金钱
131
注册时间
2012-7-26
在线时间
14 小时
 楼主| 发表于 2012-8-3 18:28:35 | 显示全部楼层
回复【3楼】骤雨龙元:
<br>---------------------------------
<br>谢谢,请多多指教。加我的qq吧&nbsp;&nbsp;&nbsp;419814201&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
回复 支持 反对

使用道具 举报

33

主题

489

帖子

6

精华

金牌会员

Rank: 6Rank: 6

积分
1565
金钱
1565
注册时间
2011-12-10
在线时间
4 小时
发表于 2012-8-3 18:32:53 | 显示全部楼层
额...你加我的群吧.
学习交流请加Q群:242876057(STM32F4交流群)
回复 支持 反对

使用道具 举报

9

主题

43

帖子

0

精华

初级会员

Rank: 2

积分
131
金钱
131
注册时间
2012-7-26
在线时间
14 小时
 楼主| 发表于 2012-8-3 19:28:20 | 显示全部楼层
回复【5楼】骤雨龙元:
<br>---------------------------------
<br>那你说说你的群号吧,我都不知道呢
回复 支持 反对

使用道具 举报

33

主题

489

帖子

6

精华

金牌会员

Rank: 6Rank: 6

积分
1565
金钱
1565
注册时间
2011-12-10
在线时间
4 小时
发表于 2012-8-3 20:56:44 | 显示全部楼层
回复【6楼】翱翔蓝天535421:
<br>---------------------------------
<br>群号:242876057
学习交流请加Q群:242876057(STM32F4交流群)
回复 支持 反对

使用道具 举报

16

主题

54

帖子

0

精华

初级会员

Rank: 2

积分
138
金钱
138
注册时间
2012-7-8
在线时间
0 小时
发表于 2012-8-5 21:06:38 | 显示全部楼层
回复【7楼】骤雨龙元:
<br>-----------------------------
<br>请问发送的是BMP还是JPG格式的?
回复 支持 反对

使用道具 举报

32

主题

153

帖子

1

精华

中级会员

Rank: 3Rank: 3

积分
453
金钱
453
注册时间
2014-11-5
在线时间
0 小时
发表于 2014-12-20 20:16:32 | 显示全部楼层
回复【3楼】骤雨龙元:
<br>---------------------------------
<br>大虾-能分享下不。我搞了好久都不行
酱油团队--
回复 支持 反对

使用道具 举报

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

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2024-10-1 12:19

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表