⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 structs.txt

📁 一款MP3 Player Firmware 的原代码,非常有参考价值
💻 TXT
字号:
function "fd_to_ptr" is always used to get memory location ofa file_info struct, so that (hopefully) it'll be painless tolater append more elements to it.An array of 16 file_info's is statically allocatedstruct file_info {     (24 bytes)0	byte    flags;                  ;bit 0, set=open, clear=closed					;bit 1, set=caching, clear=not caching1	byte    unused0;2	uint24	fcache_first_cluster_offset;5	uint24	fcache_last_cluster_offset;8	int16   first_cached_cluster;10	int16	fcache_prev_cluster;12	uint32  first_cluster_number;16	int16	pos_block;		;block position within file18	int16	pos_byte;		;byte offset within that block20	byte    unused[4];};0A18: 01 00 030000 D705000A20: 1C01 1E01 0300 0100 1C01 0000 0000 00000	byte    flags;				= 011	byte    unused0;			= 002	uint24	fcache_first_cluster_offset;	= 0000035	uint24	fcache_last_cluster_offset;	= 0005D78	int16   first_cached_cluster;		= 011C10	int16	fcache_prev_cluster;		= 011E12	uint32  first_cluster_number;		= 0001000316	int16	pos_block;			= 011C18	int16	pos_byte;			= 000020	byte    unused[4];			= 00000000file_info.flags :An array of ??? read requests is staticly allocatedstruct read_request {        uint32  lba_to_read;        int16   block_to_read_into;	int16	unused;};struct play_request {        int16   block_to_play;	int16	num_bytes_to_play;};An array of 8192 block_info's is allocated in the first32 blocks of memory.  The function "block_desc_addr" isused to map one of the 32 pages into 0xEXXX and returnthe address of a particular block's block_info in dptr.struct block_info {    (16 bytes)0	int16   next_block;2	byte	flags;3	byte	unused;	union user_info {		struct fat_sector {4			uint32  sector_offset;8			byte    file_usage_mask[8];		}		struct cluster {4			uint24  cluster_offset;7			byte	block_offset;8			int16	next_cluster;10			int16	number_of_bytes;12			uint32  cluster_number;		}		struct static_mem {4			uint16	address;		}	}};0EF0 0100 01 00 50000000 02000000 0000000007F0 0100 01 00 68000000 02000000 000000000F00 0100 01 00 78010000 02000000 00000000flags (from block_info):bit 3-0:  Block type	0 = free	1 = malloc'd by application	2 = fat sector	3 = fat cluster, first block	C = fixed 8051 memory space	F = unimplementedbit 4: unused (zero)bit 5: unused (zero)bit 6: unused (zero)bit 7: read_pending:	0 = data is valid	1 = read is pending, the block doesn't have valid data yet

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -