Smart

Dependencies:   Hexi_KW40Z

Committer:
Team_Eta_MBED
Date:
Wed Feb 28 16:34:40 2018 +0000
Revision:
0:69293b19ee19
Smart Baby Monitor Foundations

Who changed what in which revision?

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