Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
lcda35.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_LCDA35_H
27#define _ULTIBO_LCDA35_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include "ultibo/gpio.h"
34#include "ultibo/spi.h"
35#include "ultibo/pwm.h"
36#include "ultibo/framebuffer.h"
37#include "ultibo/touch.h"
38
40#define LCDA35_FRAMEBUFFER_DESCRIPTION "Waveshare RPi LCD(A) 3.5\""
41
42#define LCDA35_SIGNATURE 0xAF000A35
43
44#define LCDA35_SCREEN_WIDTH 320
45#define LCDA35_SCREEN_HEIGHT 480
46
48#define LCDA35_LCD_DC GPIO_PIN_24
49#define LCDA35_LCD_RST GPIO_PIN_25
50#define LCDA35_LCD_BL GPIO_PIN_UNKNOWN
51
52#define LCDA35_TOUCH_IRQ GPIO_PIN_17
53
55typedef struct _LCDA35LCD LCDA35LCD;
67
69
80HANDLE STDCALL lcda35_start(uint32_t rotation, char *device, uint16_t displayselect, uint16_t touchselect);
81
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif // _ULTIBO_LCDA35_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
struct _LCDA35LCD LCDA35LCD
Definition lcda35.h:55
BOOL STDCALL lcda35_stop(HANDLE handle)
Stop the LCDA35 driver and deregister the Touch and Framebuffer devices associated with the display.
HANDLE STDCALL lcda35_start(uint32_t rotation, char *device, uint16_t displayselect, uint16_t touchselect)
Start the LCDA35 driver and register the Touch and Framebuffer devices associated with the display.
struct _SPI_DEVICE SPI_DEVICE
Definition spi.h:108
Definition lcda35.h:57
GPIO_DEVICE * gpio
GPIO device for this display.
Definition lcda35.h:62
uint32_t direction
Framebuffer direction (eg FRAMEBUFFER_DIRECTION_REVERSE).
Definition lcda35.h:60
FRAMEBUFFER_DEVICE * framebuffer
Framebuffer (ILI9486) device for this display.
Definition lcda35.h:65
GPIO_DEVICE * backlight
Backlight GPIO device for this display.
Definition lcda35.h:64
uint32_t signature
Signature for entry validation.
Definition lcda35.h:58
uint32_t rotation
Framebuffer rotation (eg FRAMEBUFFER_ROTATION_180).
Definition lcda35.h:59
TOUCH_DEVICE * touch
Touch device for this display.
Definition lcda35.h:63
SPI_DEVICE * spi
SPI device for this display.
Definition lcda35.h:61
struct _TOUCH_DEVICE TOUCH_DEVICE
Definition touch.h:151