1 /* 2 * Private register map for SSD1306 3 * 4 * Copyright (C) 2019 - 2020 Andy Green <andy@warmcat.com> 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to 8 * deal in the Software without restriction, including without limitation the 9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 10 * sell copies of the Software, and to permit persons to whom the Software is 11 * furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in 14 * all copies or substantial portions of the Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 22 * IN THE SOFTWARE. 23 * 24 */ 25 26 #if !defined(__LWS_SSD1306_H__) 27 #define __LWS_SSD1306_H__ 28 29 enum { 30 SSD1306_SETLOWCOLUMN = 0x00, 31 SSD1306_SETHIGHCOLUMN = 0x10, 32 33 SSD1306_MEMORYMODE = 0x20, 34 SSD1306_COLUMNADDR = 0x21, 35 SSD1306_PAGEADDR = 0x22, 36 SSD1306_DEACTIVATE_SCROLL = 0x2e, 37 38 SSD1306_SETSTARTLINE = 0x40, 39 40 SSD1306_SETCONTRAST = 0x81, 41 SSD1306_CHARGEPUMP = 0x8d, 42 43 SSD1306_SEGREMAP = 0xa0, 44 SSD1306_SETSEGMENTREMAP = 0xa1, 45 SSD1306_DISPLAYALLON_RESUME = 0xa4, 46 SSD1306_DISPLAYALLON = 0xa5, 47 SSD1306_NORMALDISPLAY = 0xa6, 48 SSD1306_INVERTDISPLAY = 0xa7, 49 SSD1306_SETMULTIPLEX = 0xa8, 50 SSD1306_DISPLAYOFF = 0xae, 51 SSD1306_DISPLAYON = 0xaf, 52 53 SSD1306_COMSCANINC = 0xc0, 54 SSD1306_COMSCANDEC = 0xc8, 55 56 SSD1306_SETDISPLAYOFFSET = 0xd3, 57 SSD1306_SETDISPLAYCLOCKDIV = 0xd5, 58 SSD1306_SETPRECHARGE = 0xd9, 59 SSD1306_SETCOMPINS = 0xda, 60 SSD1306_SETVCOMDESELECT = 0xdb, 61 62 SSD1306_NOP = 0xe3, 63 }; 64 65 #endif 66 67