fft

Dependencies:   BSP_DISCO_F746NG SDFileSystem_Warning_Fixed

Committer:
MikamiUitOpen
Date:
Sun Oct 09 10:11:14 2016 +0000
Revision:
0:3e46577dc273
1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MikamiUitOpen 0:3e46577dc273 1 /* mbed Microcontroller Library
MikamiUitOpen 0:3e46577dc273 2 * Copyright (c) 2006-2013 ARM Limited
MikamiUitOpen 0:3e46577dc273 3 *
MikamiUitOpen 0:3e46577dc273 4 * Licensed under the Apache License, Version 2.0 (the "License");
MikamiUitOpen 0:3e46577dc273 5 * you may not use this file except in compliance with the License.
MikamiUitOpen 0:3e46577dc273 6 * You may obtain a copy of the License at
MikamiUitOpen 0:3e46577dc273 7 *
MikamiUitOpen 0:3e46577dc273 8 * http://www.apache.org/licenses/LICENSE-2.0
MikamiUitOpen 0:3e46577dc273 9 *
MikamiUitOpen 0:3e46577dc273 10 * Unless required by applicable law or agreed to in writing, software
MikamiUitOpen 0:3e46577dc273 11 * distributed under the License is distributed on an "AS IS" BASIS,
MikamiUitOpen 0:3e46577dc273 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
MikamiUitOpen 0:3e46577dc273 13 * See the License for the specific language governing permissions and
MikamiUitOpen 0:3e46577dc273 14 * limitations under the License.
MikamiUitOpen 0:3e46577dc273 15 */
MikamiUitOpen 0:3e46577dc273 16 #ifndef MBED_FILEBASE_H
MikamiUitOpen 0:3e46577dc273 17 #define MBED_FILEBASE_H
MikamiUitOpen 0:3e46577dc273 18
MikamiUitOpen 0:3e46577dc273 19 typedef int FILEHANDLE;
MikamiUitOpen 0:3e46577dc273 20
MikamiUitOpen 0:3e46577dc273 21 #include <stdio.h>
MikamiUitOpen 0:3e46577dc273 22
MikamiUitOpen 0:3e46577dc273 23 #if defined(__ARMCC_VERSION) || defined(__ICCARM__)
MikamiUitOpen 0:3e46577dc273 24 # define O_RDONLY 0
MikamiUitOpen 0:3e46577dc273 25 # define O_WRONLY 1
MikamiUitOpen 0:3e46577dc273 26 # define O_RDWR 2
MikamiUitOpen 0:3e46577dc273 27 # define O_CREAT 0x0200
MikamiUitOpen 0:3e46577dc273 28 # define O_TRUNC 0x0400
MikamiUitOpen 0:3e46577dc273 29 # define O_APPEND 0x0008
MikamiUitOpen 0:3e46577dc273 30
MikamiUitOpen 0:3e46577dc273 31 # define NAME_MAX 255
MikamiUitOpen 0:3e46577dc273 32
MikamiUitOpen 0:3e46577dc273 33 typedef int mode_t;
MikamiUitOpen 0:3e46577dc273 34 typedef int ssize_t;
MikamiUitOpen 0:3e46577dc273 35 typedef long off_t;
MikamiUitOpen 0:3e46577dc273 36
MikamiUitOpen 0:3e46577dc273 37 #else
MikamiUitOpen 0:3e46577dc273 38 # include <sys/fcntl.h>
MikamiUitOpen 0:3e46577dc273 39 # include <sys/types.h>
MikamiUitOpen 0:3e46577dc273 40 # include <sys/syslimits.h>
MikamiUitOpen 0:3e46577dc273 41 #endif
MikamiUitOpen 0:3e46577dc273 42
MikamiUitOpen 0:3e46577dc273 43 #include "platform.h"
MikamiUitOpen 0:3e46577dc273 44
MikamiUitOpen 0:3e46577dc273 45 namespace mbed {
MikamiUitOpen 0:3e46577dc273 46
MikamiUitOpen 0:3e46577dc273 47 typedef enum {
MikamiUitOpen 0:3e46577dc273 48 FilePathType,
MikamiUitOpen 0:3e46577dc273 49 FileSystemPathType
MikamiUitOpen 0:3e46577dc273 50 } PathType;
MikamiUitOpen 0:3e46577dc273 51
MikamiUitOpen 0:3e46577dc273 52 class FileBase {
MikamiUitOpen 0:3e46577dc273 53 public:
MikamiUitOpen 0:3e46577dc273 54 FileBase(const char *name, PathType t);
MikamiUitOpen 0:3e46577dc273 55
MikamiUitOpen 0:3e46577dc273 56 virtual ~FileBase();
MikamiUitOpen 0:3e46577dc273 57
MikamiUitOpen 0:3e46577dc273 58 const char* getName(void);
MikamiUitOpen 0:3e46577dc273 59 PathType getPathType(void);
MikamiUitOpen 0:3e46577dc273 60
MikamiUitOpen 0:3e46577dc273 61 static FileBase *lookup(const char *name, unsigned int len);
MikamiUitOpen 0:3e46577dc273 62
MikamiUitOpen 0:3e46577dc273 63 static FileBase *get(int n);
MikamiUitOpen 0:3e46577dc273 64
MikamiUitOpen 0:3e46577dc273 65 protected:
MikamiUitOpen 0:3e46577dc273 66 static FileBase *_head;
MikamiUitOpen 0:3e46577dc273 67
MikamiUitOpen 0:3e46577dc273 68 FileBase *_next;
MikamiUitOpen 0:3e46577dc273 69 const char *_name;
MikamiUitOpen 0:3e46577dc273 70 PathType _path_type;
MikamiUitOpen 0:3e46577dc273 71
MikamiUitOpen 0:3e46577dc273 72 /* disallow copy constructor and assignment operators */
MikamiUitOpen 0:3e46577dc273 73 private:
MikamiUitOpen 0:3e46577dc273 74 FileBase(const FileBase&);
MikamiUitOpen 0:3e46577dc273 75 FileBase & operator = (const FileBase&);
MikamiUitOpen 0:3e46577dc273 76 };
MikamiUitOpen 0:3e46577dc273 77
MikamiUitOpen 0:3e46577dc273 78 } // namespace mbed
MikamiUitOpen 0:3e46577dc273 79
MikamiUitOpen 0:3e46577dc273 80 #endif