Created
July 21, 2015 05:49
-
-
Save AlexanderSavochkin/5ac4921e5c30b50caee1 to your computer and use it in GitHub Desktop.
Arduino ColorShield API description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//В заголовочном файле Colorduino.h определяется структура pixelRGB, | |
typedef struct pixelRGB { | |
unsigned char r; | |
unsigned char g; | |
unsigned char b; | |
} PixelRGB; | |
//...а так же класс ColorduinoObject, | |
class ColorduinoObject { | |
... | |
}; | |
//... и декларируется глобальный объект Colorduino, через который можно управлять индикатором | |
extern ColorduinoObject Colorduino; | |
//... | |
//Инициализируем индикатор | |
Colorduino.Init(); | |
//Меняем местами экранный и внеэкранный буфер | |
Colorduino.FlipPage(); | |
//Получить указатель на пиксель во внеэкранном буфере. | |
//Можно по этому указателю записывать | |
PixelRGB *p = Colorduino.GetPixel(unsigned char x,unsigned char y); | |
//Получить значение пикселя из отображаемого кадрового буфера | |
PixelRGB *p = Colorduino.GetDrawPixel(unsigned char x,unsigned char y); | |
//Записать пиксель во внеэкранный буфер | |
void Colorduino.SetPixel(unsigned char x, unsigned char y, unsigned char r, unsigned char g, unsigned char b); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment