PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Display
libil3820
il3820_drawPixel.c
1
/*
2
* @file il3820_drawPixel.c
3
*
4
* @author Matthew Matz & Roy Eltham
5
*
6
* @version 0.5
7
*
8
* @copyright Copyright (C) Parallax, Inc. 2018. See end of file for
9
* terms of use (MIT License).
10
*
11
* @brief Waveshare ePaper display driver component, see il3820_h. for documentation.
12
*
13
* @detail Please submit bug reports, suggestions, and improvements to
14
* this code to editor@parallax.com.
15
*/
16
17
18
#include "il3820.h"
19
20
void
il3820_drawPixel(
screen
*dev,
int
x
,
int
y,
int
color)
21
{
22
switch
(color) {
23
case
WHITE
:
24
dev->image_ptr[(
x
+ y * dev->width) >> 3] |= 0x80 >> (
x
& 7);
25
break
;
26
case
BLACK:
27
dev->image_ptr[(
x
+ y * dev->width) >> 3] &= ~(0x80 >> (
x
& 7));
28
break
;
29
case
INVERSE:
30
dev->image_ptr[(
x
+ y * dev->width) >> 3] ^= 0x80 >> (
x
& 7);
31
break
;
32
}
33
}
34
35
36
WHITE
#define WHITE
For setting an RGB LED's color to white. Examples: rgb(L, WHITE) sets the left RGB LED white....
Definition:
badgetools.h:152
x
int x
Definition:
07 Box and Lines.c:13
screen
Definition:
badgetools.h:1709
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17