PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Display
liboledc
oledc_setRotation.c
1
/*
2
* @file oledc_setRotation.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 bitmap driver, 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
18
#include "oledc.h"
19
20
char
TFTROTATION = 2;
21
int
_width;
22
int
_height;
23
24
void
oledc_setRotation(
char
x
)
25
{
26
while
(oledc_screenLock());
27
oledc_screenLockSet();
28
29
TFTROTATION = (
x
& 3);
30
switch
(TFTROTATION) {
31
case
0:
32
case
2:
33
_width = TFTWIDTH;
34
_height = TFTHEIGHT;
35
break
;
36
case
1:
37
case
3:
38
_width = TFTHEIGHT;
39
_height = TFTWIDTH;
40
break
;
41
}
42
oledc_screenLockClr();
43
}
44
45
// Parts of this file are from the Adafruit GFX arduino library
46
47
/***************************************************
48
This is a library for the 0.96" 16-bit Color OLED with SSD1331 driver chip
49
Pick one up today in the adafruit shop!
50
------> http://www.adafruit.com/products/684
51
These displays use SPI to communicate, 4 or 5 pins are required to
52
interface
53
Adafruit invests time and resources providing this open source code,
54
please support Adafruit and open-source hardware by purchasing
55
products from Adafruit!
56
Written by Limor Fried/Ladyada for Adafruit Industries.
57
BSD license, all text above must be included in any redistribution
58
****************************************************/
59
x
int x
Definition:
07 Box and Lines.c:13
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17