Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
ipstft19.h
Go to the documentation of this file.
1/*
2 * This file is part of the Ultibo project, https://ultibo.org/
3 *
4 * The MIT License (MIT)
5 *
6 * Copyright (c) 2026 Garry Wood <garry@softoz.com.au>
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 */
26#ifndef _ULTIBO_IPSTFT19_H
27#define _ULTIBO_IPSTFT19_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include "ultibo/gpio.h"
34#include "ultibo/spi.h"
35#include "ultibo/framebuffer.h"
36
38#define IPSTFT19_FRAMEBUFFER_DESCRIPTION "Adafruit 1.9\" IPS TFT"
39
40#define IPSTFT19_SIGNATURE 0xAF000019
41
42#define IPSTFT19_SCREEN_WIDTH 170
43#define IPSTFT19_SCREEN_HEIGHT 320
44#define IPSTFT19_COLSTART 35
45#define IPSTFT19_DEFAULT_ROTATION FRAMEBUFFER_ROTATION_90
46
48#define IPSTFT19_LCD_DC GPIO_PIN_25
49#define IPSTFT19_LCD_RST GPIO_PIN_27
50#define IPSTFT19_LCD_BL GPIO_PIN_18
51
62
64
74HANDLE STDCALL ipstft19_start(uint32_t rotation, char *device, uint16_t displayselect);
75
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif // _ULTIBO_IPSTFT19_H
struct _FRAMEBUFFER_DEVICE FRAMEBUFFER_DEVICE
Definition framebuffer.h:112
size_t HANDLE
Definition globaltypes.h:51
#define STDCALL
Definition globaltypes.h:45
_Bool BOOL
Built in Boolean type (1 byte) (Redeclared here for flexibility).
Definition globaltypes.h:55
struct _GPIO_DEVICE GPIO_DEVICE
Forward declared for GPIOPin.
Definition gpio.h:85
BOOL STDCALL ipstft19_stop(HANDLE handle)
Stop the IPSTFT19 driver and Framebuffer device associated with the display.
HANDLE STDCALL ipstft19_start(uint32_t rotation, char *device, uint16_t displayselect)
Start the IPSTFT19 driver and Framebuffer device associated with the display.
struct _IPSTFT19LCD IPSTFT19LCD
Definition ipstft19.h:53
struct _SPI_DEVICE SPI_DEVICE
Definition spi.h:108
Definition ipstft19.h:55
GPIO_DEVICE * gpio
GPIO device for this display.
Definition ipstft19.h:59
FRAMEBUFFER_DEVICE * framebuffer
Framebuffer (ST7789) device for this display.
Definition ipstft19.h:60
uint32_t signature
Signature for entry validation.
Definition ipstft19.h:56
uint32_t rotation
Framebuffer rotation (eg FRAMEBUFFER_ROTATION_180).
Definition ipstft19.h:57
SPI_DEVICE * spi
SPI device for this display.
Definition ipstft19.h:58