Описание библиотеки микросхемы 5023ВС016 процессора "Спутник"
Макросы | Функции | Переменные
Файл SSD1306.c

This file includes the OLED driver for SSD1306 display module. Подробнее...

#include "SSD1306.h"

См. исходные тексты.

Макросы

#define MAX_CHAR_POSX   122
 
#define MAX_CHAR_POSY   58
 

Функции

uint8_t SPI_WriteByte (uint8_t TxData, uint8_t Cmd)
 
void Delay_us (uint32_t Time)
 Inserts a delay time. Подробнее...
 
void OLED_WriteByte (uint8_t Data, uint8_t Cmd)
 writes an byte to OLED Подробнее...
 
void OLED_SetPos (uint8_t X, uint8_t Y)
 sets the positions of the character that will be displayed. Подробнее...
 
void OLED_DisplayOn (void)
 Enables the Display. Подробнее...
 
void OLED_DisplayOff (void)
 Disables the Display. Подробнее...
 
void OLED_Refresh_Gram (void)
 refresh the GDDRAM Подробнее...
 
void OLED_ClearDisplay (void)
 Clears the hole OLED. Подробнее...
 
void OLED_SetDisplay (void)
 
void OLED_DrawPoint (uint8_t X, uint8_t Y, uint8_t Fill)
 Displays a pixel. Подробнее...
 
void OLED_Fill (uint8_t X1, uint8_t Y1, uint8_t X2, uint8_t Y2, uint8_t Dot)
 Dispalys a full rectangle. Подробнее...
 
void OLED_View (uint8_t X1, uint8_t Y1, uint8_t X2, uint8_t Y2, const uint8_t Image[])
 
void OLED_ShowChar (uint8_t X, uint8_t Y, uint8_t Chr, uint8_t Size, uint8_t Mode)
 Displays one character. Подробнее...
 
void OLED_ShowString (uint8_t X, uint8_t Y, const uint8_t *Str)
 Displays a string on the OLED. Подробнее...
 
void OLED_SetPageAddress (uint32_t PageOffSet)
 
void OLED_StartLine (uint32_t StartLine)
 
void OLED_OffSet (uint32_t OffSet)
 
void OLED_SetDisplayEnable (bool TurnOn)
 
void OLED_SetHorizontalScroll (SCROL_MODE Mode)
 
void OLED_Init (void)
 initializes the OLED. Подробнее...
 

Переменные

uint8_t OLED_GRAM [128][8]
 

Подробное описание

This file includes the OLED driver for SSD1306 display module.

Автор
Waveshare Team
Версия
V1.0
Дата
19-July-2017
Внимание

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, WAVESHARE SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2014 Waveshare

См. определение в файле SSD1306.c

Макросы

§ MAX_CHAR_POSX

#define MAX_CHAR_POSX   122

§ MAX_CHAR_POSY

#define MAX_CHAR_POSY   58

Функции

§ Delay_us()

void Delay_us ( uint32_t  Time)

Inserts a delay time.

Аргументы
Timespecifies the delay time length
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 49

§ OLED_ClearDisplay()

void OLED_ClearDisplay ( void  )

Clears the hole OLED.

Аргументы
None
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 151

§ OLED_DisplayOff()

void OLED_DisplayOff ( void  )

Disables the Display.

Аргументы
None
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 111

§ OLED_DisplayOn()

void OLED_DisplayOn ( void  )

Enables the Display.

Аргументы
None
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 96

§ OLED_DrawPoint()

void OLED_DrawPoint ( uint8_t  X,
uint8_t  Y,
uint8_t  Fill 
)

Displays a pixel.

Аргументы
Xpixel x.
Xpixel y.
Fillwheher recerses the point. This paramter can ba one of following value;
  • Fill: where Fill can be 0 or 1
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 190

§ OLED_Fill()

void OLED_Fill ( uint8_t  X1,
uint8_t  Y1,
uint8_t  X2,
uint8_t  Y2,
uint8_t  Dot 
)

Dispalys a full rectangle.

Аргументы
X1specifies the upper left corner X position of the rectangle
Y1specifies the upper left corner Y position of the rectangle
X2specifies the lower right corner X positon of the rectangle
Y2specifies the lower right corner Y positon of the rectangle
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 220

§ OLED_Init()

void OLED_Init ( void  )

initializes the OLED.

Аргументы
None
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 401

§ OLED_OffSet()

void OLED_OffSet ( uint32_t  OffSet)

См. определение в файле SSD1306.c строка 340

§ OLED_Refresh_Gram()

void OLED_Refresh_Gram ( void  )

refresh the GDDRAM

Аргументы
None
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 126

§ OLED_SetDisplay()

void OLED_SetDisplay ( void  )

См. определение в файле SSD1306.c строка 164

§ OLED_SetDisplayEnable()

void OLED_SetDisplayEnable ( bool  TurnOn)

См. определение в файле SSD1306.c строка 347

§ OLED_SetHorizontalScroll()

void OLED_SetHorizontalScroll ( SCROL_MODE  Mode)

См. определение в файле SSD1306.c строка 351

§ OLED_SetPageAddress()

void OLED_SetPageAddress ( uint32_t  PageOffSet)

См. определение в файле SSD1306.c строка 326

§ OLED_SetPos()

void OLED_SetPos ( uint8_t  X,
uint8_t  Y 
)

sets the positions of the character that will be displayed.

Аргументы
Xspecifies the X position.
Yspecifies the Y position.
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 80

§ OLED_ShowChar()

void OLED_ShowChar ( uint8_t  X,
uint8_t  Y,
uint8_t  Chr,
uint8_t  Size,
uint8_t  Mode 
)

Displays one character.

Аргументы
XThis parameter can be one of the following values:
  • X: where x can be 0..127
YThis parameter can be one of the following values:
  • Y: where y can be 0..63
Chrcharacter ascii code,must be between 0x20 and 0x7e.
Sizespecifies the size of the font(12 or 16)
Modewhether reverses the character This paramter can be one of following value;
  • Mode: where Mode can be 0 or 1
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 255

§ OLED_ShowString()

void OLED_ShowString ( uint8_t  X,
uint8_t  Y,
const uint8_t *  Str 
)

Displays a string on the OLED.

Аргументы
Xspecifies X position at which a string will be to display
Yspecifies Y position at which a string will be to display
Strpointer to a string to dispaly on OLED.
Возвращаемые значения
None

См. определение в файле SSD1306.c строка 301

§ OLED_StartLine()

void OLED_StartLine ( uint32_t  StartLine)

См. определение в файле SSD1306.c строка 333

§ OLED_View()

void OLED_View ( uint8_t  X1,
uint8_t  Y1,
uint8_t  X2,
uint8_t  Y2,
const uint8_t  Image[] 
)

См. определение в файле SSD1306.c строка 232

§ OLED_WriteByte()

void OLED_WriteByte ( uint8_t  Data,
uint8_t  Cmd 
)

writes an byte to OLED

Аргументы
Datathe Data will be write to OLED
Cmdthe Cmd determines the Data is acted as a command or a data.
  • 0: specifies the Data is a command which will be write to command reister.
  • 0: specifies the Data is a data which will be stored at the GDDRAM.
Возвращаемые значения

См. определение в файле SSD1306.c строка 66

§ SPI_WriteByte()

uint8_t SPI_WriteByte ( uint8_t  TxData,
uint8_t  Cmd 
)

См. определение в файле SSD1306.c строка 28

Переменные

§ OLED_GRAM

uint8_t OLED_GRAM[128][8]

См. определение в файле SSD1306.c строка 26