完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
//读取数据,保存在DF_buffer[]数组中
void M25P80_buf_ToRam(unsigned char buffer,unsigned int start_address,unsigned int length) { unsigned int i; FlashWaitBusy(); //Flash忙检测 Select_Flash();//CS置"0" SPI_Flash_SendByte(0X03);// 读数据 SPI_Flash_SendByte((start_address & 0xFF0000) >> 16); SPI_Flash_SendByte((start_address & 0xFF00) >> 8); SPI_Flash_SendByte(start_address & 0xFF); for (i=0;i AT45_buffer = SPI_Flash_ReadByte(); } NotSelect_Flash();//CS置"1" } //将DF_buffer[]数组中指定长度的数据写入 void M25P16_RamTo_buf(unsigned char buffer,unsigned int start_address,unsigned int length) { unsigned int i; FlashPageEarse(0X01); //擦除指定的页,页范围0-4095 FlashWaitBusy();//Flash忙检测 Select_Flash(); //CS置"0" SPI_Flash_SendByte(0X06); //写使能 NotSelect_Flash(); //CS置"1" FlashWaitBusy();//Flash忙检测 Select_Flash(); //CS置"0" SPI_Flash_SendByte(0X02); //页写 SPI_Flash_SendByte((start_address & 0xFF0000) >> 16); SPI_Flash_SendByte((start_address & 0xFF00) >> 8); SPI_Flash_SendByte(start_address & 0xFF); for (i=0;i NotSelect_Flash(); } 如何理解unsigned char buffer这个参数 |
|
相关推荐
3个回答
|
|
很明显,写代码的人没有用到这个参数.属于多此一举.
|
|
|
|
没有调用那么为什么编译又通过了呢
|
|
|
|
又不是错误,怎么会编译不通过?
|
|
|
|
只有小组成员才能发言,加入小组>>
X-NUCLEO-IHM08M1板文档中输出电流为15Arms,15Arms是怎么得出来的呢?
418 浏览 1 评论
276 浏览 2 评论
STM32F030F4 HSI时钟温度测试过不去是怎么回事?
244 浏览 2 评论
ST25R3916能否对ISO15693的标签芯片进行分区域写密码?
609 浏览 2 评论
632 浏览 2 评论
1360浏览 9评论
36浏览 3评论
STM32CUBEMX4.22.1在main函数里面添加一行语句就死机的原因?
42浏览 3评论
38浏览 3评论
KEIL MDK为什么无法debug library中的代码?
77浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-26 15:42 , Processed in 0.592508 second(s), Total 45, Slave 39 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号