FatFS的disk_write()传递参数const型是为什么?

[复制链接]
 楼主| aoshi0603 发表于 2011-8-16 11:28 | 显示全部楼层 |阅读模式
const BYTE* Buffer为什么要定义成const 型的啊?

  1. FRESULT f_write (
  2.   FIL* FileObject,     /* Pointer to the file object structure */
  3.   const BYTE* Buffer,  /* Pointer to the data to be written */
  4.   UINT ByteToWrite,    /* Number of bytes to write */
  5.   UINT* ByteWritten    /* Pointer to the variable to return number of bytes written */
  6. );

mohanwei 发表于 2011-8-16 11:47 | 显示全部楼层
防止你乱改外面的源数据

评分

参与人数 1威望 +1 收起 理由
aoshi0603 + 1

查看全部评分

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

本版积分规则

6

主题

113

帖子

3

粉丝
快速回复 在线客服 返回列表 返回顶部