当前位置:网站首页>Fatfs (X): lire et écrire plusieurs octets (mots)
Fatfs (X): lire et écrire plusieurs octets (mots)
2022-06-09 00:39:00 【Kafen Wong】
/*-----------------------------------------------------------------------*/
/* In FATDans la structure Écris./Lire Mots Multi - octets*/
/*-----------------------------------------------------------------------*/
//Écris(Priorité basse)
static WORD ld_word (const BYTE* ptr)
{
WORD rv;
rv = ptr[1];
rv = rv << 8 | ptr[0];
return rv;
}
//Écris deux mots(Priorité basse)
static DWORD ld_dword (const BYTE* ptr)
{
DWORD rv;
rv = ptr[3];
rv = rv << 8 | ptr[2];
rv = rv << 8 | ptr[1];
rv = rv << 8 | ptr[0];
return rv;
}
#if _FS_EXFAT
//Écris quatre mots.(Priorité basse)
static QWORD ld_qword (const BYTE* ptr)
{
QWORD rv;
rv = ptr[7];
rv = rv << 8 | ptr[6];
rv = rv << 8 | ptr[5];
rv = rv << 8 | ptr[4];
rv = rv << 8 | ptr[3];
rv = rv << 8 | ptr[2];
rv = rv << 8 | ptr[1];
rv = rv << 8 | ptr[0];
return rv;
}
#endif
#if !_FS_READONLY
// Stocker les mots (Priorité basse)
static
void st_word (BYTE* ptr, WORD val)
{
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val;
}
// Stocker des mots doubles (Priorité basse)
static void st_dword (BYTE* ptr, DWORD val)
{
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val;
}
#if _FS_EXFAT
static
// Stocker quatre mots (Priorité basse)
void st_qword (BYTE* ptr, QWORD val)
{
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val; val >>= 8;
*ptr++ = (BYTE)val;
}
#endif
#endif /* !_FS_READONLY */
边栏推荐
- yolox修改focalloss
- Method of downloading Baidu network disk data with command line
- 关于Oracle数据库字符集的选择及乱码情况
- 【TCP/IP】三次握手过程及原因
- Reading notes - Reflections on the greatest psychological experiment of the 20th century 1
- 如何区分物联网卡与手机SIM卡
- Multiple registration methods for servlets
- Jz77: print binary trees in zigzag order
- Install MySQL using Yum for Linux
- MySQL 教程(基础篇)第03话:MySQL是什么?为什么使用 MySQL?
猜你喜欢

0.96OLED 4针IIC STM32-HAL库版本(附源码)

MySQL 教程(基础篇)第05话:MySQL 的数据模型和 SQL 语言

Redis持久化

居家第六十八天的晚餐

Apple Announces Winner of the 2022 Apple Design Award

svg画的机器人表情包动画代码

Vit slimming -- joint structure search and patch selection

What is the principle and function of the parental delegation mechanism?

祝贺阿静生日快乐

日志异常检测-机器学习
随机推荐
Treatment of data file damage caused by magnetic array failure in a project site
MySQL-mysql索引详解
ThinkPHP2-RCE漏洞复现
Application of contact analysis in electronic connector design: analysis of insertion / withdrawal force of three connectors
[module III]
BN & syncbn of pytorch source code interpretation: detailed explanation of BN and multi card synchronous BN
Detailed explanation of MySQL MySQL index
JS add to collection
How to select the Internet of things all in one card platform
Is it safe for flush to open an account?
从刚入测试界到薪资翻倍:聊聊我的测试进阶历程,值得借鉴
servlet的多种注册方式
Keda's extension to HPA
【TCP/IP】三次握手过程及原因
Subparsers easy to use
Google domestic image website Collection
redhat 9.0 制作openssh rpm包(9.0p1) —— 筑梦之路
连接池关键源码理解
SuperSlide图片切换
Leetcode刷题-2.两数相加-GO