/*----------------------------------------------------------------------------/
/ FatFs - FAT file system module R0.08a (C)ChaN, 2010
/-----------------------------------------------------------------------------/
/ FatFs module is a generic FAT file system module for small embedded systems.
/ This is a free software that opened for education, research and commercial
/ developments under license policy of following terms.
/
/ Copyright (C) 2010, ChaN, all right reserved.
/
/ * The FatFs module is a free software and there is NO WARRANTY.
/ * No restriction on use. You can use, modify and redistribute it for
/ personal, non-profit or commercial products UNDER YOUR RESPONSIBILITY.
/ * Redistributions of source code must retain the above copyright notice.
/
/-----------------------------------------------------------------------------/
/ Feb 26,'06 R0.00 Prototype.
/
/ Apr 29,'06 R0.01 First stable version.
/
/ Jun 01,'06 R0.02 Added FAT12 support.
/ Removed unbuffered mode.
/ Fixed a problem on small (<32M) partition.
/ Jun 10,'06 R0.02a Added a configuration option (_FS_MINIMUM).
/
/ Sep 22,'06 R0.03 Added f_rename().
/ Changed option _FS_MINIMUM to _FS_MINIMIZE.
/ Dec 11,'06 R0.03a Improved cluster scan algorithm to write files fast.
/ Fixed f_mkdir() creates incorrect directory on FAT32.
/
/ Feb 04,'07 R0.04 Supported multiple drive system.
/ Changed some interfaces for multiple drive system.
/ Changed f_mountdrv() to f_mount().
/ Added f_mkfs().
/ Apr 01,'07 R0.04a Supported multiple partitions on a physical drive.
/ Added a capability of extending file size to f_lseek().
/ Added minimization level 3.
/ Fixed an endian sensitive code in f_mkfs().
/ May 05,'07 R0.04b Added a configuration option _USE_NTFLAG.
/ Added FSInfo support.
/ Fixed DBCS name can result FR_INVALID_NAME.
/ Fixed short seek (<= csize) collapses the file object.
/
/ Aug 25,'07 R0.05 Changed arguments of f_read(), f_write() and f_mkfs().
/ Fixed f_mkfs() on FAT32 creates incorrect FSInfo.
/ Fixed f_mkdir() on FAT32 creates incorrect directory.
/ Feb 03,'08 R0.05a Added f_truncate() and f_utime().
/ Fixed off by one error at FAT sub-type determination.
/ Fixed btr in f_read() can be mistruncated.
/ Fixed cached sector is not flushed when create and close without write.
/
/ Apr 01,'08 R0.06 Added fputc(), fputs(), fprintf() and fgets().
/ Improved performance of f_lseek() on moving to the same or following cluster.
/
/ Apr 01,'09 R0.07 Merged Tiny-FatFs as a buffer configuration option. (_FS_TINY)
/ Added long file name support.
/ Added multiple code page support.
/ Added re-entrancy for multitask operation.
/ Added auto cluster size selection to f_mkfs().
/ Added rewind option to f_readdir().
/ Changed result code of critical errors.
/ Renamed string functions to avoid name collision.
/ Apr 14,'09 R0.07a Separated out OS dependent code on reentrant cfg.
/ Added multiple sector size support.
/ Jun 21,'09 R0.07c Fixed f_unlink() can return FR_OK on error.
/ Fixed wrong cache control in f_lseek().
/ Added relative path feature.
/ Added f_chdir() and f_chdrive().
/ Added proper case conversion to extended char.
/ Nov 03,'09 R0.07e Separated out configuration options from ff.h to ffconf.h.
/ Fixed f_unlink() fails to remove a sub-dir on _FS_RPATH.
/ Fixed name matching error on the 13 char boundary.
/ Added a configuration option, _LFN_UNICODE.
/ Changed f_readdir() to return the SFN with always upper case on non-LFN cfg.
/
/ May 15,'10 R0.08 Added a memory configuration option. (_USE_LFN = 3)
/ Added file lock feature. (_FS_SHARE)
/ Added fast seek feature. (_USE_FASTSEEK)
/ Changed some types on the API, XCHAR->TCHAR.
/ Changed fname member in the FILINFO structure on Unicode cfg.
/ String functions support UTF-8 encoding files on Unicode cfg.
/ Aug 16,'10 R0.08a Added f_getcwd(). (_FS_RPATH = 2)
/ Added sector erase feature. (_USE_ERASE)
/ Moved file lock semaphore table from fs object to the bss.
/ Fixed a wrong directory entry is created on non-LFN cfg when the given name contains ';'.
/ Fixed f_mkfs() creates wrong FAT32 volume.
/---------------------------------------------------------------------------*/
#include "ff.h" /* FatFs configurations and declarations */
#include "diskio.h" /* Declarations of low level disk I/O functions */
/*--------------------------------------------------------------------------
Module Private Definitions
---------------------------------------------------------------------------*/
#if _FATFS != 8255
#error Wrong include file (ff.h).
#endif
/* Definitions on sector size */
#if _MAX_SS != 512 && _MAX_SS != 1024 && _MAX_SS != 2048 && _MAX_SS != 4096
#error Wrong sector size.
#endif
#if _MAX_SS != 512
#define SS(fs) ((fs)->ssize) /* Multiple sector size */
#else
#define SS(fs) 512U /* Fixed sector size */
#endif
/* Reentrancy related */
#if _FS_REENTRANT
#if _USE_LFN == 1
#error Static LFN work area must not be used in re-entrant configuration.
#endif
#define ENTER_FF(fs) { if (!lock_fs(fs)) return FR_TIMEOUT; }
#define LEAVE_FF(fs, res) { unlock_fs(fs, res); return res; }
#else
#define ENTER_FF(fs)
#define LEAVE_FF(fs, res) return res
#endif
#define ABORT(fs, res) { fp->flag |= FA__ERROR; LEAVE_FF(fs, res); }
/* File shareing feature */
#if _FS_SHARE
#if _FS_READONLY
#error _FS_SHARE must be 0 on read-only cfg.
#endif
typedef struct {
FATFS *fs; /* File ID 1, volume (NULL:blank entry) */
DWORD clu; /* File ID 2, directory */
WORD idx; /* File ID 3, directory index */
WORD ctr; /* File open counter, 0:none, 0x01..0xFF:read open count, 0x100:write mode */
} FILESEM;
#endif
/* Misc definitions */
#define LD_CLUST(dir) (((DWORD)LD_WORD(dir+DIR_FstClusHI)<<16) | LD_WORD(dir+DIR_FstClusLO))
#define ST_CLUST(dir,cl) {ST_WORD(dir+DIR_FstClusLO, cl); ST_WORD(dir+DIR_FstClusHI, (DWORD)cl>>16);}
/* Character code support macros */
#define IsUpper(c) (((c)>='A')&&((c)<='Z'))
#define IsLower(c) (((c)>='a')&&((c)<='z'))
#define IsDigit(c) (((c)>='0')&&((c)<='9'))
#if _DF1S /* Code page is DBCS */
#ifdef _DF2S /* Two 1st byte areas */
#define IsDBCS1(c) (((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E) || ((BYTE)(c) >= _DF2S && (BYTE)(c) <= _DF2E))
#else /* One 1st byte area */
#define IsDBCS1(c) ((BYTE)(c) >= _DF1S && (BYTE)(c) <= _DF1E)
#endif
#ifdef _DS3S /* Three 2nd byte areas */
#define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E) || ((BYTE)(c) >= _DS3S && (BYTE)(c) <= _DS3E))
#else /* Two 2nd byte areas */
#define IsDBCS2(c) (((BYTE)(c) >= _DS1S && (BYTE)(c) <= _DS1E) || ((BYTE)(c) >= _DS2S && (BYTE)(c) <= _DS2E))
#endif
#else /* Code page is SBCS */
#define IsDBCS1(c) 0
#define IsDBCS2(c) 0
#endif /* _DF1S */
/* Name status flags */
#define NS 11 /* Offset of name status byte */
#define NS_LOSS 0x01 /* Out of 8.3 format */
#define NS_LFN 0x02 /* Force to create LFN entry */
#define NS_LAST 0x04 /* Last segment */
#define NS_BODY 0x08 /* Lower case flag (body) */
#define NS_EXT 0x10 /* Lower case flag (ext) */
#define NS_DOT 0x20 /* Dot entry */
/* FAT sub-type boundaries */
/* Note that the FAT spec by Microsoft says 4085 but Windows
没有合适的资源?快使用搜索试试~ 我知道了~
德国Autoquad飞控源码,采用UKF滤波估计方法
共228个文件
h:122个
c:99个
xml:1个
5星 · 超过95%的资源 需积分: 50 160 下载量 21 浏览量
2016-07-07
12:55:49
上传
评论 6
收藏 514KB ZIP 举报
温馨提示
德国Autoquad飞控源码,采用UKF滤波估计方法。 代码结构清晰,采用c语言设计。
资源推荐
资源详情
资源评论
收起资源包目录
德国Autoquad飞控源码,采用UKF滤波估计方法 (228个子文件)
ff.c 110KB
sdio.c 67KB
usb_core.c 58KB
task.c 37KB
aq_mavlink.c 37KB
config.c 33KB
usbd_cdc_msc_core.c 32KB
serial.c 32KB
dsm.c 30KB
nav_ukf.c 29KB
nav.c 26KB
adc.c 24KB
usb_hcd_int.c 22KB
spi.c 22KB
flag.c 22KB
usb_dcd_int.c 22KB
usbd_req.c 20KB
system_stm32f4xx.c 20KB
logger.c 19KB
usbd_msc_scsi.c 17KB
ublox.c 17KB
can.c 17KB
supervisor.c 16KB
timer.c 16KB
event.c 16KB
kernelHeap.c 16KB
comm.c 14KB
time.c 13KB
pwm.c 13KB
queue.c 13KB
motors.c 12KB
usbd_core.c 12KB
srcdkf.c 12KB
d_imu.c 12KB
mutex.c 11KB
max21100.c 11KB
mpu6000.c 11KB
filer.c 11KB
control.c 11KB
mbox.c 10KB
sem.c 10KB
cyrf6936.c 10KB
usb_dcd.c 10KB
pid.c 10KB
calib.c 10KB
algebra.c 9KB
mm.c 9KB
signaling.c 9KB
usbd_msc_bot.c 9KB
port.c 9KB
usbd_desc.c 9KB
rtc.c 8KB
command.c 8KB
esc32.c 8KB
run.c 8KB
core.c 8KB
ext_irq.c 8KB
radio.c 7KB
gimbal.c 7KB
aq_timer.c 7KB
util.c 7KB
hmc5983.c 6KB
usbd_storage_msd.c 6KB
eeprom.c 6KB
ms5611.c 6KB
usb_bsp.c 6KB
usb.c 6KB
telemetry.c 6KB
usb_hcd.c 6KB
usbd_ioreq.c 6KB
ppm.c 6KB
serviceReq.c 5KB
canCalib.c 5KB
analog.c 5KB
1wire.c 5KB
gps.c 4KB
spektrum.c 4KB
flash.c 4KB
grhott.c 4KB
canOSD.c 4KB
canUart.c 4KB
futaba.c 4KB
rotations.c 3KB
mlinkrx.c 3KB
arch.c 3KB
utility.c 3KB
aq_init.c 3KB
rcc.c 3KB
main_ctl.c 2KB
usbd_msc_data.c 2KB
imu.c 2KB
alt_ukf.c 2KB
hook.c 2KB
digital.c 1KB
canSensors.c 1KB
fpu.c 1KB
compass.c 1KB
matrix.c 1KB
getbuildnum.c 965B
ff.h 28KB
共 228 条
- 1
- 2
- 3
资源评论
- zhyscout2017-01-23谢谢楼主分享!
- stm321072018-06-05谢谢楼主分享!
- clq__fly2017-02-16谢谢楼主分享!
- bchy13142017-08-15感觉可以,就是没时间研究
- 车沸码农2016-12-06为什么现在评价不返还分数了??
leehaijun
- 粉丝: 3
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功