Permalink
Browse files

Remove fat/sd code.

git-svn-id: svn+ssh://jay/var/svn/wolf/trunk@145 32837ae5-38f0-4cfd-8401-3ff76d8497c4
  • Loading branch information...
1 parent 63170dd commit ac0f2fe2f57fb9e7d7a661a98155e12466d3a29a paul committed Aug 22, 2007
Showing with 0 additions and 2,658 deletions.
  1. +0 −66 arm_support.c
  2. +0 −64 diskio.h
  3. +0 −25 integer.h
  4. +0 −631 mmc.c
  5. +0 −1,582 tff.c
  6. +0 −290 tff.h
View
@@ -9,14 +9,6 @@
#define SEMI_SWI "swi 0x123456"
#endif
-#ifdef LUMINARY
-#include "tff.h"
-#endif
-
-void __errno()
-{
-}
-
void __aeabi_unwind_cpp_pr0()
{
}
@@ -117,63 +109,6 @@ void *memcpy(void *dest, const void *src, size_t n)
}
#ifndef ENABLE_PRECOMPILE
-#ifdef LUMINARY
-#define MAX_FILES 4
-static FATFS fat;
-static FIL files[MAX_FILES];
-static byte numfiles = 0xff;
-
-int open(const char *filename, int flags, ...)
-{
- FIL *f;
-
-#ifdef O_BINARY
- flags &= ~O_BINARY;
-#endif
- if (flags != O_RDONLY)
- Quit("Can only open readonly\n");
-
- if (numfiles == 0xff) {
- f_mount(0, &fat);
- numfiles = 0;
- }
-
- f = &files[numfiles];
- if (f_open(f, filename, FA_READ))
- Quit(filename);
- return numfiles++;
-}
-
-ssize_t read(int fd, void *buf, size_t count)
-{
- WORD rc;
- f_read(&files[fd], buf, count, &rc);
- if (rc != count)
- Quit("Read Failed\n");
- return rc;
-}
-
-ssize_t write(int fd, const void *buf, size_t count)
-{
- Quit("Write\n");
- return -1;
-}
-
-int close(int fd)
-{
- f_close(&files[fd]);
- return 0;
-}
-
-off_t lseek(int fd, off_t ptr, int whence)
-{
- if (whence != SEEK_SET)
- Quit("Bad Seek whence\n");
- if (f_lseek(&files[fd], ptr))
- return -1;
- return ptr;
-}
-#else
static uint32_t angel(int reason, uint32_t *args)
{
register uint32_t r0 asm ("r0");
@@ -253,4 +188,3 @@ off_t lseek(int fd, off_t ptr, int whence)
return ptr;
}
#endif
-#endif
View
@@ -1,64 +0,0 @@
-/*-----------------------------------------------------------------------
-/ Low level disk interface modlue include file R0.04a (C)ChaN, 2007
-/-----------------------------------------------------------------------*/
-
-#ifndef _DISKIO
-
-#define _READONLY 0 /* 1: Read-only mode */
-
-#include "integer.h"
-
-
-/* Status of Disk Functions */
-typedef BYTE DSTATUS;
-
-/* Results of Disk Functions */
-typedef enum {
- RES_OK = 0, /* 0: Successful */
- RES_ERROR, /* 1: R/W Error */
- RES_WRPRT, /* 2: Write Protected */
- RES_NOTRDY, /* 3: Not Ready */
- RES_PARERR /* 4: Invalid Parameter */
-} DRESULT;
-
-
-/*---------------------------------------*/
-/* Prototypes for disk control functions */
-
-DSTATUS disk_initialize (BYTE);
-DSTATUS disk_status (BYTE);
-DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
-#if _READONLY == 0
-DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
-#endif
-DRESULT disk_ioctl (BYTE, BYTE, void*);
-void disk_timerproc (void);
-
-
-
-
-/* Disk Status Bits (DSTATUS) */
-
-#define STA_NOINIT 0x01 /* Drive not initialized */
-#define STA_NODISK 0x02 /* No medium in the drive */
-#define STA_PROTECT 0x04 /* Write protected */
-
-
-/* Command code for disk_ioctrl() */
-
-#define GET_SECTOR_COUNT 1
-#define GET_SECTOR_SIZE 2
-#define CTRL_SYNC 3
-#define CTRL_POWER 4
-#define CTRL_LOCK 5
-#define CTRL_EJECT 6
-#define MMC_GET_CSD 10
-#define MMC_GET_CID 11
-#define MMC_GET_OCR 12
-#define ATA_GET_REV 20
-#define ATA_GET_MODEL 21
-#define ATA_GET_SN 22
-
-
-#define _DISKIO
-#endif
View
@@ -1,25 +0,0 @@
-#ifndef _INTEGER
-#define _INTEGER
-
-typedef signed int INT;
-typedef unsigned int UINT;
-
-/* These types are assumed as 8-bit integer */
-typedef signed char CHAR;
-typedef unsigned char UCHAR;
-typedef unsigned char BYTE;
-
-/* These types are assumed as 16-bit integer */
-typedef signed short SHORT;
-typedef unsigned short USHORT;
-typedef unsigned short WORD;
-
-/* These types are assumed as 32-bit integer */
-typedef signed int LONG;
-typedef unsigned int ULONG;
-typedef unsigned int DWORD;
-
-/* Boolean type */
-typedef enum { FALSE = 0, TRUE } BOOL;
-
-#endif
Oops, something went wrong.

0 comments on commit ac0f2fe

Please sign in to comment.