LPC11U35 ADC Tick & USBSerial

Dependencies:   mbed

Dependents:   SmallDoseMeter_SingleCH_AE_lpc11u35_V1_00

Committer:
H_Tsunemoto
Date:
Mon Feb 19 09:09:52 2018 +0000
Revision:
1:b1a3be5f48ab
Parent:
0:871ab6846b18
test

Who changed what in which revision?

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