![](/media/cache/profiles/9527f862774325cefd158e74c3045c1e.jpg.50x50_q85.jpg)
...
Defs.h@0:99c0050a285c, 2014-04-01 (annotated)
- Committer:
- loovee
- Date:
- Tue Apr 01 07:02:59 2014 +0000
- Revision:
- 0:99c0050a285c
..
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
loovee | 0:99c0050a285c | 1 | #ifndef Defs_h__ |
loovee | 0:99c0050a285c | 2 | #define Defs_h__ |
loovee | 0:99c0050a285c | 3 | |
loovee | 0:99c0050a285c | 4 | #include "mbed.h" |
loovee | 0:99c0050a285c | 5 | |
loovee | 0:99c0050a285c | 6 | /* |
loovee | 0:99c0050a285c | 7 | #define RED 0b1111100000000000 |
loovee | 0:99c0050a285c | 8 | #define GREEN 0b0000011111100000 |
loovee | 0:99c0050a285c | 9 | #define BLUE 0b0000000000011111 |
loovee | 0:99c0050a285c | 10 | #define YELLOW 0b1111111111100000 |
loovee | 0:99c0050a285c | 11 | #define CYAN 0b0000011111111111 |
loovee | 0:99c0050a285c | 12 | #define PURPLE 0b1000000000010000 |
loovee | 0:99c0050a285c | 13 | #define MAGENTA 0b1111100000011111 |
loovee | 0:99c0050a285c | 14 | #define DARKBLUE 0b0000000000010000 |
loovee | 0:99c0050a285c | 15 | #define DUCKGREEN 0b0000010000010000 |
loovee | 0:99c0050a285c | 16 | #define DARKGREEN 0b0000010000000000 |
loovee | 0:99c0050a285c | 17 | #define OLIVE 0b1000010000000000 |
loovee | 0:99c0050a285c | 18 | #define MAROON 0b1000000000000000 |
loovee | 0:99c0050a285c | 19 | #define SLIVER 0b1100011000011000 |
loovee | 0:99c0050a285c | 20 | #define GRAY 0b1000010000010000 |
loovee | 0:99c0050a285c | 21 | #define BLACK 0b0000000000000000 |
loovee | 0:99c0050a285c | 22 | #define WHITE 0b1111111111111111 |
loovee | 0:99c0050a285c | 23 | */ |
loovee | 0:99c0050a285c | 24 | |
loovee | 0:99c0050a285c | 25 | #define RED 0xF800 |
loovee | 0:99c0050a285c | 26 | #define GREEN 0x07E0 |
loovee | 0:99c0050a285c | 27 | #define BLUE 0x001f |
loovee | 0:99c0050a285c | 28 | #define YELLOW 0xFFE0 |
loovee | 0:99c0050a285c | 29 | #define CYAN 0x07FF |
loovee | 0:99c0050a285c | 30 | #define PURPLE 0x8010 |
loovee | 0:99c0050a285c | 31 | #define MAGENTA 0xF81F |
loovee | 0:99c0050a285c | 32 | #define DARKBLUE 0x0010 |
loovee | 0:99c0050a285c | 33 | #define DUCKGREEN 0x0410 |
loovee | 0:99c0050a285c | 34 | #define DARKGREEN 0x0400 |
loovee | 0:99c0050a285c | 35 | #define OLIVE 0x8400 |
loovee | 0:99c0050a285c | 36 | #define MAROON 0x8000 |
loovee | 0:99c0050a285c | 37 | #define SLIVER 0xC618 |
loovee | 0:99c0050a285c | 38 | #define GRAY 0x8410 |
loovee | 0:99c0050a285c | 39 | #define BLACK 0x0000 |
loovee | 0:99c0050a285c | 40 | #define WHITE 0xffff |
loovee | 0:99c0050a285c | 41 | |
loovee | 0:99c0050a285c | 42 | |
loovee | 0:99c0050a285c | 43 | // Select one of these defines to set the pixel color order |
loovee | 0:99c0050a285c | 44 | #define SSD1331_COLORORDER_RGB |
loovee | 0:99c0050a285c | 45 | // #define SSD1331_COLORORDER_BGR |
loovee | 0:99c0050a285c | 46 | #if defined SSD1331_COLORORDER_RGB && defined SSD1331_COLORORDER_BGR |
loovee | 0:99c0050a285c | 47 | #error "RGB and BGR can not both be defined for SSD1331_COLORODER." |
loovee | 0:99c0050a285c | 48 | #endif |
loovee | 0:99c0050a285c | 49 | |
loovee | 0:99c0050a285c | 50 | // Timing Delays |
loovee | 0:99c0050a285c | 51 | #define SSD1331_DELAYS_HWFILL (3) |
loovee | 0:99c0050a285c | 52 | #define SSD1331_DELAYS_HWLINE (1) |
loovee | 0:99c0050a285c | 53 | |
loovee | 0:99c0050a285c | 54 | #define SSD1331_CMD_DRAWLINE 0x21 |
loovee | 0:99c0050a285c | 55 | #define SSD1331_CMD_DRAWRECT 0x22 |
loovee | 0:99c0050a285c | 56 | #define SSD1331_CMD_FILL 0x26 |
loovee | 0:99c0050a285c | 57 | #define SSD1331_CMD_SETCOLUMN 0x15 |
loovee | 0:99c0050a285c | 58 | #define SSD1331_CMD_SETROW 0x75 |
loovee | 0:99c0050a285c | 59 | #define SSD1331_CMD_CONTRASTA 0x81 |
loovee | 0:99c0050a285c | 60 | #define SSD1331_CMD_CONTRASTB 0x82 |
loovee | 0:99c0050a285c | 61 | #define SSD1331_CMD_CONTRASTC 0x83 |
loovee | 0:99c0050a285c | 62 | #define SSD1331_CMD_MASTERCURRENT 0x87 |
loovee | 0:99c0050a285c | 63 | #define SSD1331_CMD_SETREMAP 0xA0 |
loovee | 0:99c0050a285c | 64 | #define SSD1331_CMD_STARTLINE 0xA1 |
loovee | 0:99c0050a285c | 65 | #define SSD1331_CMD_DISPLAYOFFSET 0xA2 |
loovee | 0:99c0050a285c | 66 | #define SSD1331_CMD_NORMALDISPLAY 0xA4 |
loovee | 0:99c0050a285c | 67 | #define SSD1331_CMD_DISPLAYALLON 0xA5 |
loovee | 0:99c0050a285c | 68 | #define SSD1331_CMD_DISPLAYALLOFF 0xA6 |
loovee | 0:99c0050a285c | 69 | #define SSD1331_CMD_INVERTDISPLAY 0xA7 |
loovee | 0:99c0050a285c | 70 | #define SSD1331_CMD_SETMULTIPLEX 0xA8 |
loovee | 0:99c0050a285c | 71 | #define SSD1331_CMD_SETMASTER 0xAD |
loovee | 0:99c0050a285c | 72 | #define SSD1331_CMD_DISPLAYOFF 0xAE |
loovee | 0:99c0050a285c | 73 | #define SSD1331_CMD_DISPLAYON 0xAF |
loovee | 0:99c0050a285c | 74 | #define SSD1331_CMD_POWERMODE 0xB0 |
loovee | 0:99c0050a285c | 75 | #define SSD1331_CMD_PRECHARGE 0xB1 |
loovee | 0:99c0050a285c | 76 | #define SSD1331_CMD_CLOCKDIV 0xB3 |
loovee | 0:99c0050a285c | 77 | #define SSD1331_CMD_PRECHARGEA 0x8A |
loovee | 0:99c0050a285c | 78 | #define SSD1331_CMD_PRECHARGEB 0x8B |
loovee | 0:99c0050a285c | 79 | #define SSD1331_CMD_PRECHARGEC 0x8C |
loovee | 0:99c0050a285c | 80 | #define SSD1331_CMD_PRECHARGELEVEL 0xBB |
loovee | 0:99c0050a285c | 81 | #define SSD1331_CMD_VCOMH 0xBE |
loovee | 0:99c0050a285c | 82 | |
loovee | 0:99c0050a285c | 83 | #endif |