/***************************************************************************** * | File : OLED_Driver.h * | Author : Waveshare team * | Function : 0.95inch RGB OLED Module Drive function * | Info : *---------------- * | This version: V2.0 * | Date : 2020-08-20 * | Info : * ----------------------------------------------------------------------------- # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documnetation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # ******************************************************************************/ #ifndef __OLED_DRIVER_H #define __OLED_DRIVER_H #include "DEV_Config.h" #define DRAW_LINE 0x21 #define DRAW_RECTANGLE 0x22 #define COPY_WINDOW 0x23 #define DIM_WINDOW 0x24 #define CLEAR_WINDOW 0x25 #define FILL_WINDOW 0x26 #define DISABLE_FILL 0x00 #define ENABLE_FILL 0x01 #define CONTINUOUS_SCROLLING_SETUP 0x27 #define DEACTIVE_SCROLLING 0x2E #define ACTIVE_SCROLLING 0x2F #define SET_COLUMN_ADDRESS 0x15 #define SET_ROW_ADDRESS 0x75 #define SET_CONTRAST_A 0x81 #define SET_CONTRAST_B 0x82 #define SET_CONTRAST_C 0x83 #define MASTER_CURRENT_CONTROL 0x87 #define SET_PRECHARGE_SPEED_A 0x8A #define SET_PRECHARGE_SPEED_B 0x8B #define SET_PRECHARGE_SPEED_C 0x8C #define SET_REMAP 0xA0 #define SET_DISPLAY_START_LINE 0xA1 #define SET_DISPLAY_OFFSET 0xA2 #define NORMAL_DISPLAY 0xA4 #define ENTIRE_DISPLAY_ON 0xA5 #define ENTIRE_DISPLAY_OFF 0xA6 #define INVERSE_DISPLAY 0xA7 #define SET_MULTIPLEX_RATIO 0xA8 #define DIM_MODE_SETTING 0xAB #define SET_MASTER_CONFIGURE 0xAD #define DIM_MODE_DISPLAY_ON 0xAC #define DISPLAY_OFF 0xAE #define NORMAL_BRIGHTNESS_DISPLAY_ON 0xAF #define POWER_SAVE_MODE 0xB0 #define PHASE_PERIOD_ADJUSTMENT 0xB1 #define DISPLAY_CLOCK_DIV 0xB3 #define SET_GRAy_SCALE_TABLE 0xB8 #define ENABLE_LINEAR_GRAY_SCALE_TABLE 0xB9 #define SET_PRECHARGE_VOLTAGE 0xBB #define SET_V_VOLTAGE 0xBE /******************************************************************************** function: Define the full screen height length of the display ********************************************************************************/ #define OLED_0in95_RGB_WIDTH 96 //OLED width #define OLED_0in95_RGB_HEIGHT 64 //OLED height void OLED_0in95_rgb_Init(void); void OLED_0in95_rgb_Clear(void); void OLED_0in95_rgb_Set_Point(UBYTE Xpoint, UBYTE Ypoint, UWORD Color); void OLED_0in95_rgb_Display(const UBYTE *Image); #endif