Hexiwear OLED

Dependents:   Hexi

Fork of Hexi_OLED_SSD1351 by Hexiwear

Committer:
khuang
Date:
Fri Aug 26 18:13:10 2016 +0000
Revision:
5:a5b4b36a1aed
Parent:
2:fc06b5b5bf6a
Child:
6:0060ffa3f4dc
test3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
khuang 5:a5b4b36a1aed 1 /** OLED Screen Info
khuang 5:a5b4b36a1aed 2 * This file contains OLED screen SSD1351-related info.
khuang 2:fc06b5b5bf6a 3 *
khuang 2:fc06b5b5bf6a 4 * Redistribution and use in source and binary forms, with or without modification,
khuang 2:fc06b5b5bf6a 5 * are permitted provided that the following conditions are met:
khuang 2:fc06b5b5bf6a 6 *
khuang 2:fc06b5b5bf6a 7 * Redistributions of source code must retain the above copyright notice, this list
khuang 5:a5b4b36a1aed 8 * of conditions and the following disclaimer.
khuang 2:fc06b5b5bf6a 9 *
khuang 2:fc06b5b5bf6a 10 * Redistributions in binary form must reproduce the above copyright notice, this
khuang 5:a5b4b36a1aed 11 * list of conditions and the following disclaimer in the documentation and/or
khuang 5:a5b4b36a1aed 12 * other materials provided with the distribution.
khuang 2:fc06b5b5bf6a 13 *
khuang 2:fc06b5b5bf6a 14 * Neither the name of NXP, nor the names of its
khuang 5:a5b4b36a1aed 15 * contributors may be used to endorse or promote products derived from this
khuang 5:a5b4b36a1aed 16 * software without specific prior written permission.
khuang 2:fc06b5b5bf6a 17 *
khuang 2:fc06b5b5bf6a 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
khuang 2:fc06b5b5bf6a 19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
khuang 2:fc06b5b5bf6a 20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
khuang 2:fc06b5b5bf6a 21 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
khuang 2:fc06b5b5bf6a 22 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
khuang 2:fc06b5b5bf6a 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
khuang 2:fc06b5b5bf6a 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
khuang 2:fc06b5b5bf6a 25 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
khuang 2:fc06b5b5bf6a 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
khuang 2:fc06b5b5bf6a 27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
khuang 2:fc06b5b5bf6a 28 *
khuang 2:fc06b5b5bf6a 29 * visit: http://www.mikroe.com and http://www.nxp.com
khuang 2:fc06b5b5bf6a 30 *
khuang 2:fc06b5b5bf6a 31 * get support at: http://www.mikroe.com/forum and https://community.nxp.com
khuang 2:fc06b5b5bf6a 32 *
khuang 0:06f42dd3eab3 33 * Project HEXIWEAR, 2015
khuang 0:06f42dd3eab3 34 */
khuang 2:fc06b5b5bf6a 35
khuang 2:fc06b5b5bf6a 36
khuang 0:06f42dd3eab3 37
khuang 0:06f42dd3eab3 38 #ifndef HG_OLED_INFO
khuang 0:06f42dd3eab3 39 #define HG_OLED_INFO
khuang 0:06f42dd3eab3 40
khuang 0:06f42dd3eab3 41 // command byte number
khuang 2:fc06b5b5bf6a 42 #define CMD_BYTE (1)
khuang 2:fc06b5b5bf6a 43 #define DATA_BYTE (0)
khuang 0:06f42dd3eab3 44
khuang 0:06f42dd3eab3 45 #define OLED_COLUMN_OFFSET (16)
khuang 0:06f42dd3eab3 46 #define OLED_ROW_OFFSET (0)
khuang 0:06f42dd3eab3 47
khuang 0:06f42dd3eab3 48 #define OLED_SCREEN_WIDTH (96)
khuang 0:06f42dd3eab3 49 #define OLED_SCREEN_HEIGHT (96)
khuang 0:06f42dd3eab3 50
khuang 0:06f42dd3eab3 51 #define OLED_SCREEN_WIDTH_END ( (OLED_SCREEN_WIDTH-1) + OLED_COLUMN_OFFSET )
khuang 0:06f42dd3eab3 52 #define OLED_SCREEN_HEIGHT_END ( (OLED_SCREEN_HEIGHT-1) + OLED_ROW_OFFSET )
khuang 0:06f42dd3eab3 53
khuang 0:06f42dd3eab3 54 #define OLED_BYTES_PER_PIXEL ( 2 )
khuang 0:06f42dd3eab3 55
khuang 0:06f42dd3eab3 56 #define OLED_TRANSITION_STEP ( 1 )
khuang 0:06f42dd3eab3 57 #define OLED_ACTION_DCON ( 0xFE )
khuang 0:06f42dd3eab3 58 #define OLED_ACTION_DCOFF ( 0xFF )
khuang 0:06f42dd3eab3 59
khuang 0:06f42dd3eab3 60 #define OLED_CHAR_WIDTH_AUTO ( 0xFF )
khuang 0:06f42dd3eab3 61 #define OLED_CHAR_WIDTH_MAX ( 0xFE )
khuang 0:06f42dd3eab3 62 #define OLED_CHAR_WIDTH_NUM ( 0xFD )
khuang 0:06f42dd3eab3 63 #define OLED_CHAR_WIDTH_KEEP ( 0xFC )
khuang 0:06f42dd3eab3 64 #define OLED_CHAR_HEIGHT_AUTO ( 0xFB )
khuang 0:06f42dd3eab3 65 #define OLED_CHAR_HEIGHT_KEEP ( 0xFA )
khuang 0:06f42dd3eab3 66
khuang 0:06f42dd3eab3 67 #define OLED_SCREEN_SIZE ( OLED_SCREEN_WIDTH * OLED_SCREEN_HEIGHT )
khuang 0:06f42dd3eab3 68 #define OLED_GRAM_SIZE ( OLED_SCREEN_WIDTH * OLED_SCREEN_HEIGHT * OLED_BYTES_PER_PIXEL )
khuang 0:06f42dd3eab3 69
khuang 0:06f42dd3eab3 70 #define OLED_TEXT_HALIGN_SHIFT ( 0 )
khuang 0:06f42dd3eab3 71 #define OLED_TEXT_HALIGN_MASK ( 0x03 << OLED_TEXT_HALIGN_SHIFT )
khuang 0:06f42dd3eab3 72
khuang 0:06f42dd3eab3 73 #define OLED_TEXT_VALIGN_SHIFT ( 4 )
khuang 0:06f42dd3eab3 74 #define OLED_TEXT_VALIGN_MASK ( 0x03 << OLED_TEXT_VALIGN_SHIFT )
khuang 0:06f42dd3eab3 75
khuang 0:06f42dd3eab3 76 #define BMP_HEADER_BYTE_SIZE (6)
khuang 0:06f42dd3eab3 77
khuang 0:06f42dd3eab3 78
khuang 0:06f42dd3eab3 79
khuang 0:06f42dd3eab3 80 /**
khuang 0:06f42dd3eab3 81 * remap settings
khuang 0:06f42dd3eab3 82 */
khuang 0:06f42dd3eab3 83
khuang 0:06f42dd3eab3 84 #define REMAP_HORIZONTAL_INCREMENT ( 0 )
khuang 0:06f42dd3eab3 85 #define REMAP_VERTICAL_INCREMENT ( 1 << 0 )
khuang 0:06f42dd3eab3 86
khuang 0:06f42dd3eab3 87 #define REMAP_COLUMNS_LEFT_TO_RIGHT ( 0 )
khuang 0:06f42dd3eab3 88 #define REMAP_COLUMNS_RIGHT_TO_LEFT ( 1 << 1 )
khuang 0:06f42dd3eab3 89
khuang 0:06f42dd3eab3 90 #define REMAP_ORDER_ABC ( 0 )
khuang 0:06f42dd3eab3 91 #define REMAP_ORDER_CBA ( 1 << 2 )
khuang 0:06f42dd3eab3 92
khuang 0:06f42dd3eab3 93 #define REMAP_SCAN_UP_TO_DOWN ( 0 )
khuang 0:06f42dd3eab3 94 #define REMAP_SCAN_DOWN_TO_UP ( 1 << 4 )
khuang 0:06f42dd3eab3 95
khuang 0:06f42dd3eab3 96 #define REMAP_COM_SPLIT_ODD_EVEN_DIS ( 0 )
khuang 0:06f42dd3eab3 97 #define REMAP_COM_SPLIT_ODD_EVEN_EN ( 1 << 5 )
khuang 0:06f42dd3eab3 98
khuang 0:06f42dd3eab3 99 #define REMAP_COLOR_RGB565 ( 1 << 6 )
khuang 0:06f42dd3eab3 100
khuang 0:06f42dd3eab3 101 #define OLED_REMAP_SETTINGS ( REMAP_ORDER_ABC | REMAP_COM_SPLIT_ODD_EVEN_EN | REMAP_COLOR_RGB565 | REMAP_COLUMNS_LEFT_TO_RIGHT | REMAP_SCAN_UP_TO_DOWN | REMAP_HORIZONTAL_INCREMENT )
khuang 0:06f42dd3eab3 102
khuang 0:06f42dd3eab3 103 /**
khuang 0:06f42dd3eab3 104 * macros
khuang 0:06f42dd3eab3 105 */
khuang 0:06f42dd3eab3 106
khuang 0:06f42dd3eab3 107 #define OLED_SwapMe(x) x = ( ( x & 0xFF00 ) >> 8 ) | ( ( x & 0x00FF ) << 8 )
khuang 0:06f42dd3eab3 108 #define OLED_AdjustRowOffset(y) y += OLED_ROW_OFFSET
khuang 0:06f42dd3eab3 109 #define OLED_AdjustColumnOffset(x) x += OLED_COLUMN_OFFSET
khuang 0:06f42dd3eab3 110
khuang 0:06f42dd3eab3 111 #define BMP_SkipHeader( imgPtr ) ( (const uint8_t*)(imgPtr) + BMP_HEADER_BYTE_SIZE )
khuang 0:06f42dd3eab3 112
khuang 0:06f42dd3eab3 113
khuang 0:06f42dd3eab3 114 #define CheckLimits( x, y, w, h ) ( ( ( x + w - 1 ) > OLED_SCREEN_WIDTH ) || ( x < 0 ) || ( ( y + h - 1 ) > OLED_SCREEN_HEIGHT ) || ( y < 0 ) )
khuang 0:06f42dd3eab3 115 #define AreCoordsValid( x, y, w, h ) ( 0 == CheckLimits( x, y, w ,h ) )
khuang 0:06f42dd3eab3 116 #define AreCoordsNotValid( x, y, w, h ) ( 0 != CheckLimits( x, y, w, h ) )
khuang 0:06f42dd3eab3 117
khuang 0:06f42dd3eab3 118
khuang 0:06f42dd3eab3 119 /**
khuang 0:06f42dd3eab3 120 * set start/end column/row
khuang 0:06f42dd3eab3 121 * the 2nd and 3rd byte represent the start and the end address, respectively
khuang 0:06f42dd3eab3 122 */
khuang 0:06f42dd3eab3 123 #define OLED_CMD_SET_COLUMN ( 0x15 )
khuang 0:06f42dd3eab3 124 #define OLED_CMD_SET_ROW ( 0x75 )
khuang 0:06f42dd3eab3 125
khuang 0:06f42dd3eab3 126 /**
khuang 0:06f42dd3eab3 127 * scanning direction
khuang 0:06f42dd3eab3 128 */
khuang 0:06f42dd3eab3 129
khuang 0:06f42dd3eab3 130 #define OLED_DIRECTION_HORIZONTAL (0)
khuang 0:06f42dd3eab3 131 #define OLED_DIRECTION_VERTICAL (1)
khuang 0:06f42dd3eab3 132
khuang 0:06f42dd3eab3 133 /**
khuang 0:06f42dd3eab3 134 * SPI-related
khuang 0:06f42dd3eab3 135 */
khuang 0:06f42dd3eab3 136
khuang 0:06f42dd3eab3 137 #define OLED_SPI_CHUNK (511)
khuang 0:06f42dd3eab3 138
khuang 0:06f42dd3eab3 139 /**
khuang 0:06f42dd3eab3 140 * set display
khuang 0:06f42dd3eab3 141 */
khuang 0:06f42dd3eab3 142 #define OLED_CMD_SET_DISPLAY_MODE_ALL_OFF (0xA4)
khuang 0:06f42dd3eab3 143 #define OLED_CMD_SET_DISPLAY_MODE_ALL_ON (0xA5)
khuang 0:06f42dd3eab3 144 #define OLED_CMD_SET_DISPLAY_MODE_NORMAL (0xA6)
khuang 0:06f42dd3eab3 145 #define OLED_CMD_SET_DISPLAY_MODE_INVERSE (0xA7)
khuang 0:06f42dd3eab3 146
khuang 0:06f42dd3eab3 147 /**
khuang 0:06f42dd3eab3 148 * set lock command
khuang 0:06f42dd3eab3 149 * the locked OLED driver MCU interface prohibits all commands
khuang 0:06f42dd3eab3 150 * and memory access, except the 0xFD command
khuang 0:06f42dd3eab3 151 */
khuang 0:06f42dd3eab3 152 #define OLED_CMD_SET_CMD_LOCK ( 0xFD /* << 8 */ )
khuang 0:06f42dd3eab3 153 // unlock OLED driver MCU interface for entering command (default upon reset)
khuang 0:06f42dd3eab3 154 #define OLED_UNLOCK (0x12)
khuang 0:06f42dd3eab3 155 // lock OLED driver MCU interface for entering command
khuang 0:06f42dd3eab3 156 #define OLED_LOCK (0x16)
khuang 0:06f42dd3eab3 157 // commands 0xA2, 0xB1, 0xB3, 0xBB, 0xBE, 0xC1 are inaccessible in both lock and unlock state (default upon reset)
khuang 0:06f42dd3eab3 158 #define OLED_ACC_TO_CMD_NO (0xB0)
khuang 0:06f42dd3eab3 159 // commands 0xA2, 0xB1, 0xB3, 0xBB, 0xBE, 0xC1 are accessible in unlock state
khuang 0:06f42dd3eab3 160 #define OLED_ACC_TO_CMD_YES (0xB1)
khuang 0:06f42dd3eab3 161
khuang 0:06f42dd3eab3 162 /**
khuang 0:06f42dd3eab3 163 * NOP
khuang 0:06f42dd3eab3 164 */
khuang 0:06f42dd3eab3 165 #define OLED_CMD_NOP (0xD1) // also, 0xE3
khuang 0:06f42dd3eab3 166
khuang 0:06f42dd3eab3 167 /**
khuang 0:06f42dd3eab3 168 * set MUX ratio
khuang 0:06f42dd3eab3 169 */
khuang 0:06f42dd3eab3 170 #define OLED_CMD_SET_MUX_RATIO (0xCA)
khuang 0:06f42dd3eab3 171
khuang 0:06f42dd3eab3 172 /**
khuang 0:06f42dd3eab3 173 * set re-map / color depth
khuang 0:06f42dd3eab3 174 */
khuang 0:06f42dd3eab3 175 #define OLED_CMD_SET_REMAP ( 0xA0 )
khuang 0:06f42dd3eab3 176
khuang 0:06f42dd3eab3 177 // set horisontal or vertical increment
khuang 0:06f42dd3eab3 178 #define OLED_ADDR_INC_HOR (0x00)
khuang 0:06f42dd3eab3 179 #define OLED_ADDR_INC_VER (0x01)
khuang 0:06f42dd3eab3 180
khuang 0:06f42dd3eab3 181 // column address mapping
khuang 0:06f42dd3eab3 182 #define OLED_COLUMN_ADDR_REMAP_0_TO_SEG0 (0x00)
khuang 0:06f42dd3eab3 183 #define OLED_COLUMN_ADDR_REMAP_127_TO_SEG0 (0x02)
khuang 0:06f42dd3eab3 184
khuang 0:06f42dd3eab3 185 // color sequence order
khuang 0:06f42dd3eab3 186 #define OLED_COLOR_SEQ_A_B_C (0x00)
khuang 0:06f42dd3eab3 187 #define OLED_COLOR_SEQ_C_B_A (0x04)
khuang 0:06f42dd3eab3 188
khuang 0:06f42dd3eab3 189 // scanning order (MR == MUX ratio)
khuang 0:06f42dd3eab3 190 #define OLED_SCAN_FROM_COM_0_TO_MR (0x00)
khuang 0:06f42dd3eab3 191 #define OLED_SCAN_FROM_COM_MR_TO_0 (0x10)
khuang 0:06f42dd3eab3 192
khuang 0:06f42dd3eab3 193 // COM splitting to odd and even
khuang 0:06f42dd3eab3 194 #define OLED_COM_SPLIT_DISABLE (0x00)
khuang 0:06f42dd3eab3 195 #define OLED_COM_SPLIT_ENABLE (0x20)
khuang 0:06f42dd3eab3 196
khuang 0:06f42dd3eab3 197 // screen color depth
khuang 0:06f42dd3eab3 198 #define OLED_COLOR_DEPTH_256 (0x00)
khuang 0:06f42dd3eab3 199 #define OLED_COLOR_DEPTH_65K (0x40)
khuang 0:06f42dd3eab3 200 #define OLED_COLOR_DEPTH_262K_1 (0x80)
khuang 0:06f42dd3eab3 201 #define OLED_COLOR_DEPTH_262K_2 (0xC0)
khuang 0:06f42dd3eab3 202
khuang 0:06f42dd3eab3 203 /**
khuang 0:06f42dd3eab3 204 * set reset (phase 1) / pre-charge (phase 2) period in [DCLK]
khuang 0:06f42dd3eab3 205 * this command is locked by command 0xFD by default
khuang 0:06f42dd3eab3 206 */
khuang 0:06f42dd3eab3 207 #define OLED_CMD_SET_RESET_AND_PRECHARGE_PERIOD (0xB1)
khuang 0:06f42dd3eab3 208
khuang 0:06f42dd3eab3 209 #define OLED_RESET_PERIOD_5 (0x02)
khuang 0:06f42dd3eab3 210 #define OLED_RESET_PERIOD_7 (0x03)
khuang 0:06f42dd3eab3 211 #define OLED_RESET_PERIOD_9 (0x04)
khuang 0:06f42dd3eab3 212 #define OLED_RESET_PERIOD_11 (0x05)
khuang 0:06f42dd3eab3 213 #define OLED_RESET_PERIOD_13 (0x06)
khuang 0:06f42dd3eab3 214 #define OLED_RESET_PERIOD_15 (0x07)
khuang 0:06f42dd3eab3 215 #define OLED_RESET_PERIOD_17 (0x08)
khuang 0:06f42dd3eab3 216 #define OLED_RESET_PERIOD_19 (0x09)
khuang 0:06f42dd3eab3 217 #define OLED_RESET_PERIOD_21 (0x0A)
khuang 0:06f42dd3eab3 218 #define OLED_RESET_PERIOD_23 (0x0B)
khuang 0:06f42dd3eab3 219 #define OLED_RESET_PERIOD_25 (0x0C)
khuang 0:06f42dd3eab3 220 #define OLED_RESET_PERIOD_27 (0x0D)
khuang 0:06f42dd3eab3 221 #define OLED_RESET_PERIOD_29 (0x0E)
khuang 0:06f42dd3eab3 222 #define OLED_RESET_PERIOD_31 (0x0F)
khuang 0:06f42dd3eab3 223
khuang 0:06f42dd3eab3 224 #define OLED_PRECHARGE_PERIOD_3 (0x03)
khuang 0:06f42dd3eab3 225 #define OLED_PRECHARGE_PERIOD_4 (0x04)
khuang 0:06f42dd3eab3 226 #define OLED_PRECHARGE_PERIOD_5 (0x05)
khuang 0:06f42dd3eab3 227 #define OLED_PRECHARGE_PERIOD_6 (0x06)
khuang 0:06f42dd3eab3 228 #define OLED_PRECHARGE_PERIOD_7 (0x07)
khuang 0:06f42dd3eab3 229 #define OLED_PRECHARGE_PERIOD_8 (0x08)
khuang 0:06f42dd3eab3 230 #define OLED_PRECHARGE_PERIOD_9 (0x09)
khuang 0:06f42dd3eab3 231 #define OLED_PRECHARGE_PERIOD_10 (0x0A)
khuang 0:06f42dd3eab3 232 #define OLED_PRECHARGE_PERIOD_11 (0x0B)
khuang 0:06f42dd3eab3 233 #define OLED_PRECHARGE_PERIOD_12 (0x0C)
khuang 0:06f42dd3eab3 234 #define OLED_PRECHARGE_PERIOD_13 (0x0D)
khuang 0:06f42dd3eab3 235 #define OLED_PRECHARGE_PERIOD_14 (0x0E)
khuang 0:06f42dd3eab3 236 #define OLED_PRECHARGE_PERIOD_15 (0x0F)
khuang 0:06f42dd3eab3 237
khuang 0:06f42dd3eab3 238 /**
khuang 0:06f42dd3eab3 239 * set front clock divider (divset) / oscillator frequency
khuang 0:06f42dd3eab3 240 * this command is locked by command 0xFD by default
khuang 0:06f42dd3eab3 241 */
khuang 0:06f42dd3eab3 242 #define OLED_CMD_SET_OSC_FREQ_AND_CLOCKDIV (0xB3)
khuang 0:06f42dd3eab3 243
khuang 0:06f42dd3eab3 244 // clock divider
khuang 0:06f42dd3eab3 245 #define OLED_CLOCKDIV_1 (0x00)
khuang 0:06f42dd3eab3 246 #define OLED_CLOCKDIV_2 (0x01)
khuang 0:06f42dd3eab3 247 #define OLED_CLOCKDIV_4 (0x02)
khuang 0:06f42dd3eab3 248 #define OLED_CLOCKDIV_8 (0x03)
khuang 0:06f42dd3eab3 249 #define OLED_CLOCKDIV_16 (0x04)
khuang 0:06f42dd3eab3 250 #define OLED_CLOCKDIV_32 (0x05)
khuang 0:06f42dd3eab3 251 #define OLED_CLOCKDIV_64 (0x06)
khuang 0:06f42dd3eab3 252 #define OLED_CLOCKDIV_128 (0x07)
khuang 0:06f42dd3eab3 253 #define OLED_CLOCKDIV_256 (0x08)
khuang 0:06f42dd3eab3 254 #define OLED_CLOCKDIV_512 (0x09)
khuang 0:06f42dd3eab3 255 #define OLED_CLOCKDIV_1024 (0x0A)
khuang 0:06f42dd3eab3 256
khuang 0:06f42dd3eab3 257 // oscillator frequency, frequency increases as level increases
khuang 0:06f42dd3eab3 258 #define OLED_OSC_FREQ (0xB0)
khuang 0:06f42dd3eab3 259
khuang 0:06f42dd3eab3 260 #define OLED_CMD_STARTLINE (0xA1)
khuang 0:06f42dd3eab3 261
khuang 0:06f42dd3eab3 262 #define OLED_CMD_WRITERAM (0x5C)
khuang 0:06f42dd3eab3 263 #define OLED_CMD_READRAM (0x5D)
khuang 0:06f42dd3eab3 264 #define OLED_CMD_DISPLAYOFFSET (0xA2)
khuang 0:06f42dd3eab3 265 #define OLED_CMD_DISPLAYALLOFF (0xA4)
khuang 0:06f42dd3eab3 266 #define OLED_CMD_DISPLAYALLON (0xA5)
khuang 0:06f42dd3eab3 267 #define OLED_CMD_NORMALDISPLAY (0xA6)
khuang 0:06f42dd3eab3 268 #define OLED_CMD_INVERTDISPLAY (0xA7)
khuang 0:06f42dd3eab3 269 #define OLED_CMD_FUNCTIONSELECT (0xAB)
khuang 0:06f42dd3eab3 270 #define OLED_CMD_DISPLAYOFF (0xAE)
khuang 0:06f42dd3eab3 271 #define OLED_CMD_DISPLAYON (0xAF)
khuang 0:06f42dd3eab3 272 #define OLED_CMD_PRECHARGE (0xB1)
khuang 0:06f42dd3eab3 273 #define OLED_CMD_DISPLAYENHANCE (0xB2)
khuang 0:06f42dd3eab3 274 #define OLED_CMD_SETVSL (0xB4)
khuang 0:06f42dd3eab3 275 #define OLED_CMD_SETGPIO (0xB5)
khuang 0:06f42dd3eab3 276 #define OLED_CMD_PRECHARGE2 (0xB6)
khuang 0:06f42dd3eab3 277 #define OLED_CMD_SETGRAY (0xB8)
khuang 0:06f42dd3eab3 278 #define OLED_CMD_USELUT (0xB9)
khuang 0:06f42dd3eab3 279 #define OLED_CMD_PRECHARGELEVEL (0xBB)
khuang 0:06f42dd3eab3 280 #define OLED_CMD_VCOMH (0xBE)
khuang 0:06f42dd3eab3 281 #define OLED_CMD_CONTRASTABC (0xC1)
khuang 0:06f42dd3eab3 282 #define OLED_CMD_CONTRASTMASTER (0xC7)
khuang 0:06f42dd3eab3 283 #define OLED_CMD_MUXRATIO (0xCA)
khuang 0:06f42dd3eab3 284 #define OLED_CMD_COMMANDLOCK (0xFD)
khuang 0:06f42dd3eab3 285 #define OLED_CMD_HORIZSCROLL (0x96)
khuang 0:06f42dd3eab3 286 #define OLED_CMD_STOPSCROLL (0x9E)
khuang 0:06f42dd3eab3 287 #define OLED_CMD_STARTSCROLL (0x9F)
khuang 0:06f42dd3eab3 288
khuang 0:06f42dd3eab3 289 #endif
khuang 1:3b5be0ee5f0c 290