PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Display
liboledc
oledc_goTo.c
1
/*
2
* @file oledc_goTo.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
oledc_goTo(
int
x
,
int
y) {
21
if
((
x
>= TFTWIDTH) || (y >= TFTHEIGHT) || (
x
< 0) || (y < 0))
return
0;
22
23
// set x and y coordinates
24
oledc_writeCommand(SSD1331_CMD_SETCOLUMN, 0);
25
oledc_writeCommand(
x
, 0);
26
oledc_writeCommand(TFTWIDTH - 1, 0);
27
28
oledc_writeCommand(SSD1331_CMD_SETROW, 0);
29
oledc_writeCommand(y, 0);
30
oledc_writeCommand(TFTHEIGHT - 1, 0);
31
return
1;
32
}
33
34
// Parts of this file are from the Adafruit GFX arduino library
35
36
/***************************************************
37
This is a library for the 0.96" 16-bit Color OLED with SSD1331 driver chip
38
Pick one up today in the adafruit shop!
39
------> http://www.adafruit.com/products/684
40
These displays use SPI to communicate, 4 or 5 pins are required to
41
interface
42
Adafruit invests time and resources providing this open source code,
43
please support Adafruit and open-source hardware by purchasing
44
products from Adafruit!
45
Written by Limor Fried/Ladyada for Adafruit Industries.
46
BSD license, all text above must be included in any redistribution
47
****************************************************/
48
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