Final version.

Dependencies:   F746_GUI F746_SAI_IO UIT_FFT_Real

Fork of F746_Spectrogram by 不韋 呂

Committer:
mladjo1993
Date:
Wed Aug 30 07:47:58 2017 +0000
Revision:
9:444e58089d09
Parent:
4:c1beacfc42c7
Final version.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MikamiUitOpen 4:c1beacfc42c7 1 /* mbed Microcontroller Library
MikamiUitOpen 4:c1beacfc42c7 2 * Copyright (c) 2006-2013 ARM Limited
MikamiUitOpen 4:c1beacfc42c7 3 *
MikamiUitOpen 4:c1beacfc42c7 4 * Licensed under the Apache License, Version 2.0 (the "License");
MikamiUitOpen 4:c1beacfc42c7 5 * you may not use this file except in compliance with the License.
MikamiUitOpen 4:c1beacfc42c7 6 * You may obtain a copy of the License at
MikamiUitOpen 4:c1beacfc42c7 7 *
MikamiUitOpen 4:c1beacfc42c7 8 * http://www.apache.org/licenses/LICENSE-2.0
MikamiUitOpen 4:c1beacfc42c7 9 *
MikamiUitOpen 4:c1beacfc42c7 10 * Unless required by applicable law or agreed to in writing, software
MikamiUitOpen 4:c1beacfc42c7 11 * distributed under the License is distributed on an "AS IS" BASIS,
MikamiUitOpen 4:c1beacfc42c7 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
MikamiUitOpen 4:c1beacfc42c7 13 * See the License for the specific language governing permissions and
MikamiUitOpen 4:c1beacfc42c7 14 * limitations under the License.
MikamiUitOpen 4:c1beacfc42c7 15 */
MikamiUitOpen 4:c1beacfc42c7 16 #ifndef MBED_STREAM_H
MikamiUitOpen 4:c1beacfc42c7 17 #define MBED_STREAM_H
MikamiUitOpen 4:c1beacfc42c7 18
MikamiUitOpen 4:c1beacfc42c7 19 #include "platform.h"
MikamiUitOpen 4:c1beacfc42c7 20 #include "FileLike.h"
MikamiUitOpen 4:c1beacfc42c7 21 #include <cstdarg>
MikamiUitOpen 4:c1beacfc42c7 22
MikamiUitOpen 4:c1beacfc42c7 23 namespace mbed {
MikamiUitOpen 4:c1beacfc42c7 24
MikamiUitOpen 4:c1beacfc42c7 25 extern void mbed_set_unbuffered_stream(FILE *_file);
MikamiUitOpen 4:c1beacfc42c7 26 extern int mbed_getc(FILE *_file);
MikamiUitOpen 4:c1beacfc42c7 27 extern char* mbed_gets(char *s, int size, FILE *_file);
MikamiUitOpen 4:c1beacfc42c7 28
MikamiUitOpen 4:c1beacfc42c7 29 class Stream : public FileLike {
MikamiUitOpen 4:c1beacfc42c7 30
MikamiUitOpen 4:c1beacfc42c7 31 public:
MikamiUitOpen 4:c1beacfc42c7 32 Stream(const char *name=NULL);
MikamiUitOpen 4:c1beacfc42c7 33 virtual ~Stream();
MikamiUitOpen 4:c1beacfc42c7 34
MikamiUitOpen 4:c1beacfc42c7 35 int putc(int c);
MikamiUitOpen 4:c1beacfc42c7 36 int puts(const char *s);
MikamiUitOpen 4:c1beacfc42c7 37 int getc();
MikamiUitOpen 4:c1beacfc42c7 38 char *gets(char *s, int size);
MikamiUitOpen 4:c1beacfc42c7 39 int printf(const char* format, ...);
MikamiUitOpen 4:c1beacfc42c7 40 int scanf(const char* format, ...);
MikamiUitOpen 4:c1beacfc42c7 41 int vprintf(const char* format, std::va_list args);
MikamiUitOpen 4:c1beacfc42c7 42 int vscanf(const char* format, std::va_list args);
MikamiUitOpen 4:c1beacfc42c7 43
MikamiUitOpen 4:c1beacfc42c7 44 operator std::FILE*() {return _file;}
MikamiUitOpen 4:c1beacfc42c7 45
MikamiUitOpen 4:c1beacfc42c7 46 protected:
MikamiUitOpen 4:c1beacfc42c7 47 virtual int close();
MikamiUitOpen 4:c1beacfc42c7 48 virtual ssize_t write(const void* buffer, size_t length);
MikamiUitOpen 4:c1beacfc42c7 49 virtual ssize_t read(void* buffer, size_t length);
MikamiUitOpen 4:c1beacfc42c7 50 virtual off_t lseek(off_t offset, int whence);
MikamiUitOpen 4:c1beacfc42c7 51 virtual int isatty();
MikamiUitOpen 4:c1beacfc42c7 52 virtual int fsync();
MikamiUitOpen 4:c1beacfc42c7 53 virtual off_t flen();
MikamiUitOpen 4:c1beacfc42c7 54
MikamiUitOpen 4:c1beacfc42c7 55 virtual int _putc(int c) = 0;
MikamiUitOpen 4:c1beacfc42c7 56 virtual int _getc() = 0;
MikamiUitOpen 4:c1beacfc42c7 57
MikamiUitOpen 4:c1beacfc42c7 58 std::FILE *_file;
MikamiUitOpen 4:c1beacfc42c7 59
MikamiUitOpen 4:c1beacfc42c7 60 /* disallow copy constructor and assignment operators */
MikamiUitOpen 4:c1beacfc42c7 61 private:
MikamiUitOpen 4:c1beacfc42c7 62 Stream(const Stream&);
MikamiUitOpen 4:c1beacfc42c7 63 Stream & operator = (const Stream&);
MikamiUitOpen 4:c1beacfc42c7 64 };
MikamiUitOpen 4:c1beacfc42c7 65
MikamiUitOpen 4:c1beacfc42c7 66 } // namespace mbed
MikamiUitOpen 4:c1beacfc42c7 67
MikamiUitOpen 4:c1beacfc42c7 68 #endif