PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Display
liboledc
oledc_color565.c
1
/*
2
* @file oledc_color565.c
3
*
4
* @author Matthew Matz
5
*
6
* @version 0.9
7
*
8
* @copyright Copyright (C) Parallax, Inc. 2016. See end of file for
9
* terms of use (MIT License).
10
*
11
* @brief 0.96-inch RGB OLED display driver component, see oledc_h. for documentation.
12
*
13
* @detail Please submit bug reports, suggestions, and improvements to
14
* this code to editor@parallax.com.
15
*/
16
17
#include "oledc.h"
18
19
unsigned
int
oledc_color565(
char
r,
char
g,
char
b) {
20
unsigned
int
c;
21
c = r >> 3;
22
c <<= 6;
23
c |= g >> 2;
24
c <<= 5;
25
c |= b >> 3;
26
27
return
c;
28
}
29
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17