📄 storage.lst
字号:
C51 COMPILER V7.02b STORAGE 03/24/2008 15:52:29 PAGE 1
C51 COMPILER V7.02b, COMPILATION OF MODULE STORAGE
OBJECT MODULE PLACED IN .\Output\Storage.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Storage.c LARGE OPTIMIZE(9,SIZE) BROWSE ORDER DEBUG OBJECTEXTEND PRINT(.\Ou
-tput\Storage.lst) OBJECT(.\Output\Storage.obj)
stmt level source
1 /*
2 **********************************************************************************************
3 * Project: FS7805 SD CARD READER
4 * File: main.c
5 * Contents:
6 * The main function is SD and MMC card reader.
7 *
8 * $Date: 12/15/06 Derek V1.0
9 *
10 * Coments: This is the SD/MMC card reader firmware.
11 * When read sector,the 512 pingpong FIFO mechanism
12 * is used to improve performance.But when write sector,
13 * only single FIFO is used.
14 *
15 * $Date: 12/27/06 Derek V1.1
16 *
17 * The 512 pingpong FIFO mechanism is also used when
18 * writting sectors.
19 *
20 * $Date: 01/09/07 Derek V1.11
21 *
22 * Fix read sector error bug .
23 * Don't set FIFO_FULL bit in SetBulkInFull() function.
24 * Setting it in BulkSetDmaIn() function.
25 *
26 * $Date: 01/18/07 Derek V1.11
27 *
28 * Ignor the OUT_OF_RANGE error in SdSendCmd() when
29 * multi read the last block.
30 *
31 * $Date: 03/29/07 Derek V1.2
32 *
33 * Add TDES module for data encrypt and decrypt.
34 *
35 * Copyright (c) 2007 Fameg, Inc. All rights reserved
36 *
37 *
38 ***********************************************************************************************
39 */
40 #include "include\Include.h"
41 #include "diskio.h" /* Include file for user provided functions */
42
43 INT16U CmdTimer; //modify by derek. from BYTE TO INT16U
44
45 BYTE LastDevice = 0; //用来指示设备的数目
46
47 xdata TDeviceInfo DeviceInfo;
48 xdata STATUS SdMediaStatus = STATUS_NO_MEDIA;
49
50 //----------------------------------------------------------------------------
51 // Description:
52 // Initiate the storage interfaces
53 //----------------------------------------------------------------------------
54 void StorageInit()
C51 COMPILER V7.02b STORAGE 03/24/2008 15:52:29 PAGE 2
55 {
56 1 // LastDevice = 0;
57 1
58 1 SdInit();
59 1 }
60
61
62
63
64 DSTATUS disk_status ()
65 {
66 1 return 0;
67 1 }
68 DRESULT disk_read ( BYTE*buff, DWORD sector, BYTE count)
69 {
70 1 if (!count) return RES_PARERR;
71 1 do{
72 2 SdReadOneSector(buff,sector);
73 2 }while(count--);
74 1
75 1
76 1 }
77
78
79 DRESULT disk_write ( BYTE*buff, DWORD sector, BYTE count)
80 {
81 1 if (!count) return RES_PARERR;
82 1 do{
83 2 SdWriteOneSector(buff,sector);
84 2 }while(count--);
85 1
86 1
87 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 100 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 11 16
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -