A simple 128x32 graphical LCD program to quickstart with LCD on ARM mbed IoT Starter Kit. This requires mbed Applciation Shield with FRDM-K64F platform.

Dependencies:   C12832

Committer:
tushki7
Date:
Sun Apr 12 15:45:52 2015 +0000
Revision:
1:eb68c94a8ee5
Parent:
0:60d829a0353a
A simple 128x32 LCD program with ARM mbed IoT Starter Kit;

Who changed what in which revision?

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