キャタピラ用

Committer:
e00nagog
Date:
Sat Nov 02 04:56:24 2013 +0000
Revision:
0:1f8005f33f67
???????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
e00nagog 0:1f8005f33f67 1 #ifndef MBED_LCD_H
e00nagog 0:1f8005f33f67 2 #define MBED_LCD_H
e00nagog 0:1f8005f33f67 3
e00nagog 0:1f8005f33f67 4 #include "mbed.h"
e00nagog 0:1f8005f33f67 5
e00nagog 0:1f8005f33f67 6 class LCD : public Stream {
e00nagog 0:1f8005f33f67 7 public:
e00nagog 0:1f8005f33f67 8 enum Icon {
e00nagog 0:1f8005f33f67 9 ANTENNA = 0x0010,
e00nagog 0:1f8005f33f67 10 PHONE = 0x0210,
e00nagog 0:1f8005f33f67 11 ALARM = 0x0410,
e00nagog 0:1f8005f33f67 12 INPUT = 0x0610,
e00nagog 0:1f8005f33f67 13 UP = 0x0710,
e00nagog 0:1f8005f33f67 14 UPDOWN = 0x0718,
e00nagog 0:1f8005f33f67 15 DOWN = 0x0708,
e00nagog 0:1f8005f33f67 16 LOCK = 0x0910,
e00nagog 0:1f8005f33f67 17 NO_SOUND = 0x0B10,
e00nagog 0:1f8005f33f67 18 BATTERY1 = 0x0D12,
e00nagog 0:1f8005f33f67 19 BATTERY2 = 0x0D1A,
e00nagog 0:1f8005f33f67 20 BATTERY3 = 0x0D1E,
e00nagog 0:1f8005f33f67 21 BATTERY0 = 0x0D02,
e00nagog 0:1f8005f33f67 22 MARK = 0x0F10,
e00nagog 0:1f8005f33f67 23 ALL = 0xFFFF
e00nagog 0:1f8005f33f67 24 };
e00nagog 0:1f8005f33f67 25
e00nagog 0:1f8005f33f67 26 LCD(PinName sdaPin, PinName sclPin, PinName resetPin = NC, PinName backlightPin = NC,
e00nagog 0:1f8005f33f67 27 int contrast = 27, bool cursor = false, bool blink = false);
e00nagog 0:1f8005f33f67 28 void reset();
e00nagog 0:1f8005f33f67 29 void cls();
e00nagog 0:1f8005f33f67 30 void locate(int column, int row);
e00nagog 0:1f8005f33f67 31 void showIcon(Icon icon);
e00nagog 0:1f8005f33f67 32 void hideIcon(Icon icon);
e00nagog 0:1f8005f33f67 33 void setBacklight(bool on);
e00nagog 0:1f8005f33f67 34
e00nagog 0:1f8005f33f67 35 private:
e00nagog 0:1f8005f33f67 36 virtual int _putc(int value);
e00nagog 0:1f8005f33f67 37 virtual int _getc();
e00nagog 0:1f8005f33f67 38
e00nagog 0:1f8005f33f67 39 void display(int column, int row, int c);
e00nagog 0:1f8005f33f67 40 void scrollDown();
e00nagog 0:1f8005f33f67 41
e00nagog 0:1f8005f33f67 42 void writeCommand(int command);
e00nagog 0:1f8005f33f67 43 void writeData(int data);
e00nagog 0:1f8005f33f67 44 void writeData(char data[], int length);
e00nagog 0:1f8005f33f67 45
e00nagog 0:1f8005f33f67 46 DigitalOut _reset;
e00nagog 0:1f8005f33f67 47 DigitalOut backlight;
e00nagog 0:1f8005f33f67 48
e00nagog 0:1f8005f33f67 49 I2C i2c;
e00nagog 0:1f8005f33f67 50
e00nagog 0:1f8005f33f67 51 char contrast;
e00nagog 0:1f8005f33f67 52 bool cursor;
e00nagog 0:1f8005f33f67 53 bool blink;
e00nagog 0:1f8005f33f67 54 bool resetEnabled;
e00nagog 0:1f8005f33f67 55 bool backlightEnabled;
e00nagog 0:1f8005f33f67 56 int column;
e00nagog 0:1f8005f33f67 57 int row;
e00nagog 0:1f8005f33f67 58 char row2[16];
e00nagog 0:1f8005f33f67 59 };
e00nagog 0:1f8005f33f67 60
e00nagog 0:1f8005f33f67 61 #endif